From 705db0f52899e6a2036c37ff189be835222aecf7 Mon Sep 17 00:00:00 2001 From: Ajevan M Date: Thu, 20 Feb 2025 13:59:05 -0500 Subject: [PATCH 1/4] Make edits to a property in the CreateConferenceRequest model --- CHANGELOG.md | 1 + Gemfile | 9 +- Gemfile.lock | 17 + Rakefile | 2 +- docs/CreateConferenceRequest.md | 2 +- docs/DefaultApi.md | 2 +- freeclimb.gemspec | 47 +- lib/freeclimb.rb | 314 +- lib/freeclimb/api/default_api.rb | 1756 +++---- lib/freeclimb/api_client.rb | 161 +- lib/freeclimb/api_error.rb | 36 +- lib/freeclimb/configuration.rb | 56 +- lib/freeclimb/models/account_request.rb | 77 +- lib/freeclimb/models/account_result.rb | 180 +- lib/freeclimb/models/account_status.rb | 26 +- lib/freeclimb/models/account_type.rb | 26 +- lib/freeclimb/models/add_to_conference.rb | 166 +- .../add_to_conference_notification_webhook.rb | 202 +- .../add_to_queue_notification_webhook.rb | 160 +- lib/freeclimb/models/answered_by.rb | 26 +- lib/freeclimb/models/application_list.rb | 152 +- lib/freeclimb/models/application_request.rb | 136 +- lib/freeclimb/models/application_result.rb | 204 +- lib/freeclimb/models/available_number.rb | 136 +- lib/freeclimb/models/available_number_list.rb | 152 +- lib/freeclimb/models/barge_in_reason.rb | 26 +- .../models/buy_incoming_number_request.rb | 86 +- lib/freeclimb/models/call_control_webhook.rb | 117 +- lib/freeclimb/models/call_direction.rb | 26 +- lib/freeclimb/models/call_ended_reason.rb | 26 +- lib/freeclimb/models/call_list.rb | 152 +- lib/freeclimb/models/call_result.rb | 288 +- lib/freeclimb/models/call_status.rb | 26 +- lib/freeclimb/models/call_status_webhook.rb | 172 +- lib/freeclimb/models/capabilities.rb | 114 +- lib/freeclimb/models/completion_request.rb | 68 +- lib/freeclimb/models/completion_result.rb | 76 +- .../models/completion_result_status.rb | 26 +- lib/freeclimb/models/conference_list.rb | 152 +- .../models/conference_participant_list.rb | 152 +- .../models/conference_participant_result.rb | 180 +- .../conference_recording_status_webhook.rb | 202 +- lib/freeclimb/models/conference_result.rb | 216 +- lib/freeclimb/models/conference_status.rb | 26 +- .../models/conference_status_webhook.rb | 208 +- lib/freeclimb/models/create_conference.rb | 123 +- .../models/create_conference_request.rb | 109 +- .../models/create_conference_webhook.rb | 208 +- lib/freeclimb/models/create_web_rtc_token.rb | 88 +- lib/freeclimb/models/dequeue.rb | 61 +- lib/freeclimb/models/dequeue_webhook.rb | 182 +- lib/freeclimb/models/enqueue.rb | 100 +- lib/freeclimb/models/filter_logs_request.rb | 66 +- lib/freeclimb/models/get_digits.rb | 150 +- lib/freeclimb/models/get_digits_reason.rb | 26 +- lib/freeclimb/models/get_digits_webhook.rb | 190 +- lib/freeclimb/models/get_speech.rb | 191 +- lib/freeclimb/models/get_speech_reason.rb | 26 +- lib/freeclimb/models/get_speech_webhook.rb | 240 +- lib/freeclimb/models/grammar_file_built_in.rb | 26 +- lib/freeclimb/models/grammar_type.rb | 26 +- lib/freeclimb/models/hangup.rb | 73 +- lib/freeclimb/models/if_machine.rb | 26 +- lib/freeclimb/models/inbound_call_webhook.rb | 174 +- lib/freeclimb/models/incoming_number_list.rb | 152 +- .../models/incoming_number_request.rb | 86 +- .../models/incoming_number_result.rb | 248 +- lib/freeclimb/models/language.rb | 26 +- .../models/leave_conference_webhook.rb | 162 +- lib/freeclimb/models/log_level.rb | 26 +- lib/freeclimb/models/log_list.rb | 152 +- lib/freeclimb/models/log_result.rb | 138 +- .../models/machine_detected_webhook.rb | 182 +- lib/freeclimb/models/machine_type.rb | 26 +- lib/freeclimb/models/make_call_request.rb | 158 +- .../models/message_delivery_webhook.rb | 167 +- lib/freeclimb/models/message_direction.rb | 26 +- lib/freeclimb/models/message_request.rb | 147 +- lib/freeclimb/models/message_result.rb | 274 +- lib/freeclimb/models/message_status.rb | 26 +- .../models/message_status_webhook.rb | 176 +- lib/freeclimb/models/messages_list.rb | 152 +- .../models/mutable_resource_model.rb | 97 +- lib/freeclimb/models/out_dial.rb | 164 +- .../models/out_dial_api_connect_webhook.rb | 172 +- .../models/out_dial_connect_webhook.rb | 172 +- .../models/out_dial_start_webhook.rb | 184 +- lib/freeclimb/models/pagination_model.rb | 138 +- lib/freeclimb/models/park.rb | 92 +- lib/freeclimb/models/pause.rb | 70 +- lib/freeclimb/models/percl_command.rb | 76 +- lib/freeclimb/models/percl_script.rb | 68 +- lib/freeclimb/models/play.rb | 92 +- lib/freeclimb/models/play_beep.rb | 26 +- lib/freeclimb/models/play_early_media.rb | 70 +- lib/freeclimb/models/queue_list.rb | 152 +- lib/freeclimb/models/queue_member.rb | 114 +- lib/freeclimb/models/queue_member_list.rb | 152 +- lib/freeclimb/models/queue_request.rb | 79 +- lib/freeclimb/models/queue_result.rb | 180 +- lib/freeclimb/models/queue_result_status.rb | 26 +- lib/freeclimb/models/queue_wait_webhook.rb | 192 +- lib/freeclimb/models/record_utterance.rb | 130 +- .../models/record_utterance_term_reason.rb | 26 +- lib/freeclimb/models/record_webhook.rb | 242 +- lib/freeclimb/models/recording_list.rb | 152 +- lib/freeclimb/models/recording_result.rb | 156 +- lib/freeclimb/models/redirect.rb | 70 +- lib/freeclimb/models/redirect_webhook.rb | 172 +- lib/freeclimb/models/reject.rb | 73 +- .../models/remove_from_conference.rb | 61 +- .../remove_from_queue_notification_webhook.rb | 182 +- lib/freeclimb/models/request_type.rb | 26 +- lib/freeclimb/models/say.rb | 102 +- lib/freeclimb/models/send_digits.rb | 90 +- lib/freeclimb/models/set_dtmf_pass_through.rb | 73 +- lib/freeclimb/models/set_listen.rb | 73 +- lib/freeclimb/models/set_talk.rb | 73 +- lib/freeclimb/models/sms.rb | 100 +- lib/freeclimb/models/sms_ten_dlc_brand.rb | 377 +- .../sms_ten_dlc_brand_alt_business_id_type.rb | 26 +- .../models/sms_ten_dlc_brand_entity_type.rb | 26 +- .../sms_ten_dlc_brand_identity_status.rb | 26 +- .../models/sms_ten_dlc_brand_relationship.rb | 26 +- .../sms_ten_dlc_brand_stock_exchange.rb | 26 +- .../models/sms_ten_dlc_brands_list_result.rb | 152 +- lib/freeclimb/models/sms_ten_dlc_campaign.rb | 455 +- .../models/sms_ten_dlc_campaign_status.rb | 26 +- .../sms_ten_dlc_campaigns_list_result.rb | 152 +- .../models/sms_ten_dlc_partner_campaign.rb | 375 +- .../sms_ten_dlc_partner_campaign_brand.rb | 171 +- .../sms_ten_dlc_partner_campaign_status.rb | 26 +- ...s_ten_dlc_partner_campaigns_list_result.rb | 152 +- .../models/sms_toll_free_campaign.rb | 125 +- ..._toll_free_campaign_registration_status.rb | 26 +- .../sms_toll_free_campaigns_list_result.rb | 152 +- lib/freeclimb/models/start_record_call.rb | 61 +- lib/freeclimb/models/terminate_conference.rb | 61 +- lib/freeclimb/models/tfn.rb | 66 +- lib/freeclimb/models/tfn_campaign.rb | 155 +- lib/freeclimb/models/transcribe_reason.rb | 26 +- .../models/transcribe_term_reason.rb | 26 +- lib/freeclimb/models/transcribe_utterance.rb | 126 +- .../models/transcribe_utterance_record.rb | 90 +- lib/freeclimb/models/transcribe_webhook.rb | 304 +- lib/freeclimb/models/unpark.rb | 61 +- lib/freeclimb/models/update_call_request.rb | 66 +- .../models/update_call_request_status.rb | 26 +- .../update_conference_participant_request.rb | 87 +- .../models/update_conference_request.rb | 86 +- .../update_conference_request_status.rb | 26 +- lib/freeclimb/models/webhook.rb | 69 +- lib/freeclimb/utils/request_verifier.rb | 28 +- lib/freeclimb/utils/signature_information.rb | 16 +- lib/freeclimb/version.rb | 22 +- openapi.json | 3 + spec/api/default_api_spec.rb | 1168 ++--- spec/api_client_spec.rb | 202 +- spec/configuration_spec.rb | 34 +- spec/models/account_request_spec.rb | 337 +- spec/models/account_result_spec.rb | 1406 ++---- spec/models/account_status_spec.rb | 57 +- spec/models/account_type_spec.rb | 51 +- ...to_conference_notification_webhook_spec.rb | 1661 ++----- spec/models/add_to_conference_spec.rb | 1204 ++--- .../add_to_queue_notification_webhook_spec.rb | 1205 ++--- spec/models/answered_by_spec.rb | 51 +- spec/models/application_list_spec.rb | 935 ++-- spec/models/application_request_spec.rb | 944 ++-- spec/models/application_result_spec.rb | 1628 ++----- spec/models/available_number_list_spec.rb | 935 ++-- spec/models/available_number_spec.rb | 921 ++-- spec/models/barge_in_reason_spec.rb | 57 +- .../buy_incoming_number_request_spec.rb | 458 +- spec/models/call_control_webhook_spec.rb | 706 +-- spec/models/call_direction_spec.rb | 57 +- spec/models/call_ended_reason_spec.rb | 217 +- spec/models/call_list_spec.rb | 935 ++-- spec/models/call_result_spec.rb | 2457 +++------- spec/models/call_status_spec.rb | 97 +- spec/models/call_status_webhook_spec.rb | 1403 ++---- spec/models/capabilities_spec.rb | 613 +-- spec/models/completion_request_spec.rb | 218 +- spec/models/completion_result_spec.rb | 335 +- spec/models/completion_result_status_spec.rb | 51 +- spec/models/conference_list_spec.rb | 935 ++-- .../conference_participant_list_spec.rb | 935 ++-- .../conference_participant_result_spec.rb | 1322 ++---- ...onference_recording_status_webhook_spec.rb | 1661 ++----- spec/models/conference_result_spec.rb | 1752 ++----- spec/models/conference_status_spec.rb | 65 +- spec/models/conference_status_webhook_spec.rb | 1661 ++----- spec/models/create_conference_request_spec.rb | 689 +-- spec/models/create_conference_spec.rb | 794 +--- spec/models/create_conference_webhook_spec.rb | 1661 ++----- spec/models/create_web_rtc_token_spec.rb | 443 +- spec/models/dequeue_spec.rb | 31 +- spec/models/dequeue_webhook_spec.rb | 1421 ++---- spec/models/enqueue_spec.rb | 581 +-- spec/models/filter_logs_request_spec.rb | 218 +- spec/models/get_digits_reason_spec.rb | 65 +- spec/models/get_digits_spec.rb | 1063 ++--- spec/models/get_digits_webhook_spec.rb | 1562 ++----- spec/models/get_speech_reason_spec.rb | 81 +- spec/models/get_speech_spec.rb | 1435 ++---- spec/models/get_speech_webhook_spec.rb | 2161 +++------ spec/models/grammar_file_built_in_spec.rb | 153 +- spec/models/grammar_type_spec.rb | 51 +- spec/models/hangup_spec.rb | 218 +- spec/models/if_machine_spec.rb | 51 +- spec/models/inbound_call_webhook_spec.rb | 1322 ++---- spec/models/incoming_number_list_spec.rb | 935 ++-- spec/models/incoming_number_request_spec.rb | 458 +- spec/models/incoming_number_result_spec.rb | 2062 +++------ spec/models/language_spec.rb | 243 +- spec/models/leave_conference_webhook_spec.rb | 1205 ++--- spec/models/log_level_spec.rb | 57 +- spec/models/log_list_spec.rb | 935 ++-- spec/models/log_result_spec.rb | 939 ++-- spec/models/machine_detected_webhook_spec.rb | 1437 ++---- spec/models/machine_type_spec.rb | 51 +- spec/models/make_call_request_spec.rb | 1258 ++---- spec/models/message_delivery_webhook_spec.rb | 1299 ++---- spec/models/message_direction_spec.rb | 51 +- spec/models/message_request_spec.rb | 1142 ++--- spec/models/message_result_spec.rb | 2357 +++------- spec/models/message_status_spec.rb | 123 +- spec/models/message_status_webhook_spec.rb | 1450 ++---- spec/models/messages_list_spec.rb | 935 ++-- spec/models/mutable_resource_model_spec.rb | 563 +-- .../out_dial_api_connect_webhook_spec.rb | 1322 ++---- spec/models/out_dial_connect_webhook_spec.rb | 1322 ++---- spec/models/out_dial_spec.rb | 1257 ++---- spec/models/out_dial_start_webhook_spec.rb | 1439 ++---- spec/models/pagination_model_spec.rb | 836 ++-- spec/models/park_spec.rb | 458 +- spec/models/pause_spec.rb | 200 +- spec/models/percl_command_spec.rb | 221 +- spec/models/percl_script_spec.rb | 200 +- spec/models/play_beep_spec.rb | 65 +- spec/models/play_early_media_spec.rb | 218 +- spec/models/play_spec.rb | 422 +- spec/models/queue_list_spec.rb | 935 ++-- spec/models/queue_member_list_spec.rb | 935 ++-- spec/models/queue_member_spec.rb | 666 +-- spec/models/queue_request_spec.rb | 319 +- spec/models/queue_result_spec.rb | 1353 ++---- spec/models/queue_result_status_spec.rb | 65 +- spec/models/queue_wait_webhook_spec.rb | 1520 ++----- spec/models/record_utterance_spec.rb | 854 ++-- .../record_utterance_term_reason_spec.rb | 65 +- spec/models/record_webhook_spec.rb | 2153 +++------ spec/models/recording_list_spec.rb | 935 ++-- spec/models/recording_result_spec.rb | 1142 ++--- spec/models/redirect_spec.rb | 218 +- spec/models/redirect_webhook_spec.rb | 1322 ++---- spec/models/reject_spec.rb | 218 +- spec/models/remove_from_conference_spec.rb | 31 +- ...ve_from_queue_notification_webhook_spec.rb | 1427 ++---- spec/models/request_type_spec.rb | 217 +- spec/models/say_spec.rb | 545 +-- spec/models/send_digits_spec.rb | 422 +- spec/models/set_dtmf_pass_through_spec.rb | 201 +- spec/models/set_listen_spec.rb | 201 +- spec/models/set_talk_spec.rb | 201 +- spec/models/sms_spec.rb | 581 +-- ...ten_dlc_brand_alt_business_id_type_spec.rb | 65 +- .../sms_ten_dlc_brand_entity_type_spec.rb | 73 +- .../sms_ten_dlc_brand_identity_status_spec.rb | 65 +- .../sms_ten_dlc_brand_relationship_spec.rb | 73 +- spec/models/sms_ten_dlc_brand_spec.rb | 3828 +++++----------- .../sms_ten_dlc_brand_stock_exchange_spec.rb | 251 +- .../sms_ten_dlc_brands_list_result_spec.rb | 935 ++-- spec/models/sms_ten_dlc_campaign_spec.rb | 4020 +++++------------ .../sms_ten_dlc_campaign_status_spec.rb | 51 +- .../sms_ten_dlc_campaigns_list_result_spec.rb | 935 ++-- ...sms_ten_dlc_partner_campaign_brand_spec.rb | 1410 ++---- .../sms_ten_dlc_partner_campaign_spec.rb | 3354 ++++---------- ...ms_ten_dlc_partner_campaign_status_spec.rb | 51 +- ..._dlc_partner_campaigns_list_result_spec.rb | 935 ++-- ..._free_campaign_registration_status_spec.rb | 73 +- spec/models/sms_toll_free_campaign_spec.rb | 936 ++-- ...ms_toll_free_campaigns_list_result_spec.rb | 935 ++-- spec/models/start_record_call_spec.rb | 31 +- spec/models/terminate_conference_spec.rb | 31 +- spec/models/tfn_campaign_spec.rb | 1188 ++--- spec/models/tfn_spec.rb | 218 +- spec/models/transcribe_reason_spec.rb | 73 +- spec/models/transcribe_term_reason_spec.rb | 51 +- .../transcribe_utterance_record_spec.rb | 404 +- spec/models/transcribe_utterance_spec.rb | 759 +--- spec/models/transcribe_webhook_spec.rb | 2667 +++-------- spec/models/unpark_spec.rb | 31 +- spec/models/update_call_request_spec.rb | 217 +- .../models/update_call_request_status_spec.rb | 51 +- ...ate_conference_participant_request_spec.rb | 405 +- spec/models/update_conference_request_spec.rb | 461 +- .../update_conference_request_status_spec.rb | 51 +- spec/models/webhook_spec.rb | 205 +- spec/quickstart_spec.rb | 10 +- spec/spec_helper.rb | 192 +- spec/utils/request_verifier_spec.rb | 141 +- spec/utils/signature_information_spec.rb | 46 +- 303 files changed, 41873 insertions(+), 86644 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb67748..76ff0e58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ None ### Added - CampaignTFN and MessageResultsAllOfTfn models +- Introduce standard gem package for formatting our Ruby SDK files diff --git a/Gemfile b/Gemfile index a0659a2c..0b9e208e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,12 @@ -source 'https://rubygems.org' +source "https://rubygems.org" gemspec group :development, :test do - gem 'rake', '~> 13.0.6' - gem 'pry-byebug' - gem 'rubocop', '~> 1.71.1' + gem "rake", "~> 13.0.6" + gem "pry-byebug" gem "webmock", "~> 3.14" gem "factory_bot", "~> 6.2" gem "facets", "~> 3.1" - gem 'rubocop-rspec', require: false + gem "standard" end diff --git a/Gemfile.lock b/Gemfile.lock index aac150dc..0ded2c33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,6 +55,7 @@ GEM concurrent-ruby (~> 1.0) json (2.9.1) language_server-protocol (3.17.0.4) + lint_roller (1.1.0) logger (1.6.4) method_source (1.1.0) minitest (5.25.4) @@ -99,10 +100,25 @@ GEM unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.38.0) parser (>= 3.3.1.0) + rubocop-performance (1.23.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (3.4.0) rubocop (~> 1.61) ruby-progressbar (1.13.0) securerandom (0.4.1) + standard (1.45.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.71.0) + standard-custom (~> 1.0.0) + standard-performance (~> 1.6) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.6.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.23.0) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) @@ -137,6 +153,7 @@ DEPENDENCIES rspec (~> 3.6, >= 3.6.0) rubocop (~> 1.71.1) rubocop-rspec + standard webmock (~> 3.14) BUNDLED WITH diff --git a/Rakefile b/Rakefile index c72ca30d..5ec677f6 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require "bundler/gem_tasks" begin - require 'rspec/core/rake_task' + require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) task default: :spec diff --git a/docs/CreateConferenceRequest.md b/docs/CreateConferenceRequest.md index c45c55a4..9adac1ee 100644 --- a/docs/CreateConferenceRequest.md +++ b/docs/CreateConferenceRequest.md @@ -8,7 +8,7 @@ | **play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] | | **record** | **Boolean** | Setting to `true` records the entire Conference. | [optional] | | **wait_url** | **String** | If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once &mdash; when the Conference is created. | [optional] | -| **status_callback_url** | **String** | This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below). | [optional] | +| **status_callback_url** | **String** | This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below). | | ## Example diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 8411d1b9..2397d067 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -209,7 +209,7 @@ end api_instance = Freeclimb::DefaultApi.new opts = { - create_conference_request: Freeclimb::CreateConferenceRequest.new # CreateConferenceRequest | Conference to create + create_conference_request: Freeclimb::CreateConferenceRequest.new({status_callback_url: 'status_callback_url_example'}) # CreateConferenceRequest | Conference to create } begin diff --git a/freeclimb.gemspec b/freeclimb.gemspec index 05e20988..51c530a6 100644 --- a/freeclimb.gemspec +++ b/freeclimb.gemspec @@ -1,38 +1,33 @@ -# -*- encoding: utf-8 -*- - -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# $:.push File.expand_path("../lib", __FILE__) require "freeclimb/version" Gem::Specification.new do |s| - s.name = "freeclimb" - s.version = Freeclimb::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["OpenAPI-Generator"] - s.email = ["support@freeclimb.com"] - s.homepage = "https://freeclimb.com" - s.summary = "FreeClimb API Ruby Gem" + s.name = "freeclimb" + s.version = Freeclimb::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["OpenAPI-Generator"] + s.email = ["support@freeclimb.com"] + s.homepage = "https://freeclimb.com" + s.summary = "FreeClimb API Ruby Gem" s.description = "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." - s.license = "Unlicense" + s.license = "Unlicense" s.required_ruby_version = ">= 2.4" - s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' + s.add_runtime_dependency "typhoeus", "~> 1.0", ">= 1.0.1" - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' + s.add_development_dependency "rspec", "~> 3.6", ">= 3.6.0" - s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } - s.test_files = `find spec/*`.split("\n") - s.executables = [] + s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } + s.executables = [] s.require_paths = ["lib"] end diff --git a/lib/freeclimb.rb b/lib/freeclimb.rb index 4e2b5fba..210e0c2e 100644 --- a/lib/freeclimb.rb +++ b/lib/freeclimb.rb @@ -1,169 +1,167 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# # Common files -require 'freeclimb/api_client' -require 'freeclimb/api_error' -require 'freeclimb/version' -require 'freeclimb/configuration' +require "freeclimb/api_client" +require "freeclimb/api_error" +require "freeclimb/version" +require "freeclimb/configuration" # Models -require 'freeclimb/models/account_request' -require 'freeclimb/models/account_result' -require 'freeclimb/models/account_status' -require 'freeclimb/models/account_type' -require 'freeclimb/models/answered_by' -require 'freeclimb/models/application_list' -require 'freeclimb/models/application_request' -require 'freeclimb/models/application_result' -require 'freeclimb/models/available_number' -require 'freeclimb/models/available_number_list' -require 'freeclimb/models/barge_in_reason' -require 'freeclimb/models/buy_incoming_number_request' -require 'freeclimb/models/call_direction' -require 'freeclimb/models/call_ended_reason' -require 'freeclimb/models/call_list' -require 'freeclimb/models/call_result' -require 'freeclimb/models/call_status' -require 'freeclimb/models/capabilities' -require 'freeclimb/models/completion_request' -require 'freeclimb/models/completion_result' -require 'freeclimb/models/completion_result_status' -require 'freeclimb/models/conference_list' -require 'freeclimb/models/conference_participant_list' -require 'freeclimb/models/conference_participant_result' -require 'freeclimb/models/conference_result' -require 'freeclimb/models/conference_status' -require 'freeclimb/models/create_conference_request' -require 'freeclimb/models/create_web_rtc_token' -require 'freeclimb/models/filter_logs_request' -require 'freeclimb/models/get_digits_reason' -require 'freeclimb/models/get_speech_reason' -require 'freeclimb/models/grammar_file_built_in' -require 'freeclimb/models/grammar_type' -require 'freeclimb/models/if_machine' -require 'freeclimb/models/incoming_number_list' -require 'freeclimb/models/incoming_number_request' -require 'freeclimb/models/incoming_number_result' -require 'freeclimb/models/language' -require 'freeclimb/models/log_level' -require 'freeclimb/models/log_list' -require 'freeclimb/models/log_result' -require 'freeclimb/models/machine_type' -require 'freeclimb/models/make_call_request' -require 'freeclimb/models/message_direction' -require 'freeclimb/models/message_request' -require 'freeclimb/models/message_result' -require 'freeclimb/models/message_status' -require 'freeclimb/models/messages_list' -require 'freeclimb/models/mutable_resource_model' -require 'freeclimb/models/pagination_model' -require 'freeclimb/models/percl_command' -require 'freeclimb/models/percl_script' -require 'freeclimb/models/play_beep' -require 'freeclimb/models/queue_list' -require 'freeclimb/models/queue_member' -require 'freeclimb/models/queue_member_list' -require 'freeclimb/models/queue_request' -require 'freeclimb/models/queue_result' -require 'freeclimb/models/queue_result_status' -require 'freeclimb/models/record_utterance_term_reason' -require 'freeclimb/models/recording_list' -require 'freeclimb/models/recording_result' -require 'freeclimb/models/request_type' -require 'freeclimb/models/sms_ten_dlc_brand' -require 'freeclimb/models/sms_ten_dlc_brand_alt_business_id_type' -require 'freeclimb/models/sms_ten_dlc_brand_entity_type' -require 'freeclimb/models/sms_ten_dlc_brand_identity_status' -require 'freeclimb/models/sms_ten_dlc_brand_relationship' -require 'freeclimb/models/sms_ten_dlc_brand_stock_exchange' -require 'freeclimb/models/sms_ten_dlc_brands_list_result' -require 'freeclimb/models/sms_ten_dlc_campaign' -require 'freeclimb/models/sms_ten_dlc_campaign_status' -require 'freeclimb/models/sms_ten_dlc_campaigns_list_result' -require 'freeclimb/models/sms_ten_dlc_partner_campaign' -require 'freeclimb/models/sms_ten_dlc_partner_campaign_brand' -require 'freeclimb/models/sms_ten_dlc_partner_campaign_status' -require 'freeclimb/models/sms_ten_dlc_partner_campaigns_list_result' -require 'freeclimb/models/sms_toll_free_campaign' -require 'freeclimb/models/sms_toll_free_campaign_registration_status' -require 'freeclimb/models/sms_toll_free_campaigns_list_result' -require 'freeclimb/models/tfn' -require 'freeclimb/models/tfn_campaign' -require 'freeclimb/models/transcribe_reason' -require 'freeclimb/models/transcribe_term_reason' -require 'freeclimb/models/transcribe_utterance_record' -require 'freeclimb/models/update_call_request' -require 'freeclimb/models/update_call_request_status' -require 'freeclimb/models/update_conference_participant_request' -require 'freeclimb/models/update_conference_request' -require 'freeclimb/models/update_conference_request_status' -require 'freeclimb/models/webhook' -require 'freeclimb/models/add_to_conference' -require 'freeclimb/models/add_to_conference_notification_webhook' -require 'freeclimb/models/add_to_queue_notification_webhook' -require 'freeclimb/models/call_control_webhook' -require 'freeclimb/models/call_status_webhook' -require 'freeclimb/models/conference_recording_status_webhook' -require 'freeclimb/models/conference_status_webhook' -require 'freeclimb/models/create_conference' -require 'freeclimb/models/create_conference_webhook' -require 'freeclimb/models/dequeue' -require 'freeclimb/models/dequeue_webhook' -require 'freeclimb/models/enqueue' -require 'freeclimb/models/get_digits' -require 'freeclimb/models/get_digits_webhook' -require 'freeclimb/models/get_speech' -require 'freeclimb/models/get_speech_webhook' -require 'freeclimb/models/hangup' -require 'freeclimb/models/inbound_call_webhook' -require 'freeclimb/models/leave_conference_webhook' -require 'freeclimb/models/machine_detected_webhook' -require 'freeclimb/models/message_delivery_webhook' -require 'freeclimb/models/message_status_webhook' -require 'freeclimb/models/out_dial' -require 'freeclimb/models/out_dial_api_connect_webhook' -require 'freeclimb/models/out_dial_connect_webhook' -require 'freeclimb/models/out_dial_start_webhook' -require 'freeclimb/models/park' -require 'freeclimb/models/pause' -require 'freeclimb/models/play' -require 'freeclimb/models/play_early_media' -require 'freeclimb/models/queue_wait_webhook' -require 'freeclimb/models/record_utterance' -require 'freeclimb/models/record_webhook' -require 'freeclimb/models/redirect' -require 'freeclimb/models/redirect_webhook' -require 'freeclimb/models/reject' -require 'freeclimb/models/remove_from_conference' -require 'freeclimb/models/remove_from_queue_notification_webhook' -require 'freeclimb/models/say' -require 'freeclimb/models/send_digits' -require 'freeclimb/models/set_dtmf_pass_through' -require 'freeclimb/models/set_listen' -require 'freeclimb/models/set_talk' -require 'freeclimb/models/sms' -require 'freeclimb/models/start_record_call' -require 'freeclimb/models/terminate_conference' -require 'freeclimb/models/transcribe_utterance' -require 'freeclimb/models/transcribe_webhook' -require 'freeclimb/models/unpark' +require "freeclimb/models/account_request" +require "freeclimb/models/account_result" +require "freeclimb/models/account_status" +require "freeclimb/models/account_type" +require "freeclimb/models/answered_by" +require "freeclimb/models/application_list" +require "freeclimb/models/application_request" +require "freeclimb/models/application_result" +require "freeclimb/models/available_number" +require "freeclimb/models/available_number_list" +require "freeclimb/models/barge_in_reason" +require "freeclimb/models/buy_incoming_number_request" +require "freeclimb/models/call_direction" +require "freeclimb/models/call_ended_reason" +require "freeclimb/models/call_list" +require "freeclimb/models/call_result" +require "freeclimb/models/call_status" +require "freeclimb/models/capabilities" +require "freeclimb/models/completion_request" +require "freeclimb/models/completion_result" +require "freeclimb/models/completion_result_status" +require "freeclimb/models/conference_list" +require "freeclimb/models/conference_participant_list" +require "freeclimb/models/conference_participant_result" +require "freeclimb/models/conference_result" +require "freeclimb/models/conference_status" +require "freeclimb/models/create_conference_request" +require "freeclimb/models/create_web_rtc_token" +require "freeclimb/models/filter_logs_request" +require "freeclimb/models/get_digits_reason" +require "freeclimb/models/get_speech_reason" +require "freeclimb/models/grammar_file_built_in" +require "freeclimb/models/grammar_type" +require "freeclimb/models/if_machine" +require "freeclimb/models/incoming_number_list" +require "freeclimb/models/incoming_number_request" +require "freeclimb/models/incoming_number_result" +require "freeclimb/models/language" +require "freeclimb/models/log_level" +require "freeclimb/models/log_list" +require "freeclimb/models/log_result" +require "freeclimb/models/machine_type" +require "freeclimb/models/make_call_request" +require "freeclimb/models/message_direction" +require "freeclimb/models/message_request" +require "freeclimb/models/message_result" +require "freeclimb/models/message_status" +require "freeclimb/models/messages_list" +require "freeclimb/models/mutable_resource_model" +require "freeclimb/models/pagination_model" +require "freeclimb/models/percl_command" +require "freeclimb/models/percl_script" +require "freeclimb/models/play_beep" +require "freeclimb/models/queue_list" +require "freeclimb/models/queue_member" +require "freeclimb/models/queue_member_list" +require "freeclimb/models/queue_request" +require "freeclimb/models/queue_result" +require "freeclimb/models/queue_result_status" +require "freeclimb/models/record_utterance_term_reason" +require "freeclimb/models/recording_list" +require "freeclimb/models/recording_result" +require "freeclimb/models/request_type" +require "freeclimb/models/sms_ten_dlc_brand" +require "freeclimb/models/sms_ten_dlc_brand_alt_business_id_type" +require "freeclimb/models/sms_ten_dlc_brand_entity_type" +require "freeclimb/models/sms_ten_dlc_brand_identity_status" +require "freeclimb/models/sms_ten_dlc_brand_relationship" +require "freeclimb/models/sms_ten_dlc_brand_stock_exchange" +require "freeclimb/models/sms_ten_dlc_brands_list_result" +require "freeclimb/models/sms_ten_dlc_campaign" +require "freeclimb/models/sms_ten_dlc_campaign_status" +require "freeclimb/models/sms_ten_dlc_campaigns_list_result" +require "freeclimb/models/sms_ten_dlc_partner_campaign" +require "freeclimb/models/sms_ten_dlc_partner_campaign_brand" +require "freeclimb/models/sms_ten_dlc_partner_campaign_status" +require "freeclimb/models/sms_ten_dlc_partner_campaigns_list_result" +require "freeclimb/models/sms_toll_free_campaign" +require "freeclimb/models/sms_toll_free_campaign_registration_status" +require "freeclimb/models/sms_toll_free_campaigns_list_result" +require "freeclimb/models/tfn" +require "freeclimb/models/tfn_campaign" +require "freeclimb/models/transcribe_reason" +require "freeclimb/models/transcribe_term_reason" +require "freeclimb/models/transcribe_utterance_record" +require "freeclimb/models/update_call_request" +require "freeclimb/models/update_call_request_status" +require "freeclimb/models/update_conference_participant_request" +require "freeclimb/models/update_conference_request" +require "freeclimb/models/update_conference_request_status" +require "freeclimb/models/webhook" +require "freeclimb/models/add_to_conference" +require "freeclimb/models/add_to_conference_notification_webhook" +require "freeclimb/models/add_to_queue_notification_webhook" +require "freeclimb/models/call_control_webhook" +require "freeclimb/models/call_status_webhook" +require "freeclimb/models/conference_recording_status_webhook" +require "freeclimb/models/conference_status_webhook" +require "freeclimb/models/create_conference" +require "freeclimb/models/create_conference_webhook" +require "freeclimb/models/dequeue" +require "freeclimb/models/dequeue_webhook" +require "freeclimb/models/enqueue" +require "freeclimb/models/get_digits" +require "freeclimb/models/get_digits_webhook" +require "freeclimb/models/get_speech" +require "freeclimb/models/get_speech_webhook" +require "freeclimb/models/hangup" +require "freeclimb/models/inbound_call_webhook" +require "freeclimb/models/leave_conference_webhook" +require "freeclimb/models/machine_detected_webhook" +require "freeclimb/models/message_delivery_webhook" +require "freeclimb/models/message_status_webhook" +require "freeclimb/models/out_dial" +require "freeclimb/models/out_dial_api_connect_webhook" +require "freeclimb/models/out_dial_connect_webhook" +require "freeclimb/models/out_dial_start_webhook" +require "freeclimb/models/park" +require "freeclimb/models/pause" +require "freeclimb/models/play" +require "freeclimb/models/play_early_media" +require "freeclimb/models/queue_wait_webhook" +require "freeclimb/models/record_utterance" +require "freeclimb/models/record_webhook" +require "freeclimb/models/redirect" +require "freeclimb/models/redirect_webhook" +require "freeclimb/models/reject" +require "freeclimb/models/remove_from_conference" +require "freeclimb/models/remove_from_queue_notification_webhook" +require "freeclimb/models/say" +require "freeclimb/models/send_digits" +require "freeclimb/models/set_dtmf_pass_through" +require "freeclimb/models/set_listen" +require "freeclimb/models/set_talk" +require "freeclimb/models/sms" +require "freeclimb/models/start_record_call" +require "freeclimb/models/terminate_conference" +require "freeclimb/models/transcribe_utterance" +require "freeclimb/models/transcribe_webhook" +require "freeclimb/models/unpark" # APIs -require 'freeclimb/api/default_api' +require "freeclimb/api/default_api" # Utils -require 'freeclimb/utils/signature_information' -require 'freeclimb/utils/request_verifier' +require "freeclimb/utils/signature_information" +require "freeclimb/utils/request_verifier" module Freeclimb class << self diff --git a/lib/freeclimb/api/default_api.rb b/lib/freeclimb/api/default_api.rb index e12c83c3..6701347b 100644 --- a/lib/freeclimb/api/default_api.rb +++ b/lib/freeclimb/api/default_api.rb @@ -1,16 +1,14 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'cgi' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "cgi" module Freeclimb class DefaultApi @@ -24,6 +22,7 @@ def initialize(api_client = ApiClient.default, account_id = nil) @account_id = api_client.config.username end end + # Buy a Phone Number # @param buy_incoming_number_request [BuyIncomingNumberRequest] Incoming Number transaction details # @param [Hash] opts the optional parameters @@ -39,7 +38,7 @@ def buy_a_phone_number(buy_incoming_number_request, opts = {}) # @return [Array<(IncomingNumberResult, Integer, Hash)>] IncomingNumberResult data, response status code and response headers def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.buy_a_phone_number ...' + @api_client.config.logger.debug "Calling API: DefaultApi.buy_a_phone_number ..." end # verify the required parameter 'buy_incoming_number_request' is set @@ -47,7 +46,7 @@ def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {}) fail ArgumentError, "Missing the required parameter 'buy_incoming_number_request' when calling DefaultApi.buy_a_phone_number" end # resource path - local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -55,11 +54,11 @@ def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -69,26 +68,26 @@ def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(buy_incoming_number_request) # return_type - return_type = opts[:debug_return_type] || 'IncomingNumberResult' + return_type = opts[:debug_return_type] || "IncomingNumberResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.buy_a_phone_number", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.buy_a_phone_number", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#buy_a_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Create a Conference @@ -106,10 +105,10 @@ def create_a_conference(opts = {}) # @return [Array<(ConferenceResult, Integer, Hash)>] ConferenceResult data, response status code and response headers def create_a_conference_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.create_a_conference ...' + @api_client.config.logger.debug "Calling API: DefaultApi.create_a_conference ..." end # resource path - local_var_path = '/Accounts/{accountId}/Conferences'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -117,40 +116,40 @@ def create_a_conference_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_conference_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:create_conference_request]) # return_type - return_type = opts[:debug_return_type] || 'ConferenceResult' + return_type = opts[:debug_return_type] || "ConferenceResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.create_a_conference", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.create_a_conference", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_a_conference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Create a Queue @@ -168,10 +167,10 @@ def create_a_queue(opts = {}) # @return [Array<(QueueResult, Integer, Hash)>] QueueResult data, response status code and response headers def create_a_queue_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.create_a_queue ...' + @api_client.config.logger.debug "Calling API: DefaultApi.create_a_queue ..." end # resource path - local_var_path = '/Accounts/{accountId}/Queues'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -179,40 +178,40 @@ def create_a_queue_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'queue_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:queue_request]) # return_type - return_type = opts[:debug_return_type] || 'QueueResult' + return_type = opts[:debug_return_type] || "QueueResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.create_a_queue", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.create_a_queue", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_a_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Create an application @@ -230,10 +229,10 @@ def create_an_application(opts = {}) # @return [Array<(ApplicationResult, Integer, Hash)>] ApplicationResult data, response status code and response headers def create_an_application_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.create_an_application ...' + @api_client.config.logger.debug "Calling API: DefaultApi.create_an_application ..." end # resource path - local_var_path = '/Accounts/{accountId}/Applications'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Applications".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -241,40 +240,40 @@ def create_an_application_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'application_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:application_request]) # return_type - return_type = opts[:debug_return_type] || 'ApplicationResult' + return_type = opts[:debug_return_type] || "ApplicationResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.create_an_application", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.create_an_application", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_an_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Query the knowledge base @@ -294,7 +293,7 @@ def create_knowledge_base_completion(knowledge_base_id, opts = {}) # @return [Array<(CompletionResult, Integer, Hash)>] CompletionResult data, response status code and response headers def create_knowledge_base_completion_with_http_info(knowledge_base_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.create_knowledge_base_completion ...' + @api_client.config.logger.debug "Calling API: DefaultApi.create_knowledge_base_completion ..." end # verify the required parameter 'knowledge_base_id' is set @@ -302,7 +301,7 @@ def create_knowledge_base_completion_with_http_info(knowledge_base_id, opts = {} fail ArgumentError, "Missing the required parameter 'knowledge_base_id' when calling DefaultApi.create_knowledge_base_completion" end # resource path - local_var_path = '/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'knowledgeBaseId' + '}', CGI.escape(knowledge_base_id.to_s)) + local_var_path = "/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "knowledgeBaseId" + "}", CGI.escape(knowledge_base_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -310,40 +309,40 @@ def create_knowledge_base_completion_with_http_info(knowledge_base_id, opts = {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'completion_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:completion_request]) # return_type - return_type = opts[:debug_return_type] || 'CompletionResult' + return_type = opts[:debug_return_type] || "CompletionResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.create_knowledge_base_completion", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.create_knowledge_base_completion", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_knowledge_base_completion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Delete a Recording @@ -361,7 +360,7 @@ def delete_a_recording(recording_id, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_a_recording_with_http_info(recording_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.delete_a_recording ...' + @api_client.config.logger.debug "Calling API: DefaultApi.delete_a_recording ..." end # verify the required parameter 'recording_id' is set @@ -369,7 +368,7 @@ def delete_a_recording_with_http_info(recording_id, opts = {}) fail ArgumentError, "Missing the required parameter 'recording_id' when calling DefaultApi.delete_a_recording" end # resource path - local_var_path = '/Accounts/{accountId}/Recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s)) + local_var_path = "/Accounts/{accountId}/Recordings/{recordingId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "recordingId" + "}", CGI.escape(recording_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -387,23 +386,23 @@ def delete_a_recording_with_http_info(recording_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.delete_a_recording", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.delete_a_recording", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#delete_a_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Delete an application @@ -421,7 +420,7 @@ def delete_an_application(application_id, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.delete_an_application ...' + @api_client.config.logger.debug "Calling API: DefaultApi.delete_an_application ..." end # verify the required parameter 'application_id' is set @@ -429,7 +428,7 @@ def delete_an_application_with_http_info(application_id, opts = {}) fail ArgumentError, "Missing the required parameter 'application_id' when calling DefaultApi.delete_an_application" end # resource path - local_var_path = '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)) + local_var_path = "/Accounts/{accountId}/Applications/{applicationId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "applicationId" + "}", CGI.escape(application_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -447,23 +446,23 @@ def delete_an_application_with_http_info(application_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.delete_an_application", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.delete_an_application", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#delete_an_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Delete an Incoming Number @@ -481,7 +480,7 @@ def delete_an_incoming_number(phone_number_id, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.delete_an_incoming_number ...' + @api_client.config.logger.debug "Calling API: DefaultApi.delete_an_incoming_number ..." end # verify the required parameter 'phone_number_id' is set @@ -489,7 +488,7 @@ def delete_an_incoming_number_with_http_info(phone_number_id, opts = {}) fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling DefaultApi.delete_an_incoming_number" end # resource path - local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) + local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "phoneNumberId" + "}", CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -507,23 +506,23 @@ def delete_an_incoming_number_with_http_info(phone_number_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.delete_an_incoming_number", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.delete_an_incoming_number", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#delete_an_incoming_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Dequeue a Member @@ -543,7 +542,7 @@ def dequeue_a_member(queue_id, call_id, opts = {}) # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers def dequeue_a_member_with_http_info(queue_id, call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.dequeue_a_member ...' + @api_client.config.logger.debug "Calling API: DefaultApi.dequeue_a_member ..." end # verify the required parameter 'queue_id' is set @@ -556,7 +555,7 @@ def dequeue_a_member_with_http_info(queue_id, call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.dequeue_a_member" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}/Members/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -564,7 +563,7 @@ def dequeue_a_member_with_http_info(queue_id, call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -573,26 +572,26 @@ def dequeue_a_member_with_http_info(queue_id, call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueMember' + return_type = opts[:debug_return_type] || "QueueMember" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.dequeue_a_member", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.dequeue_a_member", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#dequeue_a_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Dequeue Head Member @@ -610,7 +609,7 @@ def dequeue_head_member(queue_id, opts = {}) # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers def dequeue_head_member_with_http_info(queue_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.dequeue_head_member ...' + @api_client.config.logger.debug "Calling API: DefaultApi.dequeue_head_member ..." end # verify the required parameter 'queue_id' is set @@ -618,7 +617,7 @@ def dequeue_head_member_with_http_info(queue_id, opts = {}) fail ArgumentError, "Missing the required parameter 'queue_id' when calling DefaultApi.dequeue_head_member" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}/Members/Front'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}/Members/Front".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -626,7 +625,7 @@ def dequeue_head_member_with_http_info(queue_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -635,26 +634,26 @@ def dequeue_head_member_with_http_info(queue_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueMember' + return_type = opts[:debug_return_type] || "QueueMember" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.dequeue_head_member", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.dequeue_head_member", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#dequeue_head_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Download a Recording File @@ -672,7 +671,7 @@ def download_a_recording_file(recording_id, opts = {}) # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers def download_a_recording_file_with_http_info(recording_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.download_a_recording_file ...' + @api_client.config.logger.debug "Calling API: DefaultApi.download_a_recording_file ..." end # verify the required parameter 'recording_id' is set @@ -680,7 +679,7 @@ def download_a_recording_file_with_http_info(recording_id, opts = {}) fail ArgumentError, "Missing the required parameter 'recording_id' when calling DefaultApi.download_a_recording_file" end # resource path - local_var_path = '/Accounts/{accountId}/Recordings/{recordingId}/Download'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s)) + local_var_path = "/Accounts/{accountId}/Recordings/{recordingId}/Download".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "recordingId" + "}", CGI.escape(recording_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -688,7 +687,7 @@ def download_a_recording_file_with_http_info(recording_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['audio/x-wav']) + header_params["Accept"] = @api_client.select_header_accept(["audio/x-wav"]) # form parameters form_params = opts[:form_params] || {} @@ -697,26 +696,26 @@ def download_a_recording_file_with_http_info(recording_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'File' + return_type = opts[:debug_return_type] || "File" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.download_a_recording_file", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.download_a_recording_file", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#download_a_recording_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Filter Logs @@ -734,7 +733,7 @@ def filter_logs(filter_logs_request, opts = {}) # @return [Array<(LogList, Integer, Hash)>] LogList data, response status code and response headers def filter_logs_with_http_info(filter_logs_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.filter_logs ...' + @api_client.config.logger.debug "Calling API: DefaultApi.filter_logs ..." end # verify the required parameter 'filter_logs_request' is set @@ -742,7 +741,7 @@ def filter_logs_with_http_info(filter_logs_request, opts = {}) fail ArgumentError, "Missing the required parameter 'filter_logs_request' when calling DefaultApi.filter_logs" end # resource path - local_var_path = '/Accounts/{accountId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Logs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -750,11 +749,11 @@ def filter_logs_with_http_info(filter_logs_request, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -764,26 +763,26 @@ def filter_logs_with_http_info(filter_logs_request, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(filter_logs_request) # return_type - return_type = opts[:debug_return_type] || 'LogList' + return_type = opts[:debug_return_type] || "LogList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.filter_logs", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.filter_logs", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#filter_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Call @@ -801,7 +800,7 @@ def get_a_call(call_id, opts = {}) # @return [Array<(CallResult, Integer, Hash)>] CallResult data, response status code and response headers def get_a_call_with_http_info(call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_call ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_call ..." end # verify the required parameter 'call_id' is set @@ -809,7 +808,7 @@ def get_a_call_with_http_info(call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.get_a_call" end # resource path - local_var_path = '/Accounts/{accountId}/Calls/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -817,7 +816,7 @@ def get_a_call_with_http_info(call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -826,26 +825,26 @@ def get_a_call_with_http_info(call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CallResult' + return_type = opts[:debug_return_type] || "CallResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_call", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_call", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Conference @@ -863,7 +862,7 @@ def get_a_conference(conference_id, opts = {}) # @return [Array<(ConferenceResult, Integer, Hash)>] ConferenceResult data, response status code and response headers def get_a_conference_with_http_info(conference_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_conference ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_conference ..." end # verify the required parameter 'conference_id' is set @@ -871,7 +870,7 @@ def get_a_conference_with_http_info(conference_id, opts = {}) fail ArgumentError, "Missing the required parameter 'conference_id' when calling DefaultApi.get_a_conference" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -879,7 +878,7 @@ def get_a_conference_with_http_info(conference_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -888,26 +887,26 @@ def get_a_conference_with_http_info(conference_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ConferenceResult' + return_type = opts[:debug_return_type] || "ConferenceResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_conference", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_conference", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_conference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Member @@ -927,7 +926,7 @@ def get_a_member(queue_id, call_id, opts = {}) # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers def get_a_member_with_http_info(queue_id, call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_member ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_member ..." end # verify the required parameter 'queue_id' is set @@ -940,7 +939,7 @@ def get_a_member_with_http_info(queue_id, call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.get_a_member" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}/Members/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -948,7 +947,7 @@ def get_a_member_with_http_info(queue_id, call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -957,26 +956,26 @@ def get_a_member_with_http_info(queue_id, call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueMember' + return_type = opts[:debug_return_type] || "QueueMember" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_member", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_member", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Participant @@ -996,7 +995,7 @@ def get_a_participant(conference_id, call_id, opts = {}) # @return [Array<(ConferenceParticipantResult, Integer, Hash)>] ConferenceParticipantResult data, response status code and response headers def get_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_participant ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_participant ..." end # verify the required parameter 'conference_id' is set @@ -1009,7 +1008,7 @@ def get_a_participant_with_http_info(conference_id, call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.get_a_participant" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1017,7 +1016,7 @@ def get_a_participant_with_http_info(conference_id, call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1026,26 +1025,26 @@ def get_a_participant_with_http_info(conference_id, call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ConferenceParticipantResult' + return_type = opts[:debug_return_type] || "ConferenceParticipantResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_participant", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_participant", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Queue @@ -1063,7 +1062,7 @@ def get_a_queue(queue_id, opts = {}) # @return [Array<(QueueResult, Integer, Hash)>] QueueResult data, response status code and response headers def get_a_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_queue ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_queue ..." end # verify the required parameter 'queue_id' is set @@ -1071,7 +1070,7 @@ def get_a_queue_with_http_info(queue_id, opts = {}) fail ArgumentError, "Missing the required parameter 'queue_id' when calling DefaultApi.get_a_queue" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1079,7 +1078,7 @@ def get_a_queue_with_http_info(queue_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1088,26 +1087,26 @@ def get_a_queue_with_http_info(queue_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueResult' + return_type = opts[:debug_return_type] || "QueueResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_queue", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_queue", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a Recording @@ -1125,7 +1124,7 @@ def get_a_recording(recording_id, opts = {}) # @return [Array<(RecordingResult, Integer, Hash)>] RecordingResult data, response status code and response headers def get_a_recording_with_http_info(recording_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_a_recording ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_a_recording ..." end # verify the required parameter 'recording_id' is set @@ -1133,7 +1132,7 @@ def get_a_recording_with_http_info(recording_id, opts = {}) fail ArgumentError, "Missing the required parameter 'recording_id' when calling DefaultApi.get_a_recording" end # resource path - local_var_path = '/Accounts/{accountId}/Recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s)) + local_var_path = "/Accounts/{accountId}/Recordings/{recordingId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "recordingId" + "}", CGI.escape(recording_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1141,7 +1140,7 @@ def get_a_recording_with_http_info(recording_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1150,26 +1149,26 @@ def get_a_recording_with_http_info(recording_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'RecordingResult' + return_type = opts[:debug_return_type] || "RecordingResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_a_recording", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_a_recording", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_a_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get an Account @@ -1185,10 +1184,10 @@ def get_an_account(opts = {}) # @return [Array<(AccountResult, Integer, Hash)>] AccountResult data, response status code and response headers def get_an_account_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_account ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_an_account ..." end # resource path - local_var_path = '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1196,7 +1195,7 @@ def get_an_account_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1205,26 +1204,26 @@ def get_an_account_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AccountResult' + return_type = opts[:debug_return_type] || "AccountResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_an_account", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_an_account", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_an_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get an Application @@ -1242,7 +1241,7 @@ def get_an_application(application_id, opts = {}) # @return [Array<(ApplicationResult, Integer, Hash)>] ApplicationResult data, response status code and response headers def get_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_application ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_an_application ..." end # verify the required parameter 'application_id' is set @@ -1250,7 +1249,7 @@ def get_an_application_with_http_info(application_id, opts = {}) fail ArgumentError, "Missing the required parameter 'application_id' when calling DefaultApi.get_an_application" end # resource path - local_var_path = '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)) + local_var_path = "/Accounts/{accountId}/Applications/{applicationId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "applicationId" + "}", CGI.escape(application_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1258,7 +1257,7 @@ def get_an_application_with_http_info(application_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1267,26 +1266,26 @@ def get_an_application_with_http_info(application_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ApplicationResult' + return_type = opts[:debug_return_type] || "ApplicationResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_an_application", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_an_application", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_an_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get an Incoming Number @@ -1304,7 +1303,7 @@ def get_an_incoming_number(phone_number_id, opts = {}) # @return [Array<(IncomingNumberResult, Integer, Hash)>] IncomingNumberResult data, response status code and response headers def get_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_incoming_number ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_an_incoming_number ..." end # verify the required parameter 'phone_number_id' is set @@ -1312,7 +1311,7 @@ def get_an_incoming_number_with_http_info(phone_number_id, opts = {}) fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling DefaultApi.get_an_incoming_number" end # resource path - local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) + local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "phoneNumberId" + "}", CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1320,7 +1319,7 @@ def get_an_incoming_number_with_http_info(phone_number_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1329,26 +1328,26 @@ def get_an_incoming_number_with_http_info(phone_number_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncomingNumberResult' + return_type = opts[:debug_return_type] || "IncomingNumberResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_an_incoming_number", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_an_incoming_number", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_an_incoming_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get an SMS Message @@ -1366,7 +1365,7 @@ def get_an_sms_message(message_id, opts = {}) # @return [Array<(MessageResult, Integer, Hash)>] MessageResult data, response status code and response headers def get_an_sms_message_with_http_info(message_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_an_sms_message ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_an_sms_message ..." end # verify the required parameter 'message_id' is set @@ -1374,7 +1373,7 @@ def get_an_sms_message_with_http_info(message_id, opts = {}) fail ArgumentError, "Missing the required parameter 'message_id' when calling DefaultApi.get_an_sms_message" end # resource path - local_var_path = '/Accounts/{accountId}/Messages/{messageId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(message_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/{messageId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "messageId" + "}", CGI.escape(message_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1382,7 +1381,7 @@ def get_an_sms_message_with_http_info(message_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1391,26 +1390,26 @@ def get_an_sms_message_with_http_info(message_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MessageResult' + return_type = opts[:debug_return_type] || "MessageResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_an_sms_message", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_an_sms_message", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_an_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get Head Member @@ -1428,7 +1427,7 @@ def get_head_member(queue_id, opts = {}) # @return [Array<(QueueMember, Integer, Hash)>] QueueMember data, response status code and response headers def get_head_member_with_http_info(queue_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_head_member ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_head_member ..." end # verify the required parameter 'queue_id' is set @@ -1436,7 +1435,7 @@ def get_head_member_with_http_info(queue_id, opts = {}) fail ArgumentError, "Missing the required parameter 'queue_id' when calling DefaultApi.get_head_member" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}/Members/Front'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}/Members/Front".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1444,7 +1443,7 @@ def get_head_member_with_http_info(queue_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1453,26 +1452,26 @@ def get_head_member_with_http_info(queue_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueMember' + return_type = opts[:debug_return_type] || "QueueMember" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_head_member", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_head_member", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_head_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a 10DLC SMS Brand @@ -1490,7 +1489,7 @@ def get_ten_dlc_sms_brand(brand_id, opts = {}) # @return [Array<(SMSTenDLCBrand, Integer, Hash)>] SMSTenDLCBrand data, response status code and response headers def get_ten_dlc_sms_brand_with_http_info(brand_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_brand ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_brand ..." end # verify the required parameter 'brand_id' is set @@ -1498,7 +1497,7 @@ def get_ten_dlc_sms_brand_with_http_info(brand_id, opts = {}) fail ArgumentError, "Missing the required parameter 'brand_id' when calling DefaultApi.get_ten_dlc_sms_brand" end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'brandId' + '}', CGI.escape(brand_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "brandId" + "}", CGI.escape(brand_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1506,7 +1505,7 @@ def get_ten_dlc_sms_brand_with_http_info(brand_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1515,26 +1514,26 @@ def get_ten_dlc_sms_brand_with_http_info(brand_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCBrand' + return_type = opts[:debug_return_type] || "SMSTenDLCBrand" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_brand", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_brand", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_brand\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get list of SMS 10DLC Brands @@ -1550,10 +1549,10 @@ def get_ten_dlc_sms_brands(opts = {}) # @return [Array<(SMSTenDLCBrandsListResult, Integer, Hash)>] SMSTenDLCBrandsListResult data, response status code and response headers def get_ten_dlc_sms_brands_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_brands ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_brands ..." end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/Brands'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/Brands".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1561,7 +1560,7 @@ def get_ten_dlc_sms_brands_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1570,26 +1569,26 @@ def get_ten_dlc_sms_brands_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCBrandsListResult' + return_type = opts[:debug_return_type] || "SMSTenDLCBrandsListResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_brands", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_brands", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_brands\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a 10DLC SMS Campaign @@ -1607,7 +1606,7 @@ def get_ten_dlc_sms_campaign(campaign_id, opts = {}) # @return [Array<(SMSTenDLCCampaign, Integer, Hash)>] SMSTenDLCCampaign data, response status code and response headers def get_ten_dlc_sms_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_campaign ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_campaign ..." end # verify the required parameter 'campaign_id' is set @@ -1615,7 +1614,7 @@ def get_ten_dlc_sms_campaign_with_http_info(campaign_id, opts = {}) fail ArgumentError, "Missing the required parameter 'campaign_id' when calling DefaultApi.get_ten_dlc_sms_campaign" end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "campaignId" + "}", CGI.escape(campaign_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1623,7 +1622,7 @@ def get_ten_dlc_sms_campaign_with_http_info(campaign_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1632,26 +1631,26 @@ def get_ten_dlc_sms_campaign_with_http_info(campaign_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCCampaign' + return_type = opts[:debug_return_type] || "SMSTenDLCCampaign" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_campaign", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_campaign", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get list of SMS 10DLC Campaigns @@ -1669,19 +1668,19 @@ def get_ten_dlc_sms_campaigns(opts = {}) # @return [Array<(SMSTenDLCCampaignsListResult, Integer, Hash)>] SMSTenDLCCampaignsListResult data, response status code and response headers def get_ten_dlc_sms_campaigns_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_campaigns ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_campaigns ..." end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/Campaigns'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/Campaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'brandId'] = opts[:'brand_id'] if !opts[:'brand_id'].nil? + query_params[:brandId] = opts[:brand_id] if !opts[:brand_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1690,26 +1689,26 @@ def get_ten_dlc_sms_campaigns_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCCampaignsListResult' + return_type = opts[:debug_return_type] || "SMSTenDLCCampaignsListResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_campaigns", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_campaigns", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a 10DLC SMS Partner Campaign @@ -1727,7 +1726,7 @@ def get_ten_dlc_sms_partner_campaign(campaign_id, opts = {}) # @return [Array<(SMSTenDLCPartnerCampaign, Integer, Hash)>] SMSTenDLCPartnerCampaign data, response status code and response headers def get_ten_dlc_sms_partner_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_partner_campaign ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_partner_campaign ..." end # verify the required parameter 'campaign_id' is set @@ -1735,7 +1734,7 @@ def get_ten_dlc_sms_partner_campaign_with_http_info(campaign_id, opts = {}) fail ArgumentError, "Missing the required parameter 'campaign_id' when calling DefaultApi.get_ten_dlc_sms_partner_campaign" end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "campaignId" + "}", CGI.escape(campaign_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1743,7 +1742,7 @@ def get_ten_dlc_sms_partner_campaign_with_http_info(campaign_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1752,26 +1751,26 @@ def get_ten_dlc_sms_partner_campaign_with_http_info(campaign_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCPartnerCampaign' + return_type = opts[:debug_return_type] || "SMSTenDLCPartnerCampaign" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_partner_campaign", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_partner_campaign", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_partner_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get list of SMS 10DLC Partner Campaigns @@ -1789,19 +1788,19 @@ def get_ten_dlc_sms_partner_campaigns(opts = {}) # @return [Array<(SMSTenDLCPartnerCampaignsListResult, Integer, Hash)>] SMSTenDLCPartnerCampaignsListResult data, response status code and response headers def get_ten_dlc_sms_partner_campaigns_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_ten_dlc_sms_partner_campaigns ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_partner_campaigns ..." end # resource path - local_var_path = '/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'brandId'] = opts[:'brand_id'] if !opts[:'brand_id'].nil? + query_params[:brandId] = opts[:brand_id] if !opts[:brand_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1810,26 +1809,26 @@ def get_ten_dlc_sms_partner_campaigns_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTenDLCPartnerCampaignsListResult' + return_type = opts[:debug_return_type] || "SMSTenDLCPartnerCampaignsListResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_ten_dlc_sms_partner_campaigns", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_ten_dlc_sms_partner_campaigns", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_ten_dlc_sms_partner_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get a TollFree SMS Campaign @@ -1847,7 +1846,7 @@ def get_toll_free_sms_campaign(campaign_id, opts = {}) # @return [Array<(SMSTollFreeCampaign, Integer, Hash)>] SMSTollFreeCampaign data, response status code and response headers def get_toll_free_sms_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_toll_free_sms_campaign ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_toll_free_sms_campaign ..." end # verify the required parameter 'campaign_id' is set @@ -1855,7 +1854,7 @@ def get_toll_free_sms_campaign_with_http_info(campaign_id, opts = {}) fail ArgumentError, "Missing the required parameter 'campaign_id' when calling DefaultApi.get_toll_free_sms_campaign" end # resource path - local_var_path = '/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "campaignId" + "}", CGI.escape(campaign_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1863,7 +1862,7 @@ def get_toll_free_sms_campaign_with_http_info(campaign_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1872,26 +1871,26 @@ def get_toll_free_sms_campaign_with_http_info(campaign_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTollFreeCampaign' + return_type = opts[:debug_return_type] || "SMSTollFreeCampaign" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_toll_free_sms_campaign", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_toll_free_sms_campaign", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_toll_free_sms_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Get list of TollFree Campaigns @@ -1907,10 +1906,10 @@ def get_toll_free_sms_campaigns(opts = {}) # @return [Array<(SMSTollFreeCampaignsListResult, Integer, Hash)>] SMSTollFreeCampaignsListResult data, response status code and response headers def get_toll_free_sms_campaigns_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_toll_free_sms_campaigns ...' + @api_client.config.logger.debug "Calling API: DefaultApi.get_toll_free_sms_campaigns ..." end # resource path - local_var_path = '/Accounts/{accountId}/Messages/TollFree/Campaigns'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages/TollFree/Campaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1918,7 +1917,7 @@ def get_toll_free_sms_campaigns_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1927,26 +1926,26 @@ def get_toll_free_sms_campaigns_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'SMSTollFreeCampaignsListResult' + return_type = opts[:debug_return_type] || "SMSTollFreeCampaignsListResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_toll_free_sms_campaigns", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_toll_free_sms_campaigns", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_toll_free_sms_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Active Queues @@ -1964,19 +1963,19 @@ def list_active_queues(opts = {}) # @return [Array<(QueueList, Integer, Hash)>] QueueList data, response status code and response headers def list_active_queues_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_active_queues ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_active_queues ..." end # resource path - local_var_path = '/Accounts/{accountId}/Queues'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'alias'] = opts[:'_alias'] if !opts[:'_alias'].nil? + query_params[:alias] = opts[:_alias] if !opts[:_alias].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -1985,26 +1984,26 @@ def list_active_queues_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueList' + return_type = opts[:debug_return_type] || "QueueList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_active_queues", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_active_queues", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_active_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List All Account Logs @@ -2020,10 +2019,10 @@ def list_all_account_logs(opts = {}) # @return [Array<(LogList, Integer, Hash)>] LogList data, response status code and response headers def list_all_account_logs_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_all_account_logs ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_all_account_logs ..." end # resource path - local_var_path = '/Accounts/{accountId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Logs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -2031,7 +2030,7 @@ def list_all_account_logs_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2040,26 +2039,26 @@ def list_all_account_logs_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'LogList' + return_type = opts[:debug_return_type] || "LogList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_all_account_logs", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_all_account_logs", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_all_account_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List applications @@ -2077,19 +2076,19 @@ def list_applications(opts = {}) # @return [Array<(ApplicationList, Integer, Hash)>] ApplicationList data, response status code and response headers def list_applications_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_applications ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_applications ..." end # resource path - local_var_path = '/Accounts/{accountId}/Applications'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Applications".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'alias'] = opts[:'_alias'] if !opts[:'_alias'].nil? + query_params[:alias] = opts[:_alias] if !opts[:_alias].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2098,26 +2097,26 @@ def list_applications_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ApplicationList' + return_type = opts[:debug_return_type] || "ApplicationList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_applications", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_applications", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List available numbers @@ -2127,11 +2126,11 @@ def list_applications_with_http_info(opts = {}) # @option opts [String] :country Country of this phone number. # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (default to true) # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (default to true) - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @return [AvailableNumberList] def list_available_numbers(opts = {}) data, _status_code, _headers = list_available_numbers_with_http_info(opts) @@ -2145,36 +2144,36 @@ def list_available_numbers(opts = {}) # @option opts [String] :country Country of this phone number. # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @return [Array<(AvailableNumberList, Integer, Hash)>] AvailableNumberList data, response status code and response headers def list_available_numbers_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_available_numbers ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_available_numbers ..." end # resource path - local_var_path = '/AvailablePhoneNumbers' + local_var_path = "/AvailablePhoneNumbers" # query parameters query_params = opts[:query_params] || {} - query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? - query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? - query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? - query_params[:'voiceEnabled'] = opts[:'voice_enabled'] if !opts[:'voice_enabled'].nil? - query_params[:'smsEnabled'] = opts[:'sms_enabled'] if !opts[:'sms_enabled'].nil? - query_params[:'capabilities.voice'] = opts[:'capabilities_voice'] if !opts[:'capabilities_voice'].nil? - query_params[:'capabilities.sms'] = opts[:'capabilities_sms'] if !opts[:'capabilities_sms'].nil? - query_params[:'capabilities.tollFree'] = opts[:'capabilities_toll_free'] if !opts[:'capabilities_toll_free'].nil? - query_params[:'capabilities.tenDLC'] = opts[:'capabilities_ten_dlc'] if !opts[:'capabilities_ten_dlc'].nil? - query_params[:'capabilities.shortCode'] = opts[:'capabilities_short_code'] if !opts[:'capabilities_short_code'].nil? + query_params[:phoneNumber] = opts[:phone_number] if !opts[:phone_number].nil? + query_params[:region] = opts[:region] if !opts[:region].nil? + query_params[:country] = opts[:country] if !opts[:country].nil? + query_params[:voiceEnabled] = opts[:voice_enabled] if !opts[:voice_enabled].nil? + query_params[:smsEnabled] = opts[:sms_enabled] if !opts[:sms_enabled].nil? + query_params[:"capabilities.voice"] = opts[:capabilities_voice] if !opts[:capabilities_voice].nil? + query_params[:"capabilities.sms"] = opts[:capabilities_sms] if !opts[:capabilities_sms].nil? + query_params[:"capabilities.tollFree"] = opts[:capabilities_toll_free] if !opts[:capabilities_toll_free].nil? + query_params[:"capabilities.tenDLC"] = opts[:capabilities_ten_dlc] if !opts[:capabilities_ten_dlc].nil? + query_params[:"capabilities.shortCode"] = opts[:capabilities_short_code] if !opts[:capabilities_short_code].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2183,26 +2182,26 @@ def list_available_numbers_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AvailableNumberList' + return_type = opts[:debug_return_type] || "AvailableNumberList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_available_numbers", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_available_numbers", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_available_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Call Logs @@ -2220,7 +2219,7 @@ def list_call_logs(call_id, opts = {}) # @return [Array<(LogList, Integer, Hash)>] LogList data, response status code and response headers def list_call_logs_with_http_info(call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_call_logs ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_call_logs ..." end # verify the required parameter 'call_id' is set @@ -2228,7 +2227,7 @@ def list_call_logs_with_http_info(call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.list_call_logs" end # resource path - local_var_path = '/Accounts/{accountId}/Calls/{callId}/Logs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls/{callId}/Logs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -2236,7 +2235,7 @@ def list_call_logs_with_http_info(call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2245,26 +2244,26 @@ def list_call_logs_with_http_info(call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'LogList' + return_type = opts[:debug_return_type] || "LogList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_call_logs", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_call_logs", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_call_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Call Recordings @@ -2284,7 +2283,7 @@ def list_call_recordings(call_id, opts = {}) # @return [Array<(RecordingList, Integer, Hash)>] RecordingList data, response status code and response headers def list_call_recordings_with_http_info(call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_call_recordings ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_call_recordings ..." end # verify the required parameter 'call_id' is set @@ -2292,16 +2291,16 @@ def list_call_recordings_with_http_info(call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.list_call_recordings" end # resource path - local_var_path = '/Accounts/{accountId}/Calls/{callId}/Recordings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls/{callId}/Recordings".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'dateCreated'] = opts[:'date_created'] if !opts[:'date_created'].nil? + query_params[:dateCreated] = opts[:date_created] if !opts[:date_created].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2310,26 +2309,26 @@ def list_call_recordings_with_http_info(call_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'RecordingList' + return_type = opts[:debug_return_type] || "RecordingList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_call_recordings", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_call_recordings", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_call_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Calls @@ -2361,30 +2360,30 @@ def list_calls(opts = {}) # @return [Array<(CallList, Integer, Hash)>] CallList data, response status code and response headers def list_calls_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_calls ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_calls ..." end - if @api_client.config.client_side_validation && !opts[:'application_id'].nil? && opts[:'application_id'].length > 16 + if @api_client.config.client_side_validation && !opts[:application_id].nil? && opts[:application_id].length > 16 fail ArgumentError, 'invalid value for "opts[:"application_id"]" when calling DefaultApi.list_calls, number of items must be less than or equal to 16.' end # resource path - local_var_path = '/Accounts/{accountId}/Calls'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil? - query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? - query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? - query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? - query_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil? - query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil? - query_params[:'parentCallId'] = opts[:'parent_call_id'] if !opts[:'parent_call_id'].nil? - query_params[:'applicationId'] = @api_client.build_collection_param(opts[:'application_id'], :multi) if !opts[:'application_id'].nil? + query_params[:active] = opts[:active] if !opts[:active].nil? + query_params[:to] = opts[:to] if !opts[:to].nil? + query_params[:from] = opts[:from] if !opts[:from].nil? + query_params[:status] = opts[:status] if !opts[:status].nil? + query_params[:startTime] = opts[:start_time] if !opts[:start_time].nil? + query_params[:endTime] = opts[:end_time] if !opts[:end_time].nil? + query_params[:parentCallId] = opts[:parent_call_id] if !opts[:parent_call_id].nil? + query_params[:applicationId] = @api_client.build_collection_param(opts[:application_id], :multi) if !opts[:application_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2393,26 +2392,26 @@ def list_calls_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CallList' + return_type = opts[:debug_return_type] || "CallList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_calls", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_calls", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_calls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Conference Recordings @@ -2434,7 +2433,7 @@ def list_conference_recordings(conference_id, opts = {}) # @return [Array<(RecordingList, Integer, Hash)>] RecordingList data, response status code and response headers def list_conference_recordings_with_http_info(conference_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_conference_recordings ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_conference_recordings ..." end # verify the required parameter 'conference_id' is set @@ -2442,17 +2441,17 @@ def list_conference_recordings_with_http_info(conference_id, opts = {}) fail ArgumentError, "Missing the required parameter 'conference_id' when calling DefaultApi.list_conference_recordings" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}/Recordings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'callId'] = opts[:'call_id'] if !opts[:'call_id'].nil? - query_params[:'dateCreated'] = opts[:'date_created'] if !opts[:'date_created'].nil? + query_params[:callId] = opts[:call_id] if !opts[:call_id].nil? + query_params[:dateCreated] = opts[:date_created] if !opts[:date_created].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2461,26 +2460,26 @@ def list_conference_recordings_with_http_info(conference_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'RecordingList' + return_type = opts[:debug_return_type] || "RecordingList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_conference_recordings", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_conference_recordings", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_conference_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Conferences @@ -2504,22 +2503,22 @@ def list_conferences(opts = {}) # @return [Array<(ConferenceList, Integer, Hash)>] ConferenceList data, response status code and response headers def list_conferences_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_conferences ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_conferences ..." end # resource path - local_var_path = '/Accounts/{accountId}/Conferences'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? - query_params[:'alias'] = opts[:'_alias'] if !opts[:'_alias'].nil? - query_params[:'dateCreated'] = opts[:'date_created'] if !opts[:'date_created'].nil? - query_params[:'dateUpdated'] = opts[:'date_updated'] if !opts[:'date_updated'].nil? + query_params[:status] = opts[:status] if !opts[:status].nil? + query_params[:alias] = opts[:_alias] if !opts[:_alias].nil? + query_params[:dateCreated] = opts[:date_created] if !opts[:date_created].nil? + query_params[:dateUpdated] = opts[:date_updated] if !opts[:date_updated].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2528,26 +2527,26 @@ def list_conferences_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ConferenceList' + return_type = opts[:debug_return_type] || "ConferenceList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_conferences", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_conferences", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_conferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Incoming Numbers @@ -2561,11 +2560,11 @@ def list_conferences_with_http_info(opts = {}) # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (default to true) # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (default to true) # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @option opts [String] :tfn_campaign_id Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. # @option opts [Boolean] :offnet Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. # @return [IncomingNumberList] @@ -2585,44 +2584,44 @@ def list_incoming_numbers(opts = {}) # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @option opts [String] :tfn_campaign_id Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. # @option opts [Boolean] :offnet Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. # @return [Array<(IncomingNumberList, Integer, Hash)>] IncomingNumberList data, response status code and response headers def list_incoming_numbers_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_incoming_numbers ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_incoming_numbers ..." end # resource path - local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? - query_params[:'alias'] = opts[:'_alias'] if !opts[:'_alias'].nil? - query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil? - query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? - query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil? - query_params[:'hasApplication'] = opts[:'has_application'] if !opts[:'has_application'].nil? - query_params[:'voiceEnabled'] = opts[:'voice_enabled'] if !opts[:'voice_enabled'].nil? - query_params[:'smsEnabled'] = opts[:'sms_enabled'] if !opts[:'sms_enabled'].nil? - query_params[:'hasCampaign'] = opts[:'has_campaign'] if !opts[:'has_campaign'].nil? - query_params[:'capabilities.voice'] = opts[:'capabilities_voice'] if !opts[:'capabilities_voice'].nil? - query_params[:'capabilities.sms'] = opts[:'capabilities_sms'] if !opts[:'capabilities_sms'].nil? - query_params[:'capabilities.tollFree'] = opts[:'capabilities_toll_free'] if !opts[:'capabilities_toll_free'].nil? - query_params[:'capabilities.tenDLC'] = opts[:'capabilities_ten_dlc'] if !opts[:'capabilities_ten_dlc'].nil? - query_params[:'capabilities.shortCode'] = opts[:'capabilities_short_code'] if !opts[:'capabilities_short_code'].nil? - query_params[:'tfn.campaignId'] = opts[:'tfn_campaign_id'] if !opts[:'tfn_campaign_id'].nil? - query_params[:'offnet'] = opts[:'offnet'] if !opts[:'offnet'].nil? + query_params[:phoneNumber] = opts[:phone_number] if !opts[:phone_number].nil? + query_params[:alias] = opts[:_alias] if !opts[:_alias].nil? + query_params[:region] = opts[:region] if !opts[:region].nil? + query_params[:country] = opts[:country] if !opts[:country].nil? + query_params[:applicationId] = opts[:application_id] if !opts[:application_id].nil? + query_params[:hasApplication] = opts[:has_application] if !opts[:has_application].nil? + query_params[:voiceEnabled] = opts[:voice_enabled] if !opts[:voice_enabled].nil? + query_params[:smsEnabled] = opts[:sms_enabled] if !opts[:sms_enabled].nil? + query_params[:hasCampaign] = opts[:has_campaign] if !opts[:has_campaign].nil? + query_params[:"capabilities.voice"] = opts[:capabilities_voice] if !opts[:capabilities_voice].nil? + query_params[:"capabilities.sms"] = opts[:capabilities_sms] if !opts[:capabilities_sms].nil? + query_params[:"capabilities.tollFree"] = opts[:capabilities_toll_free] if !opts[:capabilities_toll_free].nil? + query_params[:"capabilities.tenDLC"] = opts[:capabilities_ten_dlc] if !opts[:capabilities_ten_dlc].nil? + query_params[:"capabilities.shortCode"] = opts[:capabilities_short_code] if !opts[:capabilities_short_code].nil? + query_params[:"tfn.campaignId"] = opts[:tfn_campaign_id] if !opts[:tfn_campaign_id].nil? + query_params[:offnet] = opts[:offnet] if !opts[:offnet].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2631,26 +2630,26 @@ def list_incoming_numbers_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncomingNumberList' + return_type = opts[:debug_return_type] || "IncomingNumberList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_incoming_numbers", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_incoming_numbers", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_incoming_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Members @@ -2668,7 +2667,7 @@ def list_members(queue_id, opts = {}) # @return [Array<(QueueMemberList, Integer, Hash)>] QueueMemberList data, response status code and response headers def list_members_with_http_info(queue_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_members ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_members ..." end # verify the required parameter 'queue_id' is set @@ -2676,7 +2675,7 @@ def list_members_with_http_info(queue_id, opts = {}) fail ArgumentError, "Missing the required parameter 'queue_id' when calling DefaultApi.list_members" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}/Members'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}/Members".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -2684,7 +2683,7 @@ def list_members_with_http_info(queue_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2693,26 +2692,26 @@ def list_members_with_http_info(queue_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'QueueMemberList' + return_type = opts[:debug_return_type] || "QueueMemberList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_members", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_members", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Participants @@ -2736,7 +2735,7 @@ def list_participants(conference_id, opts = {}) # @return [Array<(ConferenceParticipantList, Integer, Hash)>] ConferenceParticipantList data, response status code and response headers def list_participants_with_http_info(conference_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_participants ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_participants ..." end # verify the required parameter 'conference_id' is set @@ -2744,18 +2743,18 @@ def list_participants_with_http_info(conference_id, opts = {}) fail ArgumentError, "Missing the required parameter 'conference_id' when calling DefaultApi.list_participants" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}/Participants'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'talk'] = opts[:'talk'] if !opts[:'talk'].nil? - query_params[:'listen'] = opts[:'listen'] if !opts[:'listen'].nil? - query_params[:'dtmfPassThrough'] = opts[:'dtmf_pass_through'] if !opts[:'dtmf_pass_through'].nil? + query_params[:talk] = opts[:talk] if !opts[:talk].nil? + query_params[:listen] = opts[:listen] if !opts[:listen].nil? + query_params[:dtmfPassThrough] = opts[:dtmf_pass_through] if !opts[:dtmf_pass_through].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2764,26 +2763,26 @@ def list_participants_with_http_info(conference_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ConferenceParticipantList' + return_type = opts[:debug_return_type] || "ConferenceParticipantList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_participants", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_participants", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List Recordings @@ -2805,21 +2804,21 @@ def list_recordings(opts = {}) # @return [Array<(RecordingList, Integer, Hash)>] RecordingList data, response status code and response headers def list_recordings_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_recordings ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_recordings ..." end # resource path - local_var_path = '/Accounts/{accountId}/Recordings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Recordings".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'callId'] = opts[:'call_id'] if !opts[:'call_id'].nil? - query_params[:'conferenceId'] = opts[:'conference_id'] if !opts[:'conference_id'].nil? - query_params[:'dateCreated'] = opts[:'date_created'] if !opts[:'date_created'].nil? + query_params[:callId] = opts[:call_id] if !opts[:call_id].nil? + query_params[:conferenceId] = opts[:conference_id] if !opts[:conference_id].nil? + query_params[:dateCreated] = opts[:date_created] if !opts[:date_created].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2828,26 +2827,26 @@ def list_recordings_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'RecordingList' + return_type = opts[:debug_return_type] || "RecordingList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_recordings", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_recordings", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # List SMS Messages @@ -2879,26 +2878,26 @@ def list_sms_messages(opts = {}) # @return [Array<(MessagesList, Integer, Hash)>] MessagesList data, response status code and response headers def list_sms_messages_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.list_sms_messages ...' + @api_client.config.logger.debug "Calling API: DefaultApi.list_sms_messages ..." end # resource path - local_var_path = '/Accounts/{accountId}/Messages'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? - query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? - query_params[:'beginTime'] = opts[:'begin_time'] if !opts[:'begin_time'].nil? - query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil? - query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? - query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? - query_params[:'brandId'] = opts[:'brand_id'] if !opts[:'brand_id'].nil? - query_params[:'is10DLC'] = opts[:'is10_dlc'] if !opts[:'is10_dlc'].nil? + query_params[:to] = opts[:to] if !opts[:to].nil? + query_params[:from] = opts[:from] if !opts[:from].nil? + query_params[:beginTime] = opts[:begin_time] if !opts[:begin_time].nil? + query_params[:endTime] = opts[:end_time] if !opts[:end_time].nil? + query_params[:direction] = opts[:direction] if !opts[:direction].nil? + query_params[:campaignId] = opts[:campaign_id] if !opts[:campaign_id].nil? + query_params[:brandId] = opts[:brand_id] if !opts[:brand_id].nil? + query_params[:is10DLC] = opts[:is10_dlc] if !opts[:is10_dlc].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} @@ -2907,26 +2906,26 @@ def list_sms_messages_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MessagesList' + return_type = opts[:debug_return_type] || "MessagesList" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.list_sms_messages", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.list_sms_messages", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#list_sms_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Make a Call @@ -2944,10 +2943,10 @@ def make_a_call(opts = {}) # @return [Array<(CallResult, Integer, Hash)>] CallResult data, response status code and response headers def make_a_call_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.make_a_call ...' + @api_client.config.logger.debug "Calling API: DefaultApi.make_a_call ..." end # resource path - local_var_path = '/Accounts/{accountId}/Calls'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -2955,40 +2954,40 @@ def make_a_call_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'make_call_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:make_call_request]) # return_type - return_type = opts[:debug_return_type] || 'CallResult' + return_type = opts[:debug_return_type] || "CallResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.make_a_call", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.make_a_call", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#make_a_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Make a JWT for WebRTC calling @@ -3006,7 +3005,7 @@ def make_a_webrtc_jwt(create_web_rtc_token, opts = {}) # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.make_a_webrtc_jwt ...' + @api_client.config.logger.debug "Calling API: DefaultApi.make_a_webrtc_jwt ..." end # verify the required parameter 'create_web_rtc_token' is set @@ -3014,7 +3013,7 @@ def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) fail ArgumentError, "Missing the required parameter 'create_web_rtc_token' when calling DefaultApi.make_a_webrtc_jwt" end # resource path - local_var_path = '/Accounts/{accountId}/Calls/WebRTC/Token'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls/WebRTC/Token".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3022,11 +3021,11 @@ def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['text/plain']) + header_params["Accept"] = @api_client.select_header_accept(["text/plain"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -3036,26 +3035,26 @@ def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_web_rtc_token) # return_type - return_type = opts[:debug_return_type] || 'String' + return_type = opts[:debug_return_type] || "String" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.make_a_webrtc_jwt", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.make_a_webrtc_jwt", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#make_a_webrtc_jwt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Remove a Participant @@ -3075,7 +3074,7 @@ def remove_a_participant(conference_id, call_id, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def remove_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.remove_a_participant ...' + @api_client.config.logger.debug "Calling API: DefaultApi.remove_a_participant ..." end # verify the required parameter 'conference_id' is set @@ -3088,7 +3087,7 @@ def remove_a_participant_with_http_info(conference_id, call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.remove_a_participant" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3106,23 +3105,23 @@ def remove_a_participant_with_http_info(conference_id, call_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.remove_a_participant", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.remove_a_participant", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#remove_a_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Send an SMS Message @@ -3140,7 +3139,7 @@ def send_an_sms_message(message_request, opts = {}) # @return [Array<(MessageResult, Integer, Hash)>] MessageResult data, response status code and response headers def send_an_sms_message_with_http_info(message_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.send_an_sms_message ...' + @api_client.config.logger.debug "Calling API: DefaultApi.send_an_sms_message ..." end # verify the required parameter 'message_request' is set @@ -3148,7 +3147,7 @@ def send_an_sms_message_with_http_info(message_request, opts = {}) fail ArgumentError, "Missing the required parameter 'message_request' when calling DefaultApi.send_an_sms_message" end # resource path - local_var_path = '/Accounts/{accountId}/Messages'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}/Messages".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3156,11 +3155,11 @@ def send_an_sms_message_with_http_info(message_request, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -3170,26 +3169,26 @@ def send_an_sms_message_with_http_info(message_request, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(message_request) # return_type - return_type = opts[:debug_return_type] || 'MessageResult' + return_type = opts[:debug_return_type] || "MessageResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.send_an_sms_message", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.send_an_sms_message", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#send_an_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Stream a Recording File @@ -3207,7 +3206,7 @@ def stream_a_recording_file(recording_id, opts = {}) # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers def stream_a_recording_file_with_http_info(recording_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.stream_a_recording_file ...' + @api_client.config.logger.debug "Calling API: DefaultApi.stream_a_recording_file ..." end # verify the required parameter 'recording_id' is set @@ -3215,7 +3214,7 @@ def stream_a_recording_file_with_http_info(recording_id, opts = {}) fail ArgumentError, "Missing the required parameter 'recording_id' when calling DefaultApi.stream_a_recording_file" end # resource path - local_var_path = '/Accounts/{accountId}/Recordings/{recordingId}/Stream'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s)) + local_var_path = "/Accounts/{accountId}/Recordings/{recordingId}/Stream".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "recordingId" + "}", CGI.escape(recording_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3223,7 +3222,7 @@ def stream_a_recording_file_with_http_info(recording_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['audio/x-wav']) + header_params["Accept"] = @api_client.select_header_accept(["audio/x-wav"]) # form parameters form_params = opts[:form_params] || {} @@ -3232,26 +3231,26 @@ def stream_a_recording_file_with_http_info(recording_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'File' + return_type = opts[:debug_return_type] || "File" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.stream_a_recording_file", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.stream_a_recording_file", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stream_a_recording_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update a Conference @@ -3271,7 +3270,7 @@ def update_a_conference(conference_id, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def update_a_conference_with_http_info(conference_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_a_conference ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_a_conference ..." end # verify the required parameter 'conference_id' is set @@ -3279,7 +3278,7 @@ def update_a_conference_with_http_info(conference_id, opts = {}) fail ArgumentError, "Missing the required parameter 'conference_id' when calling DefaultApi.update_a_conference" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3287,38 +3286,38 @@ def update_a_conference_with_http_info(conference_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_conference_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:update_conference_request]) # return_type return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_a_conference", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_a_conference", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_a_conference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update a Live Call @@ -3338,7 +3337,7 @@ def update_a_live_call(call_id, update_call_request, opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def update_a_live_call_with_http_info(call_id, update_call_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_a_live_call ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_a_live_call ..." end # verify the required parameter 'call_id' is set @@ -3351,7 +3350,7 @@ def update_a_live_call_with_http_info(call_id, update_call_request, opts = {}) fail ArgumentError, "Missing the required parameter 'update_call_request' when calling DefaultApi.update_a_live_call" end # resource path - local_var_path = '/Accounts/{accountId}/Calls/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Calls/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3359,9 +3358,9 @@ def update_a_live_call_with_http_info(call_id, update_call_request, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -3374,23 +3373,23 @@ def update_a_live_call_with_http_info(call_id, update_call_request, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_a_live_call", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_a_live_call", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_a_live_call\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update a Participant @@ -3412,7 +3411,7 @@ def update_a_participant(conference_id, call_id, opts = {}) # @return [Array<(ConferenceParticipantResult, Integer, Hash)>] ConferenceParticipantResult data, response status code and response headers def update_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_a_participant ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_a_participant ..." end # verify the required parameter 'conference_id' is set @@ -3425,7 +3424,7 @@ def update_a_participant_with_http_info(conference_id, call_id, opts = {}) fail ArgumentError, "Missing the required parameter 'call_id' when calling DefaultApi.update_a_participant" end # resource path - local_var_path = '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'conferenceId' + '}', CGI.escape(conference_id.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)) + local_var_path = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "conferenceId" + "}", CGI.escape(conference_id.to_s)).sub("{" + "callId" + "}", CGI.escape(call_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3433,40 +3432,40 @@ def update_a_participant_with_http_info(conference_id, call_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_conference_participant_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:update_conference_participant_request]) # return_type - return_type = opts[:debug_return_type] || 'ConferenceParticipantResult' + return_type = opts[:debug_return_type] || "ConferenceParticipantResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_a_participant", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_a_participant", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_a_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update a Queue @@ -3486,7 +3485,7 @@ def update_a_queue(queue_id, opts = {}) # @return [Array<(QueueResult, Integer, Hash)>] QueueResult data, response status code and response headers def update_a_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_a_queue ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_a_queue ..." end # verify the required parameter 'queue_id' is set @@ -3494,7 +3493,7 @@ def update_a_queue_with_http_info(queue_id, opts = {}) fail ArgumentError, "Missing the required parameter 'queue_id' when calling DefaultApi.update_a_queue" end # resource path - local_var_path = '/Accounts/{accountId}/Queues/{queueId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'queueId' + '}', CGI.escape(queue_id.to_s)) + local_var_path = "/Accounts/{accountId}/Queues/{queueId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "queueId" + "}", CGI.escape(queue_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3502,40 +3501,40 @@ def update_a_queue_with_http_info(queue_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'queue_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:queue_request]) # return_type - return_type = opts[:debug_return_type] || 'QueueResult' + return_type = opts[:debug_return_type] || "QueueResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_a_queue", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_a_queue", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_a_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Manage an account @@ -3553,10 +3552,10 @@ def update_an_account(opts = {}) # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def update_an_account_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_an_account ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_an_account ..." end # resource path - local_var_path = '/Accounts/{accountId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) + local_var_path = "/Accounts/{accountId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3564,38 +3563,38 @@ def update_an_account_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'account_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:account_request]) # return_type return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_an_account", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_an_account", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_an_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update an application @@ -3615,7 +3614,7 @@ def update_an_application(application_id, opts = {}) # @return [Array<(ApplicationResult, Integer, Hash)>] ApplicationResult data, response status code and response headers def update_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_an_application ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_an_application ..." end # verify the required parameter 'application_id' is set @@ -3623,7 +3622,7 @@ def update_an_application_with_http_info(application_id, opts = {}) fail ArgumentError, "Missing the required parameter 'application_id' when calling DefaultApi.update_an_application" end # resource path - local_var_path = '/Accounts/{accountId}/Applications/{applicationId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s)) + local_var_path = "/Accounts/{accountId}/Applications/{applicationId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "applicationId" + "}", CGI.escape(application_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3631,40 +3630,40 @@ def update_an_application_with_http_info(application_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'application_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:application_request]) # return_type - return_type = opts[:debug_return_type] || 'ApplicationResult' + return_type = opts[:debug_return_type] || "ApplicationResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_an_application", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_an_application", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_an_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end # Update an Incoming Number @@ -3684,7 +3683,7 @@ def update_an_incoming_number(phone_number_id, opts = {}) # @return [Array<(IncomingNumberResult, Integer, Hash)>] IncomingNumberResult data, response status code and response headers def update_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.update_an_incoming_number ...' + @api_client.config.logger.debug "Calling API: DefaultApi.update_an_incoming_number ..." end # verify the required parameter 'phone_number_id' is set @@ -3692,7 +3691,7 @@ def update_an_incoming_number_with_http_info(phone_number_id, opts = {}) fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling DefaultApi.update_an_incoming_number" end # resource path - local_var_path = '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) + local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "phoneNumberId" + "}", CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -3700,46 +3699,47 @@ def update_an_incoming_number_with_http_info(phone_number_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'incoming_number_request']) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:incoming_number_request]) # return_type - return_type = opts[:debug_return_type] || 'IncomingNumberResult' + return_type = opts[:debug_return_type] || "IncomingNumberResult" # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.update_an_incoming_number", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.update_an_incoming_number", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_an_incoming_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end + def get_next_page_with_http_info(response, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_next_page ...' - end - + @api_client.config.logger.debug "Calling API: DefaultApi.get_next_page ..." + end + # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && response.nil? fail ArgumentError, "Missing the required parameter 'response' when calling DefaultApi.get_next_page" @@ -3753,11 +3753,11 @@ def get_next_page_with_http_info(response, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(["application/json"]) if !content_type.nil? - header_params['Content-Type'] = content_type + header_params["Content-Type"] = content_type end # form parameters @@ -3770,23 +3770,23 @@ def get_next_page_with_http_info(response, opts = {}) return_type = opts[:debug_return_type] || response.class.name # auth_names - auth_names = opts[:debug_auth_names] || ['fc'] + auth_names = opts[:debug_auth_names] || ["fc"] new_options = opts.merge( - :operation => :"DefaultApi.get_next_page", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type + operation: :"DefaultApi.get_next_page", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_next_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data, status_code, headers + [data, status_code, headers] end def get_next_page(response, opts = {}) diff --git a/lib/freeclimb/api_client.rb b/lib/freeclimb/api_client.rb index f4e87e70..9881fcf8 100644 --- a/lib/freeclimb/api_client.rb +++ b/lib/freeclimb/api_client.rb @@ -1,21 +1,19 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'json' -require 'logger' -require 'tempfile' -require 'time' -require 'typhoeus' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "json" +require "logger" +require "tempfile" +require "time" +require "typhoeus" module Freeclimb class ApiClient @@ -33,8 +31,8 @@ def initialize(config = Configuration.default) @config = config @user_agent = "OpenAPI-Generator/#{VERSION}/ruby" @default_headers = { - 'Content-Type' => 'application/json', - 'User-Agent' => @user_agent + "Content-Type" => "application/json", + "User-Agent" => @user_agent } end @@ -56,25 +54,23 @@ def call_api(http_method, path, opts = {}) unless response.success? if response.timed_out? - fail ApiError.new('Connection timed out') + fail ApiError.new("Connection timed out") elsif response.code == 0 # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) + fail ApiError.new(code: 0, + message: response.return_message) else - fail ApiError.new(:code => response.code, - :response_headers => response.headers, - :response_body => response.body), - response.status_message + fail ApiError.new(code: response.code, + response_headers: response.headers, + response_body: response.body), + response.status_message end end - if opts[:return_type] - data = deserialize(response, opts[:return_type]) - else - data = nil + data = if opts[:return_type] + deserialize(response, opts[:return_type]) end - return data, response.code, response.headers + [data, response.code, response.headers] end # Builds the HTTP request @@ -100,16 +96,16 @@ def build_request(http_method, path, opts = {}) _verify_ssl_host = @config.verify_ssl_host ? 2 : 0 req_opts = { - :method => http_method, - :headers => header_params, - :params => query_params, - :params_encoding => @config.params_encoding, - :timeout => @config.timeout, - :ssl_verifypeer => @config.verify_ssl, - :ssl_verifyhost => _verify_ssl_host, - :sslcert => @config.cert_file, - :sslkey => @config.key_file, - :verbose => @config.debugging + method: http_method, + headers: header_params, + params: query_params, + params_encoding: @config.params_encoding, + timeout: @config.timeout, + ssl_verifypeer: @config.verify_ssl, + ssl_verifyhost: _verify_ssl_host, + sslcert: @config.cert_file, + sslkey: @config.key_file, + verbose: @config.debugging } # set custom cert, if provided @@ -117,14 +113,14 @@ def build_request(http_method, path, opts = {}) if [:post, :patch, :put, :delete].include?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) - req_opts.update :body => req_body + req_opts.update body: req_body if @config.debugging @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" end end request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' + download_file(request) if opts[:return_type] == "File" request end @@ -136,16 +132,16 @@ def build_request(http_method, path, opts = {}) # @return [String] HTTP body data in the form of string def build_request_body(header_params, form_params, body) # http form - if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || - header_params['Content-Type'] == 'multipart/form-data' + if header_params["Content-Type"] == "application/x-www-form-urlencoded" || + header_params["Content-Type"] == "multipart/form-data" data = {} form_params.each do |key, value| - case value + data[key] = case value when ::File, ::Array, nil # let typhoeus handle File, Array and nil parameters - data[key] = value + value else - data[key] = value.to_s + value.to_s end end elsif body @@ -167,14 +163,14 @@ def download_file(request) tempfile = nil encoding = nil request.on_headers do |response| - content_disposition = response.headers['Content-Disposition'] + content_disposition = response.headers["Content-Disposition"] if content_disposition && content_disposition =~ /filename=/i filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] prefix = sanitize_filename(filename) else - prefix = 'download-' + prefix = "download-" end - prefix = prefix + '-' unless prefix.end_with?('-') + prefix += "-" unless prefix.end_with?("-") encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) @tempfile = tempfile @@ -186,9 +182,9 @@ def download_file(request) request.on_complete do |response| if tempfile tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder " \ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file " \ + "will be deleted automatically with GC. It's also recommended to delete the temp file " \ "explicitly with `tempfile.delete`" end end @@ -203,7 +199,7 @@ def download_file(request) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -215,22 +211,22 @@ def deserialize(response, return_type) # handle file downloading - return the File instance processed in request callbacks # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' + return @tempfile if return_type == "File" return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body if return_type == "String" # ensuring a default content type - content_type = response.headers['Content-Type'] || 'application/json' + content_type = response.headers["Content-Type"] || "application/json" fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) begin - data = JSON.parse("[#{body}]", :symbolize_names => true)[0] + data = JSON.parse("[#{body}]", symbolize_names: true)[0] rescue JSON::ParserError => e - if %w(String Date Time).include?(return_type) + if %w[String Date Time].include?(return_type) data = body else raise e @@ -247,28 +243,28 @@ def deserialize(response, return_type) def convert_to_type(data, return_type) return nil if data.nil? case return_type - when 'String' + when "String" data.to_s - when 'Integer' + when "Integer" data.to_i - when 'Float' + when "Float" data.to_f - when 'Boolean' + when "Boolean" data == true - when 'Time' + when "Time" # parse date time (expecting ISO 8601 format) Time.parse data - when 'Date' + when "Date" # parse date time (expecting ISO 8601 format) Date.parse data - when 'Object' + when "Object" # generic object (usually a Hash), return directly data when /\AArray<(.+)>\z/ # e.g. Array sub_type = $1 data.map { |item| convert_to_type(item, sub_type) } - when /\AHash\\z/ + when /\AHash\z/ # e.g. Hash sub_type = $1 {}.tap do |hash| @@ -287,12 +283,12 @@ def convert_to_type(data, return_type) # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.gsub(/.*[\/\\]/, "") end def build_request_url(path, opts = {}) # Add leading and trailing slashes to path - path = "/#{path}".gsub(/\/+/, '/') + path = "/#{path}".squeeze("/") @config.base_url(opts[:operation]) + path end @@ -306,9 +302,9 @@ def update_params_for_auth!(header_params, query_params, auth_names) auth_setting = @config.auth_settings[auth_name] next unless auth_setting case auth_setting[:in] - when 'header' then header_params[auth_setting[:key]] = auth_setting[:value] - when 'query' then query_params[auth_setting[:key]] = auth_setting[:value] - else fail ArgumentError, 'Authentication token must be in `query` or `header`' + when "header" then header_params[auth_setting[:key]] = auth_setting[:value] + when "query" then query_params[auth_setting[:key]] = auth_setting[:value] + else fail ArgumentError, "Authentication token must be in `query` or `header`" end end end @@ -318,7 +314,7 @@ def update_params_for_auth!(header_params, query_params, auth_names) # @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0) def user_agent=(user_agent) @user_agent = user_agent - @default_headers['User-Agent'] = @user_agent + @default_headers["User-Agent"] = @user_agent end # Return Accept header based on an array of accepts provided. @@ -328,7 +324,7 @@ def select_header_accept(accepts) return nil if accepts.nil? || accepts.empty? # use JSON when present, otherwise use all of the provided json_accept = accepts.find { |s| json_mime?(s) } - json_accept || accepts.join(',') + json_accept || accepts.join(",") end # Return Content-Type header based on an array of content types provided. @@ -347,11 +343,10 @@ def select_header_content_type(content_types) # @return [String] JSON string representation of the object def object_to_http_body(model) return model if model.nil? || model.is_a?(String) - local_body = nil - if model.is_a?(Array) - local_body = model.map { |m| object_to_hash(m) } + local_body = if model.is_a?(Array) + model.map { |m| object_to_hash(m) } else - local_body = object_to_hash(model) + object_to_hash(model) end local_body.to_json end @@ -372,13 +367,13 @@ def object_to_hash(obj) def build_collection_param(param, collection_format) case collection_format when :csv - param.join(',') + param.join(",") when :ssv - param.join(' ') + param.join(" ") when :tsv param.join("\t") when :pipes - param.join('|') + param.join("|") when :multi # return the array directly as typhoeus will handle it as expected param diff --git a/lib/freeclimb/api_error.rb b/lib/freeclimb/api_error.rb index 5106037d..1b63d4d9 100644 --- a/lib/freeclimb/api_error.rb +++ b/lib/freeclimb/api_error.rb @@ -1,14 +1,12 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# module Freeclimb class ApiError < StandardError @@ -21,17 +19,17 @@ class ApiError < StandardError # ApiError.new(:code => 404, :message => "Not Found") def initialize(arg = nil) if arg.is_a? Hash - if arg.key?(:message) || arg.key?('message') - super(arg[:message] || arg['message']) + if arg.key?(:message) || arg.key?("message") + super(arg[:message] || arg["message"]) else - super arg + super end arg.each do |k, v| - instance_variable_set "@#{k}", v + instance_variable_set :"@#{k}", v end else - super arg + super end end @@ -41,10 +39,10 @@ def to_s end def message - if @message.nil? - msg = "Error message: the server returns an error" + msg = if @message.nil? + "Error message: the server returns an error" else - msg = @message + @message end msg += "\nHTTP status code: #{code}" if code diff --git a/lib/freeclimb/configuration.rb b/lib/freeclimb/configuration.rb index 93db346e..76cc3717 100644 --- a/lib/freeclimb/configuration.rb +++ b/lib/freeclimb/configuration.rb @@ -1,14 +1,12 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# module Freeclimb class Configuration @@ -138,9 +136,9 @@ class Configuration attr_accessor :force_ending_format def initialize - @scheme = 'https' - @host = 'www.freeclimb.com' - @base_path = '/apiserver' + @scheme = "https" + @host = "www.freeclimb.com" + @base_path = "/apiserver" @server_index = 0 @server_operation_index = {} @server_variables = {} @@ -173,24 +171,24 @@ def configure def scheme=(scheme) # remove :// from scheme - @scheme = scheme.sub(/:\/\//, '') + @scheme = scheme.sub("://", "") end def host=(host) # remove http(s):// and anything after a slash - @host = host.sub(/https?:\/\//, '').split('/').first + @host = host.sub(/https?:\/\//, "").split("/").first end def base_path=(base_path) # Add leading and trailing slashes to base_path - @base_path = "/#{base_path}".gsub(/\/+/, '/') - @base_path = '' if @base_path == '/' + @base_path = "/#{base_path}".squeeze("/") + @base_path = "" if @base_path == "/" end # Returns base URL for specified operation based on server settings def base_url(operation = nil) index = server_operation_index.fetch(operation, server_index) - return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil + return "#{scheme}://#{[host, base_path].join("/").squeeze("/")}".sub(/\/+\z/, "") if index.nil? server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) end @@ -209,19 +207,19 @@ def api_key_with_prefix(param_name, param_alias = nil) # Gets Basic Auth token string def basic_auth_token - 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") + "Basic " + ["#{username}:#{password}"].pack("m").delete("\r\n") end # Returns Auth Settings hash for api client. def auth_settings { - 'fc' => + "fc" => { - type: 'basic', - in: 'header', - key: 'Authorization', + type: "basic", + in: "header", + key: "Authorization", value: basic_auth_token - }, + } } end @@ -230,7 +228,7 @@ def server_settings [ { url: "https://www.freeclimb.com/apiserver", - description: "No description provided", + description: "No description provided" } ] end @@ -244,10 +242,10 @@ def operation_server_settings # @param index array index of the server settings # @param variables hash of variable and the corresponding value def server_url(index, variables = {}, servers = nil) - servers = server_settings if servers == nil + servers = server_settings if servers.nil? # check array index out of bound - if (index < 0 || index >= servers.size) + if index < 0 || index >= servers.size fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" end @@ -259,7 +257,7 @@ def server_url(index, variables = {}, servers = nil) # go through variable and assign a value server[:variables].each do |name, variable| if variables.key?(name) - if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])) + if !server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]) url.gsub! "{" + name.to_s + "}", variables[name] else fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}." diff --git a/lib/freeclimb/models/account_request.rb b/lib/freeclimb/models/account_request.rb index 06ad9b01..eca84214 100644 --- a/lib/freeclimb/models/account_request.rb +++ b/lib/freeclimb/models/account_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class AccountRequest @@ -24,8 +22,8 @@ class AccountRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_alias' => :'alias', - :'label' => :'label' + _alias: :alias, + label: :label } end @@ -37,72 +35,69 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_alias' => :'String', - :'label' => :'String' + _alias: :String, + label: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AccountRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AccountRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'label') - self.label = attributes[:'label'] + if attributes.key?(:label) + self.label = attributes[:label] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @_alias.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _alias == o._alias && - label == o.label + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + label == other.label end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,15 +120,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -200,7 +195,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/account_result.rb b/lib/freeclimb/models/account_result.rb index f78d41d8..04f5a5fb 100644 --- a/lib/freeclimb/models/account_result.rb +++ b/lib/freeclimb/models/account_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class AccountResult @@ -71,17 +69,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'account_id' => :'accountId', - :'api_key' => :'apiKey', - :'_alias' => :'alias', - :'label' => :'label', - :'type' => :'type', - :'status' => :'status', - :'subresource_uris' => :'subresourceUris' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + account_id: :accountId, + api_key: :apiKey, + _alias: :alias, + label: :label, + type: :type, + status: :status, + subresource_uris: :subresourceUris } end @@ -93,140 +91,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'account_id' => :'String', - :'api_key' => :'String', - :'_alias' => :'String', - :'label' => :'String', - :'type' => :'AccountType', - :'status' => :'AccountStatus', - :'subresource_uris' => :'Object' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + account_id: :String, + api_key: :String, + _alias: :String, + label: :String, + type: :AccountType, + status: :AccountStatus, + subresource_uris: :Object } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'api_key', - :'_alias', - :'label', - :'type', - :'status', - :'subresource_uris' + :account_id, + :api_key, + :_alias, + :label, + :type, + :status, + :subresource_uris ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AccountResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AccountResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'api_key') - self.api_key = attributes[:'api_key'] + if attributes.key?(:api_key) + self.api_key = attributes[:api_key] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'label') - self.label = attributes[:'label'] + if attributes.key?(:label) + self.label = attributes[:label] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:type) + self.type = attributes[:type] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'subresource_uris') - self.subresource_uris = attributes[:'subresource_uris'] + if attributes.key?(:subresource_uris) + self.subresource_uris = attributes[:subresource_uris] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - account_id == o.account_id && - api_key == o.api_key && - _alias == o._alias && - label == o.label && - type == o.type && - status == o.status && - subresource_uris == o.subresource_uris + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + account_id == other.account_id && + api_key == other.api_key && + _alias == other._alias && + label == other.label && + type == other.type && + status == other.status && + subresource_uris == other.subresource_uris end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -249,15 +245,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -324,7 +320,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/account_status.rb b/lib/freeclimb/models/account_status.rb index 1653b8dc..d41eb382 100644 --- a/lib/freeclimb/models/account_status.rb +++ b/lib/freeclimb/models/account_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class AccountStatus @@ -30,7 +28,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = AccountStatus.constants.select { |c| AccountStatus::const_get(c) == value } + constantValues = AccountStatus.constants.select { |c| AccountStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #AccountStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/account_type.rb b/lib/freeclimb/models/account_type.rb index 45de81e1..2b3571ee 100644 --- a/lib/freeclimb/models/account_type.rb +++ b/lib/freeclimb/models/account_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class AccountType @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = AccountType.constants.select { |c| AccountType::const_get(c) == value } + constantValues = AccountType.constants.select { |c| AccountType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #AccountType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/add_to_conference.rb b/lib/freeclimb/models/add_to_conference.rb index 7343e7ce..a3708d07 100644 --- a/lib/freeclimb/models/add_to_conference.rb +++ b/lib/freeclimb/models/add_to_conference.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `AddToConference` command adds a Participant to a Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`. @@ -28,7 +26,7 @@ class AddToConference < PerclCommand # ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. attr_accessor :conference_id - # URL to be invoked when the Participant leaves the Conference. + # URL to be invoked when the Participant leaves the Conference. attr_accessor :leave_conference_url # If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command. @@ -40,25 +38,25 @@ class AddToConference < PerclCommand # Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants. attr_accessor :start_conf_on_enter - # If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. + # If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. attr_accessor :talk - # If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. + # If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. attr_accessor :dtmf_pass_through # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'allow_call_control' => :'allowCallControl', - :'call_control_sequence' => :'callControlSequence', - :'call_control_url' => :'callControlUrl', - :'conference_id' => :'conferenceId', - :'leave_conference_url' => :'leaveConferenceUrl', - :'listen' => :'listen', - :'notification_url' => :'notificationUrl', - :'start_conf_on_enter' => :'startConfOnEnter', - :'talk' => :'talk', - :'dtmf_pass_through' => :'dtmfPassThrough' + allow_call_control: :allowCallControl, + call_control_sequence: :callControlSequence, + call_control_url: :callControlUrl, + conference_id: :conferenceId, + leave_conference_url: :leaveConferenceUrl, + listen: :listen, + notification_url: :notificationUrl, + start_conf_on_enter: :startConfOnEnter, + talk: :talk, + dtmf_pass_through: :dtmfPassThrough } end @@ -70,88 +68,87 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'allow_call_control' => :'Boolean', - :'call_control_sequence' => :'String', - :'call_control_url' => :'String', - :'conference_id' => :'String', - :'leave_conference_url' => :'String', - :'listen' => :'Boolean', - :'notification_url' => :'String', - :'start_conf_on_enter' => :'Boolean', - :'talk' => :'Boolean', - :'dtmf_pass_through' => :'Boolean' + allow_call_control: :Boolean, + call_control_sequence: :String, + call_control_url: :String, + conference_id: :String, + leave_conference_url: :String, + listen: :Boolean, + notification_url: :String, + start_conf_on_enter: :Boolean, + talk: :Boolean, + dtmf_pass_through: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AddToConference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AddToConference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'allow_call_control') - self.allow_call_control = attributes[:'allow_call_control'] + if attributes.key?(:allow_call_control) + self.allow_call_control = attributes[:allow_call_control] end - if attributes.key?(:'call_control_sequence') - self.call_control_sequence = attributes[:'call_control_sequence'] + if attributes.key?(:call_control_sequence) + self.call_control_sequence = attributes[:call_control_sequence] end - if attributes.key?(:'call_control_url') - self.call_control_url = attributes[:'call_control_url'] + if attributes.key?(:call_control_url) + self.call_control_url = attributes[:call_control_url] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'leave_conference_url') - self.leave_conference_url = attributes[:'leave_conference_url'] + if attributes.key?(:leave_conference_url) + self.leave_conference_url = attributes[:leave_conference_url] end - if attributes.key?(:'listen') - self.listen = attributes[:'listen'] + if attributes.key?(:listen) + self.listen = attributes[:listen] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end - if attributes.key?(:'start_conf_on_enter') - self.start_conf_on_enter = attributes[:'start_conf_on_enter'] + if attributes.key?(:start_conf_on_enter) + self.start_conf_on_enter = attributes[:start_conf_on_enter] end - if attributes.key?(:'talk') - self.talk = attributes[:'talk'] + if attributes.key?(:talk) + self.talk = attributes[:talk] end - if attributes.key?(:'dtmf_pass_through') - self.dtmf_pass_through = attributes[:'dtmf_pass_through'] + if attributes.key?(:dtmf_pass_through) + self.dtmf_pass_through = attributes[:dtmf_pass_through] end self.command = "AddToConference" end @@ -170,35 +167,34 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @allow_call_control.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - allow_call_control == o.allow_call_control && - call_control_sequence == o.call_control_sequence && - call_control_url == o.call_control_url && - conference_id == o.conference_id && - leave_conference_url == o.leave_conference_url && - listen == o.listen && - notification_url == o.notification_url && - start_conf_on_enter == o.start_conf_on_enter && - talk == o.talk && - dtmf_pass_through == o.dtmf_pass_through && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + allow_call_control == other.allow_call_control && + call_control_sequence == other.call_control_sequence && + call_control_url == other.call_control_url && + conference_id == other.conference_id && + leave_conference_url == other.leave_conference_url && + listen == other.listen && + notification_url == other.notification_url && + start_conf_on_enter == other.start_conf_on_enter && + talk == other.talk && + dtmf_pass_through == other.dtmf_pass_through && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -219,18 +215,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -297,7 +293,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/add_to_conference_notification_webhook.rb b/lib/freeclimb/models/add_to_conference_notification_webhook.rb index 653f83c6..8ba2ea64 100644 --- a/lib/freeclimb/models/add_to_conference_notification_webhook.rb +++ b/lib/freeclimb/models/add_to_conference_notification_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Call has been bridged to a Conference and the AddToConference command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. @@ -19,8 +17,8 @@ class AddToConferenceNotificationWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h AddToConferenceNotificationWebhook.new(hash) end # Context or reason why this request is being made. Will be addToConferenceNotification - A Call has been bridged to a conference and the addToConference command’s notificationUrl is being invoked. @@ -84,19 +82,19 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'status' => :'status', - :'recording_url' => :'recordingUrl', - :'recording_id' => :'recordingId', - :'recording_duration_sec' => :'recordingDurationSec' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + status: :status, + recording_url: :recordingUrl, + recording_id: :recordingId, + recording_duration_sec: :recordingDurationSec } end @@ -108,152 +106,150 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'status' => :'ConferenceStatus', - :'recording_url' => :'String', - :'recording_id' => :'String', - :'recording_duration_sec' => :'Integer' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + status: :ConferenceStatus, + recording_url: :String, + recording_id: :String, + recording_duration_sec: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', - :'status', + :call_status, + :direction, + :queue_id, + :status ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AddToConferenceNotificationWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AddToConferenceNotificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_duration_sec') - self.recording_duration_sec = attributes[:'recording_duration_sec'] + if attributes.key?(:recording_duration_sec) + self.recording_duration_sec = attributes[:recording_duration_sec] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - status == o.status && - recording_url == o.recording_url && - recording_id == o.recording_id && - recording_duration_sec == o.recording_duration_sec && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + status == other.status && + recording_url == other.recording_url && + recording_id == other.recording_id && + recording_duration_sec == other.recording_duration_sec && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -274,18 +270,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -352,7 +348,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/add_to_queue_notification_webhook.rb b/lib/freeclimb/models/add_to_queue_notification_webhook.rb index fbd2fb7a..a10368ef 100644 --- a/lib/freeclimb/models/add_to_queue_notification_webhook.rb +++ b/lib/freeclimb/models/add_to_queue_notification_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Call has been added to a Queue and the Enqueue command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. @@ -19,8 +17,8 @@ class AddToQueueNotificationWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h AddToQueueNotificationWebhook.new(hash) end # Context or reason why this request is being made. Will be addToQueueNotification - A call has been added to a queue and the Enqueue command’s notificationUrl is being invoked. @@ -73,15 +71,15 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId } end @@ -93,127 +91,125 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id' + :call_status, + :direction, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AddToQueueNotificationWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AddToQueueNotificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -234,18 +230,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -312,7 +308,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/answered_by.rb b/lib/freeclimb/models/answered_by.rb index d835d6c8..0dade2e8 100644 --- a/lib/freeclimb/models/answered_by.rb +++ b/lib/freeclimb/models/answered_by.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class AnsweredBy @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = AnsweredBy.constants.select { |c| AnsweredBy::const_get(c) == value } + constantValues = AnsweredBy.constants.select { |c| AnsweredBy.const_get(c) == value } raise "Invalid ENUM value #{value} for class #AnsweredBy" if constantValues.empty? value end diff --git a/lib/freeclimb/models/application_list.rb b/lib/freeclimb/models/application_list.rb index b6d5cdfe..103cec9e 100644 --- a/lib/freeclimb/models/application_list.rb +++ b/lib/freeclimb/models/application_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ApplicationList @@ -41,14 +39,14 @@ class ApplicationList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'applications' => :'applications' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + applications: :applications } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'applications' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + applications: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'applications' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :applications ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ApplicationList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ApplicationList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'applications') - if (value = attributes[:'applications']).is_a?(Array) + if attributes.key?(:applications) + if (value = attributes[:applications]).is_a?(Array) self.applications = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - applications == o.applications + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + applications == other.applications end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/application_request.rb b/lib/freeclimb/models/application_request.rb index b99ee574..2fb0a5ca 100644 --- a/lib/freeclimb/models/application_request.rb +++ b/lib/freeclimb/models/application_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ApplicationRequest @@ -39,13 +37,13 @@ class ApplicationRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_alias' => :'alias', - :'voice_url' => :'voiceUrl', - :'voice_fallback_url' => :'voiceFallbackUrl', - :'call_connect_url' => :'callConnectUrl', - :'status_callback_url' => :'statusCallbackUrl', - :'sms_url' => :'smsUrl', - :'sms_fallback_url' => :'smsFallbackUrl' + _alias: :alias, + voice_url: :voiceUrl, + voice_fallback_url: :voiceFallbackUrl, + call_connect_url: :callConnectUrl, + status_callback_url: :statusCallbackUrl, + sms_url: :smsUrl, + sms_fallback_url: :smsFallbackUrl } end @@ -57,108 +55,106 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_alias' => :'String', - :'voice_url' => :'String', - :'voice_fallback_url' => :'String', - :'call_connect_url' => :'String', - :'status_callback_url' => :'String', - :'sms_url' => :'String', - :'sms_fallback_url' => :'String' + _alias: :String, + voice_url: :String, + voice_fallback_url: :String, + call_connect_url: :String, + status_callback_url: :String, + sms_url: :String, + sms_fallback_url: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'voice_url', - :'voice_fallback_url', - :'call_connect_url', - :'status_callback_url', - :'sms_url', - :'sms_fallback_url' + :voice_url, + :voice_fallback_url, + :call_connect_url, + :status_callback_url, + :sms_url, + :sms_fallback_url ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ApplicationRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ApplicationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'voice_url') - self.voice_url = attributes[:'voice_url'] + if attributes.key?(:voice_url) + self.voice_url = attributes[:voice_url] end - if attributes.key?(:'voice_fallback_url') - self.voice_fallback_url = attributes[:'voice_fallback_url'] + if attributes.key?(:voice_fallback_url) + self.voice_fallback_url = attributes[:voice_fallback_url] end - if attributes.key?(:'call_connect_url') - self.call_connect_url = attributes[:'call_connect_url'] + if attributes.key?(:call_connect_url) + self.call_connect_url = attributes[:call_connect_url] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end - if attributes.key?(:'sms_url') - self.sms_url = attributes[:'sms_url'] + if attributes.key?(:sms_url) + self.sms_url = attributes[:sms_url] end - if attributes.key?(:'sms_fallback_url') - self.sms_fallback_url = attributes[:'sms_fallback_url'] + if attributes.key?(:sms_fallback_url) + self.sms_fallback_url = attributes[:sms_fallback_url] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @_alias.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _alias == o._alias && - voice_url == o.voice_url && - voice_fallback_url == o.voice_fallback_url && - call_connect_url == o.call_connect_url && - status_callback_url == o.status_callback_url && - sms_url == o.sms_url && - sms_fallback_url == o.sms_fallback_url + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + voice_url == other.voice_url && + voice_fallback_url == other.voice_fallback_url && + call_connect_url == other.call_connect_url && + status_callback_url == other.status_callback_url && + sms_url == other.sms_url && + sms_fallback_url == other.sms_fallback_url end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -181,15 +177,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -256,7 +252,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/application_result.rb b/lib/freeclimb/models/application_result.rb index 608c1211..bc28e8f1 100644 --- a/lib/freeclimb/models/application_result.rb +++ b/lib/freeclimb/models/application_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ApplicationResult @@ -57,19 +55,19 @@ class ApplicationResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'account_id' => :'accountId', - :'application_id' => :'applicationId', - :'_alias' => :'alias', - :'voice_url' => :'voiceUrl', - :'voice_fallback_url' => :'voiceFallbackUrl', - :'call_connect_url' => :'callConnectUrl', - :'status_callback_url' => :'statusCallbackUrl', - :'sms_url' => :'smsUrl', - :'sms_fallback_url' => :'smsFallbackUrl' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + account_id: :accountId, + application_id: :applicationId, + _alias: :alias, + voice_url: :voiceUrl, + voice_fallback_url: :voiceFallbackUrl, + call_connect_url: :callConnectUrl, + status_callback_url: :statusCallbackUrl, + sms_url: :smsUrl, + sms_fallback_url: :smsFallbackUrl } end @@ -81,154 +79,152 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'account_id' => :'String', - :'application_id' => :'String', - :'_alias' => :'String', - :'voice_url' => :'String', - :'voice_fallback_url' => :'String', - :'call_connect_url' => :'String', - :'status_callback_url' => :'String', - :'sms_url' => :'String', - :'sms_fallback_url' => :'String' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + account_id: :String, + application_id: :String, + _alias: :String, + voice_url: :String, + voice_fallback_url: :String, + call_connect_url: :String, + status_callback_url: :String, + sms_url: :String, + sms_fallback_url: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'application_id', - :'_alias', - :'voice_url', - :'voice_fallback_url', - :'call_connect_url', - :'status_callback_url', - :'sms_url', - :'sms_fallback_url' + :account_id, + :application_id, + :_alias, + :voice_url, + :voice_fallback_url, + :call_connect_url, + :status_callback_url, + :sms_url, + :sms_fallback_url ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ApplicationResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ApplicationResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'voice_url') - self.voice_url = attributes[:'voice_url'] + if attributes.key?(:voice_url) + self.voice_url = attributes[:voice_url] end - if attributes.key?(:'voice_fallback_url') - self.voice_fallback_url = attributes[:'voice_fallback_url'] + if attributes.key?(:voice_fallback_url) + self.voice_fallback_url = attributes[:voice_fallback_url] end - if attributes.key?(:'call_connect_url') - self.call_connect_url = attributes[:'call_connect_url'] + if attributes.key?(:call_connect_url) + self.call_connect_url = attributes[:call_connect_url] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end - if attributes.key?(:'sms_url') - self.sms_url = attributes[:'sms_url'] + if attributes.key?(:sms_url) + self.sms_url = attributes[:sms_url] end - if attributes.key?(:'sms_fallback_url') - self.sms_fallback_url = attributes[:'sms_fallback_url'] + if attributes.key?(:sms_fallback_url) + self.sms_fallback_url = attributes[:sms_fallback_url] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - account_id == o.account_id && - application_id == o.application_id && - _alias == o._alias && - voice_url == o.voice_url && - voice_fallback_url == o.voice_fallback_url && - call_connect_url == o.call_connect_url && - status_callback_url == o.status_callback_url && - sms_url == o.sms_url && - sms_fallback_url == o.sms_fallback_url + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + account_id == other.account_id && + application_id == other.application_id && + _alias == other._alias && + voice_url == other.voice_url && + voice_fallback_url == other.voice_fallback_url && + call_connect_url == other.call_connect_url && + status_callback_url == other.status_callback_url && + sms_url == other.sms_url && + sms_fallback_url == other.sms_fallback_url end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -251,15 +247,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -326,7 +322,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/available_number.rb b/lib/freeclimb/models/available_number.rb index 5ecdd92c..b031a27c 100644 --- a/lib/freeclimb/models/available_number.rb +++ b/lib/freeclimb/models/available_number.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class AvailableNumber @@ -38,13 +36,13 @@ class AvailableNumber # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'capabilities' => :'capabilities', - :'campaign_id' => :'campaignId', - :'phone_number' => :'phoneNumber', - :'voice_enabled' => :'voiceEnabled', - :'sms_enabled' => :'smsEnabled', - :'region' => :'region', - :'country' => :'country' + capabilities: :capabilities, + campaign_id: :campaignId, + phone_number: :phoneNumber, + voice_enabled: :voiceEnabled, + sms_enabled: :smsEnabled, + region: :region, + country: :country } end @@ -56,108 +54,106 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'capabilities' => :'Capabilities', - :'campaign_id' => :'String', - :'phone_number' => :'String', - :'voice_enabled' => :'Boolean', - :'sms_enabled' => :'Boolean', - :'region' => :'String', - :'country' => :'String' + capabilities: :Capabilities, + campaign_id: :String, + phone_number: :String, + voice_enabled: :Boolean, + sms_enabled: :Boolean, + region: :String, + country: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'campaign_id', - :'phone_number', - :'voice_enabled', - :'sms_enabled', - :'region', - :'country' + :campaign_id, + :phone_number, + :voice_enabled, + :sms_enabled, + :region, + :country ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AvailableNumber` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AvailableNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'capabilities') - self.capabilities = attributes[:'capabilities'] + if attributes.key?(:capabilities) + self.capabilities = attributes[:capabilities] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'phone_number') - self.phone_number = attributes[:'phone_number'] + if attributes.key?(:phone_number) + self.phone_number = attributes[:phone_number] end - if attributes.key?(:'voice_enabled') - self.voice_enabled = attributes[:'voice_enabled'] + if attributes.key?(:voice_enabled) + self.voice_enabled = attributes[:voice_enabled] end - if attributes.key?(:'sms_enabled') - self.sms_enabled = attributes[:'sms_enabled'] + if attributes.key?(:sms_enabled) + self.sms_enabled = attributes[:sms_enabled] end - if attributes.key?(:'region') - self.region = attributes[:'region'] + if attributes.key?(:region) + self.region = attributes[:region] end - if attributes.key?(:'country') - self.country = attributes[:'country'] + if attributes.key?(:country) + self.country = attributes[:country] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @capabilities.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - capabilities == o.capabilities && - campaign_id == o.campaign_id && - phone_number == o.phone_number && - voice_enabled == o.voice_enabled && - sms_enabled == o.sms_enabled && - region == o.region && - country == o.country + def ==(other) + return true if equal?(other) + self.class == other.class && + capabilities == other.capabilities && + campaign_id == other.campaign_id && + phone_number == other.phone_number && + voice_enabled == other.voice_enabled && + sms_enabled == other.sms_enabled && + region == other.region && + country == other.country end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -180,15 +176,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -255,7 +251,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/available_number_list.rb b/lib/freeclimb/models/available_number_list.rb index add12a28..bb5a4e2d 100644 --- a/lib/freeclimb/models/available_number_list.rb +++ b/lib/freeclimb/models/available_number_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class AvailableNumberList @@ -41,14 +39,14 @@ class AvailableNumberList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'available_phone_numbers' => :'availablePhoneNumbers' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + available_phone_numbers: :availablePhoneNumbers } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'available_phone_numbers' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + available_phone_numbers: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'available_phone_numbers' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :available_phone_numbers ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AvailableNumberList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AvailableNumberList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'available_phone_numbers') - if (value = attributes[:'available_phone_numbers']).is_a?(Array) + if attributes.key?(:available_phone_numbers) + if (value = attributes[:available_phone_numbers]).is_a?(Array) self.available_phone_numbers = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - available_phone_numbers == o.available_phone_numbers + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + available_phone_numbers == other.available_phone_numbers end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/barge_in_reason.rb b/lib/freeclimb/models/barge_in_reason.rb index ec412142..d6f86e05 100644 --- a/lib/freeclimb/models/barge_in_reason.rb +++ b/lib/freeclimb/models/barge_in_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class BargeInReason @@ -30,7 +28,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = BargeInReason.constants.select { |c| BargeInReason::const_get(c) == value } + constantValues = BargeInReason.constants.select { |c| BargeInReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #BargeInReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/buy_incoming_number_request.rb b/lib/freeclimb/models/buy_incoming_number_request.rb index c8b31bce..d4ef5057 100644 --- a/lib/freeclimb/models/buy_incoming_number_request.rb +++ b/lib/freeclimb/models/buy_incoming_number_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class BuyIncomingNumberRequest @@ -27,9 +25,9 @@ class BuyIncomingNumberRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'phone_number' => :'phoneNumber', - :'_alias' => :'alias', - :'application_id' => :'applicationId' + phone_number: :phoneNumber, + _alias: :alias, + application_id: :applicationId } end @@ -41,50 +39,49 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'phone_number' => :'String', - :'_alias' => :'String', - :'application_id' => :'String' + phone_number: :String, + _alias: :String, + application_id: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::BuyIncomingNumberRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::BuyIncomingNumberRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'phone_number') - self.phone_number = attributes[:'phone_number'] + if attributes.key?(:phone_number) + self.phone_number = attributes[:phone_number] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @phone_number.nil? invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.') end @@ -95,28 +92,27 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @phone_number.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - phone_number == o.phone_number && - _alias == o._alias && - application_id == o.application_id + def ==(other) + return true if equal?(other) + self.class == other.class && + phone_number == other.phone_number && + _alias == other._alias && + application_id == other.application_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -139,15 +135,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -214,7 +210,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/call_control_webhook.rb b/lib/freeclimb/models/call_control_webhook.rb index 98f6387c..70e7f3eb 100644 --- a/lib/freeclimb/models/call_control_webhook.rb +++ b/lib/freeclimb/models/call_control_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The digit sequence defined in the callControlSequence attribute of the AddToConference PerCL command has been entered by the Conference participant. A PerCL response is expected. If invalid PerCL is provided, the call leg which triggered this webhook will terminate. @@ -19,8 +17,8 @@ class CallControlWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h CallControlWebhook.new(hash) end # Context or reason why this request is being made. Will be callControl. @@ -41,11 +39,11 @@ def self.deserialize(payload) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'conference_id' => :'conferenceId', - :'digits' => :'digits' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + conference_id: :conferenceId, + digits: :digits } end @@ -57,100 +55,97 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'conference_id' => :'String', - :'digits' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + conference_id: :String, + digits: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CallControlWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CallControlWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'digits') - self.digits = attributes[:'digits'] + if attributes.key?(:digits) + self.digits = attributes[:digits] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - conference_id == o.conference_id && - digits == o.digits && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + conference_id == other.conference_id && + digits == other.digits && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -171,18 +166,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -249,7 +244,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/call_direction.rb b/lib/freeclimb/models/call_direction.rb index 5593ec84..de0a738b 100644 --- a/lib/freeclimb/models/call_direction.rb +++ b/lib/freeclimb/models/call_direction.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class CallDirection @@ -30,7 +28,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = CallDirection.constants.select { |c| CallDirection::const_get(c) == value } + constantValues = CallDirection.constants.select { |c| CallDirection.const_get(c) == value } raise "Invalid ENUM value #{value} for class #CallDirection" if constantValues.empty? value end diff --git a/lib/freeclimb/models/call_ended_reason.rb b/lib/freeclimb/models/call_ended_reason.rb index 0bb400f0..652087af 100644 --- a/lib/freeclimb/models/call_ended_reason.rb +++ b/lib/freeclimb/models/call_ended_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class CallEndedReason @@ -50,7 +48,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = CallEndedReason.constants.select { |c| CallEndedReason::const_get(c) == value } + constantValues = CallEndedReason.constants.select { |c| CallEndedReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #CallEndedReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/call_list.rb b/lib/freeclimb/models/call_list.rb index 59a3b446..487a8344 100644 --- a/lib/freeclimb/models/call_list.rb +++ b/lib/freeclimb/models/call_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CallList @@ -41,14 +39,14 @@ class CallList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'calls' => :'calls' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + calls: :calls } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'calls' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + calls: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'calls' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :calls ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CallList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CallList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'calls') - if (value = attributes[:'calls']).is_a?(Array) + if attributes.key?(:calls) + if (value = attributes[:calls]).is_a?(Array) self.calls = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - calls == o.calls + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + calls == other.calls end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/call_result.rb b/lib/freeclimb/models/call_result.rb index 26d24330..101f0d17 100644 --- a/lib/freeclimb/models/call_result.rb +++ b/lib/freeclimb/models/call_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CallResult @@ -97,26 +95,26 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'call_id' => :'callId', - :'parent_call_id' => :'parentCallId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'phone_number_id' => :'phoneNumberId', - :'call_status' => :'callStatus', - :'start_time' => :'startTime', - :'connect_time' => :'connectTime', - :'end_time' => :'endTime', - :'duration' => :'duration', - :'connect_duration' => :'connectDuration', - :'direction' => :'direction', - :'answered_by' => :'answeredBy', - :'subresource_uris' => :'subresourceUris', - :'application_id' => :'applicationId' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + call_id: :callId, + parent_call_id: :parentCallId, + account_id: :accountId, + from: :from, + to: :to, + phone_number_id: :phoneNumberId, + call_status: :callStatus, + start_time: :startTime, + connect_time: :connectTime, + end_time: :endTime, + duration: :duration, + connect_duration: :connectDuration, + direction: :direction, + answered_by: :answeredBy, + subresource_uris: :subresourceUris, + application_id: :applicationId } end @@ -128,203 +126,201 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'call_id' => :'String', - :'parent_call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'phone_number_id' => :'String', - :'call_status' => :'CallStatus', - :'start_time' => :'String', - :'connect_time' => :'String', - :'end_time' => :'String', - :'duration' => :'Integer', - :'connect_duration' => :'Integer', - :'direction' => :'CallDirection', - :'answered_by' => :'AnsweredBy', - :'subresource_uris' => :'Object', - :'application_id' => :'String' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + call_id: :String, + parent_call_id: :String, + account_id: :String, + from: :String, + to: :String, + phone_number_id: :String, + call_status: :CallStatus, + start_time: :String, + connect_time: :String, + end_time: :String, + duration: :Integer, + connect_duration: :Integer, + direction: :CallDirection, + answered_by: :AnsweredBy, + subresource_uris: :Object, + application_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_id', - :'parent_call_id', - :'account_id', - :'from', - :'to', - :'phone_number_id', - :'call_status', - :'start_time', - :'connect_time', - :'end_time', - :'duration', - :'connect_duration', - :'direction', - :'answered_by', - :'subresource_uris', - :'application_id' + :call_id, + :parent_call_id, + :account_id, + :from, + :to, + :phone_number_id, + :call_status, + :start_time, + :connect_time, + :end_time, + :duration, + :connect_duration, + :direction, + :answered_by, + :subresource_uris, + :application_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CallResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CallResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'phone_number_id') - self.phone_number_id = attributes[:'phone_number_id'] + if attributes.key?(:phone_number_id) + self.phone_number_id = attributes[:phone_number_id] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'start_time') - self.start_time = attributes[:'start_time'] + if attributes.key?(:start_time) + self.start_time = attributes[:start_time] end - if attributes.key?(:'connect_time') - self.connect_time = attributes[:'connect_time'] + if attributes.key?(:connect_time) + self.connect_time = attributes[:connect_time] end - if attributes.key?(:'end_time') - self.end_time = attributes[:'end_time'] + if attributes.key?(:end_time) + self.end_time = attributes[:end_time] end - if attributes.key?(:'duration') - self.duration = attributes[:'duration'] + if attributes.key?(:duration) + self.duration = attributes[:duration] end - if attributes.key?(:'connect_duration') - self.connect_duration = attributes[:'connect_duration'] + if attributes.key?(:connect_duration) + self.connect_duration = attributes[:connect_duration] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'answered_by') - self.answered_by = attributes[:'answered_by'] + if attributes.key?(:answered_by) + self.answered_by = attributes[:answered_by] end - if attributes.key?(:'subresource_uris') - self.subresource_uris = attributes[:'subresource_uris'] + if attributes.key?(:subresource_uris) + self.subresource_uris = attributes[:subresource_uris] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - call_id == o.call_id && - parent_call_id == o.parent_call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - phone_number_id == o.phone_number_id && - call_status == o.call_status && - start_time == o.start_time && - connect_time == o.connect_time && - end_time == o.end_time && - duration == o.duration && - connect_duration == o.connect_duration && - direction == o.direction && - answered_by == o.answered_by && - subresource_uris == o.subresource_uris && - application_id == o.application_id + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + call_id == other.call_id && + parent_call_id == other.parent_call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + phone_number_id == other.phone_number_id && + call_status == other.call_status && + start_time == other.start_time && + connect_time == other.connect_time && + end_time == other.end_time && + duration == other.duration && + connect_duration == other.connect_duration && + direction == other.direction && + answered_by == other.answered_by && + subresource_uris == other.subresource_uris && + application_id == other.application_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -347,15 +343,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -422,7 +418,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/call_status.rb b/lib/freeclimb/models/call_status.rb index 96a99333..8428fcb5 100644 --- a/lib/freeclimb/models/call_status.rb +++ b/lib/freeclimb/models/call_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class CallStatus @@ -35,7 +33,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = CallStatus.constants.select { |c| CallStatus::const_get(c) == value } + constantValues = CallStatus.constants.select { |c| CallStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #CallStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/call_status_webhook.rb b/lib/freeclimb/models/call_status_webhook.rb index 750fad95..620a277f 100644 --- a/lib/freeclimb/models/call_status_webhook.rb +++ b/lib/freeclimb/models/call_status_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Call has ended and the statusCallbackUrl is being invoked. This is a notification only; All PerCL commands will be ignored. @@ -19,8 +17,8 @@ class CallStatusWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h CallStatusWebhook.new(hash) end # Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked. @@ -75,16 +73,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'call_ended_reason' => :'callEndedReason', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + call_ended_reason: :callEndedReason, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId } end @@ -96,134 +94,132 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'call_ended_reason' => :'CallEndedReason', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + call_ended_reason: :CallEndedReason, + direction: :CallDirection, + conference_id: :String, + queue_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'call_ended_reason', - :'direction', - :'queue_id' + :call_status, + :call_ended_reason, + :direction, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CallStatusWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CallStatusWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'call_ended_reason') - self.call_ended_reason = attributes[:'call_ended_reason'] + if attributes.key?(:call_ended_reason) + self.call_ended_reason = attributes[:call_ended_reason] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - call_ended_reason == o.call_ended_reason && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + call_ended_reason == other.call_ended_reason && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -244,18 +240,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -322,7 +318,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/capabilities.rb b/lib/freeclimb/models/capabilities.rb index c9fcf718..4ee4a181 100644 --- a/lib/freeclimb/models/capabilities.rb +++ b/lib/freeclimb/models/capabilities.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # Details for which features this number may be used. @@ -34,11 +32,11 @@ class Capabilities # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'voice' => :'voice', - :'sms' => :'sms', - :'toll_free' => :'tollFree', - :'ten_dlc' => :'tenDLC', - :'short_code' => :'shortCode' + voice: :voice, + sms: :sms, + toll_free: :tollFree, + ten_dlc: :tenDLC, + short_code: :shortCode } end @@ -50,95 +48,93 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'voice' => :'Boolean', - :'sms' => :'Boolean', - :'toll_free' => :'Boolean', - :'ten_dlc' => :'Boolean', - :'short_code' => :'Boolean' + voice: :Boolean, + sms: :Boolean, + toll_free: :Boolean, + ten_dlc: :Boolean, + short_code: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'voice', - :'sms', - :'toll_free', - :'ten_dlc', - :'short_code' + :voice, + :sms, + :toll_free, + :ten_dlc, + :short_code ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Capabilities` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Capabilities`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'voice') - self.voice = attributes[:'voice'] + if attributes.key?(:voice) + self.voice = attributes[:voice] end - if attributes.key?(:'sms') - self.sms = attributes[:'sms'] + if attributes.key?(:sms) + self.sms = attributes[:sms] end - if attributes.key?(:'toll_free') - self.toll_free = attributes[:'toll_free'] + if attributes.key?(:toll_free) + self.toll_free = attributes[:toll_free] end - if attributes.key?(:'ten_dlc') - self.ten_dlc = attributes[:'ten_dlc'] + if attributes.key?(:ten_dlc) + self.ten_dlc = attributes[:ten_dlc] end - if attributes.key?(:'short_code') - self.short_code = attributes[:'short_code'] + if attributes.key?(:short_code) + self.short_code = attributes[:short_code] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @voice.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - voice == o.voice && - sms == o.sms && - toll_free == o.toll_free && - ten_dlc == o.ten_dlc && - short_code == o.short_code + def ==(other) + return true if equal?(other) + self.class == other.class && + voice == other.voice && + sms == other.sms && + toll_free == other.toll_free && + ten_dlc == other.ten_dlc && + short_code == other.short_code end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -161,15 +157,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -236,7 +232,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/completion_request.rb b/lib/freeclimb/models/completion_request.rb index 33ef2fa0..2adcc539 100644 --- a/lib/freeclimb/models/completion_request.rb +++ b/lib/freeclimb/models/completion_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CompletionRequest @@ -21,7 +19,7 @@ class CompletionRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'query' => :'query' + query: :query } end @@ -33,40 +31,39 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'query' => :'String' + query: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CompletionRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CompletionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'query') - self.query = attributes[:'query'] + if attributes.key?(:query) + self.query = attributes[:query] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @query.nil? invalid_properties.push('invalid value for "query", query cannot be nil.') end @@ -81,11 +78,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @query.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -93,7 +89,7 @@ def valid? # @param [Object] query Value to be assigned def query=(query) if query.nil? - fail ArgumentError, 'query cannot be nil' + fail ArgumentError, "query cannot be nil" end if query.to_s.length > 2000 @@ -105,16 +101,16 @@ def query=(query) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query + def ==(other) + return true if equal?(other) + self.class == other.class && + query == other.query end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -137,15 +133,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -212,7 +208,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/completion_result.rb b/lib/freeclimb/models/completion_result.rb index 038f6c29..f8b7b434 100644 --- a/lib/freeclimb/models/completion_result.rb +++ b/lib/freeclimb/models/completion_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CompletionResult @@ -45,8 +43,8 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'response' => :'response', - :'status' => :'status' + response: :response, + status: :status } end @@ -58,45 +56,44 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'response' => :'String', - :'status' => :'CompletionResultStatus' + response: :String, + status: :CompletionResultStatus } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CompletionResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CompletionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'response') - self.response = attributes[:'response'] + if attributes.key?(:response) + self.response = attributes[:response] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @response.nil? invalid_properties.push('invalid value for "response", response cannot be nil.') end @@ -111,27 +108,26 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @response.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - response == o.response && - status == o.status + def ==(other) + return true if equal?(other) + self.class == other.class && + response == other.response && + status == other.status end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -154,15 +150,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -229,7 +225,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/completion_result_status.rb b/lib/freeclimb/models/completion_result_status.rb index 48152155..726c5c6b 100644 --- a/lib/freeclimb/models/completion_result_status.rb +++ b/lib/freeclimb/models/completion_result_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class CompletionResultStatus @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = CompletionResultStatus.constants.select { |c| CompletionResultStatus::const_get(c) == value } + constantValues = CompletionResultStatus.constants.select { |c| CompletionResultStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #CompletionResultStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/conference_list.rb b/lib/freeclimb/models/conference_list.rb index 8cee2a86..82aa7007 100644 --- a/lib/freeclimb/models/conference_list.rb +++ b/lib/freeclimb/models/conference_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ConferenceList @@ -41,14 +39,14 @@ class ConferenceList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'conferences' => :'conferences' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + conferences: :conferences } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'conferences' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + conferences: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'conferences' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :conferences ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'conferences') - if (value = attributes[:'conferences']).is_a?(Array) + if attributes.key?(:conferences) + if (value = attributes[:conferences]).is_a?(Array) self.conferences = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - conferences == o.conferences + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + conferences == other.conferences end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/conference_participant_list.rb b/lib/freeclimb/models/conference_participant_list.rb index 7fa23963..df539175 100644 --- a/lib/freeclimb/models/conference_participant_list.rb +++ b/lib/freeclimb/models/conference_participant_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ConferenceParticipantList @@ -41,14 +39,14 @@ class ConferenceParticipantList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'participants' => :'participants' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + participants: :participants } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'participants' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + participants: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'participants' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :participants ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceParticipantList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceParticipantList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'participants') - if (value = attributes[:'participants']).is_a?(Array) + if attributes.key?(:participants) + if (value = attributes[:participants]).is_a?(Array) self.participants = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - participants == o.participants + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + participants == other.participants end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/conference_participant_result.rb b/lib/freeclimb/models/conference_participant_result.rb index c69cde29..4693102b 100644 --- a/lib/freeclimb/models/conference_participant_result.rb +++ b/lib/freeclimb/models/conference_participant_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ConferenceParticipantResult @@ -51,17 +49,17 @@ class ConferenceParticipantResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'account_id' => :'accountId', - :'conference_id' => :'conferenceId', - :'call_id' => :'callId', - :'talk' => :'talk', - :'listen' => :'listen', - :'dtmf_pass_through' => :'dtmfPassThrough', - :'start_conf_on_enter' => :'startConfOnEnter' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + account_id: :accountId, + conference_id: :conferenceId, + call_id: :callId, + talk: :talk, + listen: :listen, + dtmf_pass_through: :dtmfPassThrough, + start_conf_on_enter: :startConfOnEnter } end @@ -73,140 +71,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'account_id' => :'String', - :'conference_id' => :'String', - :'call_id' => :'String', - :'talk' => :'Boolean', - :'listen' => :'Boolean', - :'dtmf_pass_through' => :'Boolean', - :'start_conf_on_enter' => :'Boolean' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + account_id: :String, + conference_id: :String, + call_id: :String, + talk: :Boolean, + listen: :Boolean, + dtmf_pass_through: :Boolean, + start_conf_on_enter: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'conference_id', - :'call_id', - :'talk', - :'listen', - :'dtmf_pass_through', - :'start_conf_on_enter' + :account_id, + :conference_id, + :call_id, + :talk, + :listen, + :dtmf_pass_through, + :start_conf_on_enter ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceParticipantResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceParticipantResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'talk') - self.talk = attributes[:'talk'] + if attributes.key?(:talk) + self.talk = attributes[:talk] end - if attributes.key?(:'listen') - self.listen = attributes[:'listen'] + if attributes.key?(:listen) + self.listen = attributes[:listen] end - if attributes.key?(:'dtmf_pass_through') - self.dtmf_pass_through = attributes[:'dtmf_pass_through'] + if attributes.key?(:dtmf_pass_through) + self.dtmf_pass_through = attributes[:dtmf_pass_through] end - if attributes.key?(:'start_conf_on_enter') - self.start_conf_on_enter = attributes[:'start_conf_on_enter'] + if attributes.key?(:start_conf_on_enter) + self.start_conf_on_enter = attributes[:start_conf_on_enter] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - account_id == o.account_id && - conference_id == o.conference_id && - call_id == o.call_id && - talk == o.talk && - listen == o.listen && - dtmf_pass_through == o.dtmf_pass_through && - start_conf_on_enter == o.start_conf_on_enter + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + account_id == other.account_id && + conference_id == other.conference_id && + call_id == other.call_id && + talk == other.talk && + listen == other.listen && + dtmf_pass_through == other.dtmf_pass_through && + start_conf_on_enter == other.start_conf_on_enter end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -229,15 +225,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -304,7 +300,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/conference_recording_status_webhook.rb b/lib/freeclimb/models/conference_recording_status_webhook.rb index ef84211e..d0460e54 100644 --- a/lib/freeclimb/models/conference_recording_status_webhook.rb +++ b/lib/freeclimb/models/conference_recording_status_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The statusCallbackUrl request includes Recording information for a Conference that ended. This is a notification only; any PerCL returned will be ignored. @@ -19,8 +17,8 @@ class ConferenceRecordingStatusWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h ConferenceRecordingStatusWebhook.new(hash) end # Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. @@ -84,19 +82,19 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'status' => :'status', - :'recording_url' => :'recordingUrl', - :'recording_id' => :'recordingId', - :'recording_duration_sec' => :'recordingDurationSec' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + status: :status, + recording_url: :recordingUrl, + recording_id: :recordingId, + recording_duration_sec: :recordingDurationSec } end @@ -108,152 +106,150 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'status' => :'ConferenceStatus', - :'recording_url' => :'String', - :'recording_id' => :'String', - :'recording_duration_sec' => :'Integer' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + status: :ConferenceStatus, + recording_url: :String, + recording_id: :String, + recording_duration_sec: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', - :'status', + :call_status, + :direction, + :queue_id, + :status ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceRecordingStatusWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceRecordingStatusWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_duration_sec') - self.recording_duration_sec = attributes[:'recording_duration_sec'] + if attributes.key?(:recording_duration_sec) + self.recording_duration_sec = attributes[:recording_duration_sec] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - status == o.status && - recording_url == o.recording_url && - recording_id == o.recording_id && - recording_duration_sec == o.recording_duration_sec && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + status == other.status && + recording_url == other.recording_url && + recording_id == other.recording_id && + recording_duration_sec == other.recording_duration_sec && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -274,18 +270,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -352,7 +348,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/conference_result.rb b/lib/freeclimb/models/conference_result.rb index 12d4981a..4c93b98a 100644 --- a/lib/freeclimb/models/conference_result.rb +++ b/lib/freeclimb/models/conference_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class ConferenceResult @@ -80,20 +78,20 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'conference_id' => :'conferenceId', - :'account_id' => :'accountId', - :'_alias' => :'alias', - :'play_beep' => :'playBeep', - :'record' => :'record', - :'status' => :'status', - :'wait_url' => :'waitUrl', - :'action_url' => :'actionUrl', - :'status_callback_url' => :'statusCallbackUrl', - :'subresource_uris' => :'subresourceUris' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + conference_id: :conferenceId, + account_id: :accountId, + _alias: :alias, + play_beep: :playBeep, + record: :record, + status: :status, + wait_url: :waitUrl, + action_url: :actionUrl, + status_callback_url: :statusCallbackUrl, + subresource_uris: :subresourceUris } end @@ -105,161 +103,159 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'conference_id' => :'String', - :'account_id' => :'String', - :'_alias' => :'String', - :'play_beep' => :'PlayBeep', - :'record' => :'Boolean', - :'status' => :'ConferenceStatus', - :'wait_url' => :'String', - :'action_url' => :'String', - :'status_callback_url' => :'String', - :'subresource_uris' => :'Object' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + conference_id: :String, + account_id: :String, + _alias: :String, + play_beep: :PlayBeep, + record: :Boolean, + status: :ConferenceStatus, + wait_url: :String, + action_url: :String, + status_callback_url: :String, + subresource_uris: :Object } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'conference_id', - :'account_id', - :'_alias', - :'play_beep', - :'record', - :'status', - :'wait_url', - :'action_url', - :'status_callback_url', - :'subresource_uris' + :conference_id, + :account_id, + :_alias, + :play_beep, + :record, + :status, + :wait_url, + :action_url, + :status_callback_url, + :subresource_uris ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'record') - self.record = attributes[:'record'] + if attributes.key?(:record) + self.record = attributes[:record] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'wait_url') - self.wait_url = attributes[:'wait_url'] + if attributes.key?(:wait_url) + self.wait_url = attributes[:wait_url] end - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end - if attributes.key?(:'subresource_uris') - self.subresource_uris = attributes[:'subresource_uris'] + if attributes.key?(:subresource_uris) + self.subresource_uris = attributes[:subresource_uris] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - conference_id == o.conference_id && - account_id == o.account_id && - _alias == o._alias && - play_beep == o.play_beep && - record == o.record && - status == o.status && - wait_url == o.wait_url && - action_url == o.action_url && - status_callback_url == o.status_callback_url && - subresource_uris == o.subresource_uris + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + conference_id == other.conference_id && + account_id == other.account_id && + _alias == other._alias && + play_beep == other.play_beep && + record == other.record && + status == other.status && + wait_url == other.wait_url && + action_url == other.action_url && + status_callback_url == other.status_callback_url && + subresource_uris == other.subresource_uris end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -282,15 +278,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -357,7 +353,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/conference_status.rb b/lib/freeclimb/models/conference_status.rb index d0d9b440..10f7bf61 100644 --- a/lib/freeclimb/models/conference_status.rb +++ b/lib/freeclimb/models/conference_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class ConferenceStatus @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = ConferenceStatus.constants.select { |c| ConferenceStatus::const_get(c) == value } + constantValues = ConferenceStatus.constants.select { |c| ConferenceStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #ConferenceStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/conference_status_webhook.rb b/lib/freeclimb/models/conference_status_webhook.rb index fed56134..901641ff 100644 --- a/lib/freeclimb/models/conference_status_webhook.rb +++ b/lib/freeclimb/models/conference_status_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The context or reason why this request is being made. Will be conferenceStatus - A Conference's status changed and its statusCallbackUrl is being invoked. @@ -19,8 +17,8 @@ class ConferenceStatusWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h ConferenceStatusWebhook.new(hash) end # Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. @@ -84,19 +82,19 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'status' => :'status', - :'recording_url' => :'recordingUrl', - :'recording_id' => :'recordingId', - :'recording_duration_sec' => :'recordingDurationSec' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + status: :status, + recording_url: :recordingUrl, + recording_id: :recordingId, + recording_duration_sec: :recordingDurationSec } end @@ -108,155 +106,153 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'status' => :'ConferenceStatus', - :'recording_url' => :'String', - :'recording_id' => :'String', - :'recording_duration_sec' => :'Integer' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + status: :ConferenceStatus, + recording_url: :String, + recording_id: :String, + recording_duration_sec: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', - :'status', - :'recording_url', - :'recording_id', - :'recording_duration_sec' + :call_status, + :direction, + :queue_id, + :status, + :recording_url, + :recording_id, + :recording_duration_sec ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ConferenceStatusWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ConferenceStatusWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_duration_sec') - self.recording_duration_sec = attributes[:'recording_duration_sec'] + if attributes.key?(:recording_duration_sec) + self.recording_duration_sec = attributes[:recording_duration_sec] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - status == o.status && - recording_url == o.recording_url && - recording_id == o.recording_id && - recording_duration_sec == o.recording_duration_sec && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + status == other.status && + recording_url == other.recording_url && + recording_id == other.recording_id && + recording_duration_sec == other.recording_duration_sec && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -277,18 +273,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -355,7 +351,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/create_conference.rb b/lib/freeclimb/models/create_conference.rb index bac08de5..20fbb876 100644 --- a/lib/freeclimb/models/create_conference.rb +++ b/lib/freeclimb/models/create_conference.rb @@ -1,25 +1,23 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `CreateConference` command does exactly what its name implies — it creates an unpopulated Conference (one without any Participants). Once created, a Conference remains in FreeClimb until explicitly terminated by a customer. Once a Conference has been terminated, it can no longer be used. class CreateConference < PerclCommand - # This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. + # This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. attr_accessor :action_url - # Descriptive name for the Conference. + # Descriptive name for the Conference. attr_accessor :_alias attr_accessor :play_beep @@ -58,12 +56,12 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'_alias' => :'alias', - :'play_beep' => :'playBeep', - :'record' => :'record', - :'status_callback_url' => :'statusCallbackUrl', - :'wait_url' => :'waitUrl' + action_url: :actionUrl, + _alias: :alias, + play_beep: :playBeep, + record: :record, + status_callback_url: :statusCallbackUrl, + wait_url: :waitUrl } end @@ -75,69 +73,69 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'_alias' => :'Boolean', - :'play_beep' => :'PlayBeep', - :'record' => :'Boolean', - :'status_callback_url' => :'String', - :'wait_url' => :'String' + action_url: :String, + _alias: :Boolean, + play_beep: :PlayBeep, + record: :Boolean, + status_callback_url: :String, + wait_url: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'play_beep', + :play_beep ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CreateConference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CreateConference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'record') - self.record = attributes[:'record'] + if attributes.key?(:record) + self.record = attributes[:record] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end - if attributes.key?(:'wait_url') - self.wait_url = attributes[:'wait_url'] + if attributes.key?(:wait_url) + self.wait_url = attributes[:wait_url] end self.command = "CreateConference" end @@ -156,31 +154,30 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - _alias == o._alias && - play_beep == o.play_beep && - record == o.record && - status_callback_url == o.status_callback_url && - wait_url == o.wait_url && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + _alias == other._alias && + play_beep == other.play_beep && + record == other.record && + status_callback_url == other.status_callback_url && + wait_url == other.wait_url && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,18 +198,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -279,7 +276,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/create_conference_request.rb b/lib/freeclimb/models/create_conference_request.rb index 1bde94b3..8d407558 100644 --- a/lib/freeclimb/models/create_conference_request.rb +++ b/lib/freeclimb/models/create_conference_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CreateConferenceRequest @@ -54,11 +52,11 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_alias' => :'alias', - :'play_beep' => :'playBeep', - :'record' => :'record', - :'wait_url' => :'waitUrl', - :'status_callback_url' => :'statusCallbackUrl' + _alias: :alias, + play_beep: :playBeep, + record: :record, + wait_url: :waitUrl, + status_callback_url: :statusCallbackUrl } end @@ -70,91 +68,94 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_alias' => :'String', - :'play_beep' => :'PlayBeep', - :'record' => :'Boolean', - :'wait_url' => :'String', - :'status_callback_url' => :'String' + _alias: :String, + play_beep: :PlayBeep, + record: :Boolean, + wait_url: :String, + status_callback_url: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'play_beep', + :play_beep ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CreateConferenceRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CreateConferenceRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'record') - self.record = attributes[:'record'] + if attributes.key?(:record) + self.record = attributes[:record] end - if attributes.key?(:'wait_url') - self.wait_url = attributes[:'wait_url'] + if attributes.key?(:wait_url) + self.wait_url = attributes[:wait_url] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] + if @status_callback_url.nil? + invalid_properties.push('invalid value for "status_callback_url", status_callback_url cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @_alias.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _alias == o._alias && - play_beep == o.play_beep && - record == o.record && - wait_url == o.wait_url && - status_callback_url == o.status_callback_url + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + play_beep == other.play_beep && + record == other.record && + wait_url == other.wait_url && + status_callback_url == other.status_callback_url end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -177,15 +178,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -252,7 +253,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/create_conference_webhook.rb b/lib/freeclimb/models/create_conference_webhook.rb index 6644a7a1..b72610f6 100644 --- a/lib/freeclimb/models/create_conference_webhook.rb +++ b/lib/freeclimb/models/create_conference_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. A PerCL response is expected if the actionUrl is being invoked. @@ -19,8 +17,8 @@ class CreateConferenceWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h CreateConferenceWebhook.new(hash) end # Context or reason why this request is being made. Will be createConference - A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. @@ -84,19 +82,19 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'status' => :'status', - :'recording_url' => :'recordingUrl', - :'recording_id' => :'recordingId', - :'recording_duration_sec' => :'recordingDurationSec' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + status: :status, + recording_url: :recordingUrl, + recording_id: :recordingId, + recording_duration_sec: :recordingDurationSec } end @@ -108,155 +106,153 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'status' => :'ConferenceStatus', - :'recording_url' => :'String', - :'recording_id' => :'String', - :'recording_duration_sec' => :'Integer' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + status: :ConferenceStatus, + recording_url: :String, + recording_id: :String, + recording_duration_sec: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', - :'status', - :'recording_url', - :'recording_id', - :'recording_duration_sec' + :call_status, + :direction, + :queue_id, + :status, + :recording_url, + :recording_id, + :recording_duration_sec ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CreateConferenceWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CreateConferenceWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_duration_sec') - self.recording_duration_sec = attributes[:'recording_duration_sec'] + if attributes.key?(:recording_duration_sec) + self.recording_duration_sec = attributes[:recording_duration_sec] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - status == o.status && - recording_url == o.recording_url && - recording_id == o.recording_id && - recording_duration_sec == o.recording_duration_sec && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + status == other.status && + recording_url == other.recording_url && + recording_id == other.recording_id && + recording_duration_sec == other.recording_duration_sec && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -277,18 +273,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -355,7 +351,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/create_web_rtc_token.rb b/lib/freeclimb/models/create_web_rtc_token.rb index 26a67af5..e4acded5 100644 --- a/lib/freeclimb/models/create_web_rtc_token.rb +++ b/lib/freeclimb/models/create_web_rtc_token.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class CreateWebRTCToken @@ -27,9 +25,9 @@ class CreateWebRTCToken # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'to' => :'to', - :'from' => :'from', - :'uses' => :'uses' + to: :to, + from: :from, + uses: :uses } end @@ -41,50 +39,49 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'to' => :'String', - :'from' => :'String', - :'uses' => :'Integer' + to: :String, + from: :String, + uses: :Integer } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CreateWebRTCToken` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CreateWebRTCToken`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'uses') - self.uses = attributes[:'uses'] + if attributes.key?(:uses) + self.uses = attributes[:uses] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @to.nil? invalid_properties.push('invalid value for "to", to cannot be nil.') end @@ -107,11 +104,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @to.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -119,7 +115,7 @@ def valid? # @param [Object] uses Value to be assigned def uses=(uses) if uses.nil? - fail ArgumentError, 'uses cannot be nil' + fail ArgumentError, "uses cannot be nil" end if uses < 1 @@ -131,18 +127,18 @@ def uses=(uses) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - to == o.to && - from == o.from && - uses == o.uses + def ==(other) + return true if equal?(other) + self.class == other.class && + to == other.to && + from == other.from && + uses == other.uses end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -165,15 +161,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -240,7 +236,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/dequeue.rb b/lib/freeclimb/models/dequeue.rb index 28577451..4249e719 100644 --- a/lib/freeclimb/models/dequeue.rb +++ b/lib/freeclimb/models/dequeue.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Dequeue` command transfers control of a Call that is in a Queue so that the waiting caller exits the Queue. Execution continues with the first command in the PerCL script returned by the `actionUrl` specified in the `Enqueue` command. @@ -33,62 +31,59 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Dequeue` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Dequeue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super self.command = "Dequeue" end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -109,18 +104,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -187,7 +182,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/dequeue_webhook.rb b/lib/freeclimb/models/dequeue_webhook.rb index ee6f8b11..83381db2 100644 --- a/lib/freeclimb/models/dequeue_webhook.rb +++ b/lib/freeclimb/models/dequeue_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. A PerCL response is expected. @@ -19,8 +17,8 @@ class DequeueWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h DequeueWebhook.new(hash) end # Context or reason why this request is being made. Will be dequeue - A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. @@ -79,17 +77,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'queue_result' => :'queueResult', - :'queue_time' => :'queueTime' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + queue_result: :queueResult, + queue_time: :queueTime } end @@ -101,140 +99,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'queue_result' => :'String', - :'queue_time' => :'Integer' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + queue_result: :String, + queue_time: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', - :'queue_time' + :call_status, + :direction, + :queue_id, + :queue_time ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::DequeueWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::DequeueWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'queue_result') - self.queue_result = attributes[:'queue_result'] + if attributes.key?(:queue_result) + self.queue_result = attributes[:queue_result] end - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] + if attributes.key?(:queue_time) + self.queue_time = attributes[:queue_time] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - queue_result == o.queue_result && - queue_time == o.queue_time && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + queue_result == other.queue_result && + queue_time == other.queue_time && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -255,18 +251,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -333,7 +329,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/enqueue.rb b/lib/freeclimb/models/enqueue.rb index 03826141..de163875 100644 --- a/lib/freeclimb/models/enqueue.rb +++ b/lib/freeclimb/models/enqueue.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Enqueue` command adds the current Call to a call Queue. If the specified Queue does not exist, it is created and then the Call is added to it. The default maximum length of the queue is 100. This can be modified using the REST API. @@ -31,10 +29,10 @@ class Enqueue < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'notification_url' => :'notificationUrl', - :'queue_id' => :'queueId', - :'wait_url' => :'waitUrl' + action_url: :actionUrl, + notification_url: :notificationUrl, + queue_id: :queueId, + wait_url: :waitUrl } end @@ -46,58 +44,57 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'notification_url' => :'String', - :'queue_id' => :'String', - :'wait_url' => :'String' + action_url: :String, + notification_url: :String, + queue_id: :String, + wait_url: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Enqueue` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Enqueue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'wait_url') - self.wait_url = attributes[:'wait_url'] + if attributes.key?(:wait_url) + self.wait_url = attributes[:wait_url] end self.command = "Enqueue" end @@ -124,29 +121,28 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - notification_url == o.notification_url && - queue_id == o.queue_id && - wait_url == o.wait_url && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + notification_url == other.notification_url && + queue_id == other.queue_id && + wait_url == other.wait_url && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -167,18 +163,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -245,7 +241,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/filter_logs_request.rb b/lib/freeclimb/models/filter_logs_request.rb index 893583ab..5c668669 100644 --- a/lib/freeclimb/models/filter_logs_request.rb +++ b/lib/freeclimb/models/filter_logs_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class FilterLogsRequest @@ -21,7 +19,7 @@ class FilterLogsRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'pql' => :'pql' + pql: :pql } end @@ -33,40 +31,39 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'pql' => :'String' + pql: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::FilterLogsRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::FilterLogsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'pql') - self.pql = attributes[:'pql'] + if attributes.key?(:pql) + self.pql = attributes[:pql] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @pql.nil? invalid_properties.push('invalid value for "pql", pql cannot be nil.') end @@ -77,26 +74,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @pql.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - pql == o.pql + def ==(other) + return true if equal?(other) + self.class == other.class && + pql == other.pql end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -119,15 +115,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -194,7 +190,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/get_digits.rb b/lib/freeclimb/models/get_digits.rb index 8b593e62..c87123e6 100644 --- a/lib/freeclimb/models/get_digits.rb +++ b/lib/freeclimb/models/get_digits.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `GetDigits` command collects DTMF inputs from the caller. It is only supported only when there is a single party on the Call. `GetDigits` is a Terminal Command — any actions following it are never executed. When the Caller is done entering the digits, FreeClimb submits that data to the provided `actionUrl` using an HTTP POST request. Your server will be required to respond to the FreeClimb Webhook with PerCL to continue handling the call. @@ -46,15 +44,15 @@ class GetDigits < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'digit_timeout_ms' => :'digitTimeoutMs', - :'finish_on_key' => :'finishOnKey', - :'flush_buffer' => :'flushBuffer', - :'initial_timeout_ms' => :'initialTimeoutMs', - :'max_digits' => :'maxDigits', - :'min_digits' => :'minDigits', - :'prompts' => :'prompts', - :'privacy_mode' => :'privacyMode' + action_url: :actionUrl, + digit_timeout_ms: :digitTimeoutMs, + finish_on_key: :finishOnKey, + flush_buffer: :flushBuffer, + initial_timeout_ms: :initialTimeoutMs, + max_digits: :maxDigits, + min_digits: :minDigits, + prompts: :prompts, + privacy_mode: :privacyMode } end @@ -66,85 +64,84 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'digit_timeout_ms' => :'Integer', - :'finish_on_key' => :'String', - :'flush_buffer' => :'Boolean', - :'initial_timeout_ms' => :'Integer', - :'max_digits' => :'Integer', - :'min_digits' => :'Integer', - :'prompts' => :'Array', - :'privacy_mode' => :'Boolean' + action_url: :String, + digit_timeout_ms: :Integer, + finish_on_key: :String, + flush_buffer: :Boolean, + initial_timeout_ms: :Integer, + max_digits: :Integer, + min_digits: :Integer, + prompts: :"Array", + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::GetDigits` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::GetDigits`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'digit_timeout_ms') - self.digit_timeout_ms = attributes[:'digit_timeout_ms'] + if attributes.key?(:digit_timeout_ms) + self.digit_timeout_ms = attributes[:digit_timeout_ms] end - if attributes.key?(:'finish_on_key') - self.finish_on_key = attributes[:'finish_on_key'] + if attributes.key?(:finish_on_key) + self.finish_on_key = attributes[:finish_on_key] end - if attributes.key?(:'flush_buffer') - self.flush_buffer = attributes[:'flush_buffer'] + if attributes.key?(:flush_buffer) + self.flush_buffer = attributes[:flush_buffer] end - if attributes.key?(:'initial_timeout_ms') - self.initial_timeout_ms = attributes[:'initial_timeout_ms'] + if attributes.key?(:initial_timeout_ms) + self.initial_timeout_ms = attributes[:initial_timeout_ms] end - if attributes.key?(:'max_digits') - self.max_digits = attributes[:'max_digits'] + if attributes.key?(:max_digits) + self.max_digits = attributes[:max_digits] end - if attributes.key?(:'min_digits') - self.min_digits = attributes[:'min_digits'] + if attributes.key?(:min_digits) + self.min_digits = attributes[:min_digits] end - if attributes.key?(:'prompts') - if (value = attributes[:'prompts']).is_a?(Array) + if attributes.key?(:prompts) + if (value = attributes[:prompts]).is_a?(Array) self.prompts = value end end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "GetDigits" end @@ -163,34 +160,33 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - digit_timeout_ms == o.digit_timeout_ms && - finish_on_key == o.finish_on_key && - flush_buffer == o.flush_buffer && - initial_timeout_ms == o.initial_timeout_ms && - max_digits == o.max_digits && - min_digits == o.min_digits && - prompts == o.prompts && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + digit_timeout_ms == other.digit_timeout_ms && + finish_on_key == other.finish_on_key && + flush_buffer == other.flush_buffer && + initial_timeout_ms == other.initial_timeout_ms && + max_digits == other.max_digits && + min_digits == other.min_digits && + prompts == other.prompts && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -211,18 +207,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -289,7 +285,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/get_digits_reason.rb b/lib/freeclimb/models/get_digits_reason.rb index 5725110e..e966bee9 100644 --- a/lib/freeclimb/models/get_digits_reason.rb +++ b/lib/freeclimb/models/get_digits_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class GetDigitsReason @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = GetDigitsReason.constants.select { |c| GetDigitsReason::const_get(c) == value } + constantValues = GetDigitsReason.constants.select { |c| GetDigitsReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #GetDigitsReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/get_digits_webhook.rb b/lib/freeclimb/models/get_digits_webhook.rb index a8bca56d..7b161217 100644 --- a/lib/freeclimb/models/get_digits_webhook.rb +++ b/lib/freeclimb/models/get_digits_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command. @@ -19,8 +17,8 @@ class GetDigitsWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h GetDigitsWebhook.new(hash) end # Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked. @@ -81,18 +79,18 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'digits' => :'digits', - :'reason' => :'reason', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + digits: :digits, + reason: :reason, + parent_call_id: :parentCallId } end @@ -104,145 +102,143 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'digits' => :'String', - :'reason' => :'GetDigitsReason', - :'parent_call_id' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + digits: :String, + reason: :GetDigitsReason, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', + :call_status, + :direction, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::GetDigitsWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::GetDigitsWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'digits') - self.digits = attributes[:'digits'] + if attributes.key?(:digits) + self.digits = attributes[:digits] end - if attributes.key?(:'reason') - self.reason = attributes[:'reason'] + if attributes.key?(:reason) + self.reason = attributes[:reason] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - digits == o.digits && - reason == o.reason && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + digits == other.digits && + reason == other.reason && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -263,18 +259,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -341,7 +337,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/get_speech.rb b/lib/freeclimb/models/get_speech.rb index 5ffc6bd0..5e2fb021 100644 --- a/lib/freeclimb/models/get_speech.rb +++ b/lib/freeclimb/models/get_speech.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `GetSpeech` command enables the Caller to respond to the application using a supported language. Unlike DTMF entry, which implicitly restricts the user to using the available buttons on the phone key pad, speech input allows for flexible audio inputs based on grammar. FreeClimb supports grammars written using GRXML compatible with the Microsoft Speech Platform. `GetSpeech` is only supported on a single call leg. It is not supported when there are two or more call legs connected (as in within a Conference). @@ -42,7 +40,7 @@ class GetSpeech < PerclCommand # When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0. attr_accessor :confidence_threshold - # The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 + # The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 attr_accessor :sensitivity_level # Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds. @@ -79,19 +77,19 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'grammar_type' => :'grammarType', - :'grammar_file' => :'grammarFile', - :'grammar_rule' => :'grammarRule', - :'play_beep' => :'playBeep', - :'prompts' => :'prompts', - :'no_input_timeout_ms' => :'noInputTimeoutMs', - :'recognition_timeout_ms' => :'recognitionTimeoutMs', - :'confidence_threshold' => :'confidenceThreshold', - :'sensitivity_level' => :'sensitivityLevel', - :'speech_complete_timeout_ms' => :'speechCompleteTimeoutMs', - :'speech_incomplete_timeout_ms' => :'speechIncompleteTimeoutMs', - :'privacy_mode' => :'privacyMode' + action_url: :actionUrl, + grammar_type: :grammarType, + grammar_file: :grammarFile, + grammar_rule: :grammarRule, + play_beep: :playBeep, + prompts: :prompts, + no_input_timeout_ms: :noInputTimeoutMs, + recognition_timeout_ms: :recognitionTimeoutMs, + confidence_threshold: :confidenceThreshold, + sensitivity_level: :sensitivityLevel, + speech_complete_timeout_ms: :speechCompleteTimeoutMs, + speech_incomplete_timeout_ms: :speechIncompleteTimeoutMs, + privacy_mode: :privacyMode } end @@ -103,106 +101,106 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'grammar_type' => :'GrammarType', - :'grammar_file' => :'String', - :'grammar_rule' => :'String', - :'play_beep' => :'Boolean', - :'prompts' => :'Array', - :'no_input_timeout_ms' => :'Integer', - :'recognition_timeout_ms' => :'Integer', - :'confidence_threshold' => :'Float', - :'sensitivity_level' => :'Float', - :'speech_complete_timeout_ms' => :'Integer', - :'speech_incomplete_timeout_ms' => :'Integer', - :'privacy_mode' => :'Boolean' + action_url: :String, + grammar_type: :GrammarType, + grammar_file: :String, + grammar_rule: :String, + play_beep: :Boolean, + prompts: :"Array", + no_input_timeout_ms: :Integer, + recognition_timeout_ms: :Integer, + confidence_threshold: :Float, + sensitivity_level: :Float, + speech_complete_timeout_ms: :Integer, + speech_incomplete_timeout_ms: :Integer, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'grammar_type', + :grammar_type ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::GetSpeech` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::GetSpeech`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'grammar_type') - self.grammar_type = attributes[:'grammar_type'] + if attributes.key?(:grammar_type) + self.grammar_type = attributes[:grammar_type] end - if attributes.key?(:'grammar_file') - self.grammar_file = attributes[:'grammar_file'] + if attributes.key?(:grammar_file) + self.grammar_file = attributes[:grammar_file] end - if attributes.key?(:'grammar_rule') - self.grammar_rule = attributes[:'grammar_rule'] + if attributes.key?(:grammar_rule) + self.grammar_rule = attributes[:grammar_rule] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'prompts') - if (value = attributes[:'prompts']).is_a?(Array) + if attributes.key?(:prompts) + if (value = attributes[:prompts]).is_a?(Array) self.prompts = value end end - if attributes.key?(:'no_input_timeout_ms') - self.no_input_timeout_ms = attributes[:'no_input_timeout_ms'] + if attributes.key?(:no_input_timeout_ms) + self.no_input_timeout_ms = attributes[:no_input_timeout_ms] end - if attributes.key?(:'recognition_timeout_ms') - self.recognition_timeout_ms = attributes[:'recognition_timeout_ms'] + if attributes.key?(:recognition_timeout_ms) + self.recognition_timeout_ms = attributes[:recognition_timeout_ms] end - if attributes.key?(:'confidence_threshold') - self.confidence_threshold = attributes[:'confidence_threshold'] + if attributes.key?(:confidence_threshold) + self.confidence_threshold = attributes[:confidence_threshold] end - if attributes.key?(:'sensitivity_level') - self.sensitivity_level = attributes[:'sensitivity_level'] + if attributes.key?(:sensitivity_level) + self.sensitivity_level = attributes[:sensitivity_level] end - if attributes.key?(:'speech_complete_timeout_ms') - self.speech_complete_timeout_ms = attributes[:'speech_complete_timeout_ms'] + if attributes.key?(:speech_complete_timeout_ms) + self.speech_complete_timeout_ms = attributes[:speech_complete_timeout_ms] end - if attributes.key?(:'speech_incomplete_timeout_ms') - self.speech_incomplete_timeout_ms = attributes[:'speech_incomplete_timeout_ms'] + if attributes.key?(:speech_incomplete_timeout_ms) + self.speech_incomplete_timeout_ms = attributes[:speech_incomplete_timeout_ms] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "GetSpeech" end @@ -225,38 +223,37 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - grammar_type == o.grammar_type && - grammar_file == o.grammar_file && - grammar_rule == o.grammar_rule && - play_beep == o.play_beep && - prompts == o.prompts && - no_input_timeout_ms == o.no_input_timeout_ms && - recognition_timeout_ms == o.recognition_timeout_ms && - confidence_threshold == o.confidence_threshold && - sensitivity_level == o.sensitivity_level && - speech_complete_timeout_ms == o.speech_complete_timeout_ms && - speech_incomplete_timeout_ms == o.speech_incomplete_timeout_ms && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + grammar_type == other.grammar_type && + grammar_file == other.grammar_file && + grammar_rule == other.grammar_rule && + play_beep == other.play_beep && + prompts == other.prompts && + no_input_timeout_ms == other.no_input_timeout_ms && + recognition_timeout_ms == other.recognition_timeout_ms && + confidence_threshold == other.confidence_threshold && + sensitivity_level == other.sensitivity_level && + speech_complete_timeout_ms == other.speech_complete_timeout_ms && + speech_incomplete_timeout_ms == other.speech_incomplete_timeout_ms && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -277,18 +274,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -355,7 +352,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/get_speech_reason.rb b/lib/freeclimb/models/get_speech_reason.rb index b8d1f1db..5eae57e9 100644 --- a/lib/freeclimb/models/get_speech_reason.rb +++ b/lib/freeclimb/models/get_speech_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class GetSpeechReason @@ -33,7 +31,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = GetSpeechReason.constants.select { |c| GetSpeechReason::const_get(c) == value } + constantValues = GetSpeechReason.constants.select { |c| GetSpeechReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #GetSpeechReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/get_speech_webhook.rb b/lib/freeclimb/models/get_speech_webhook.rb index 8f4aa9f7..f19be5cc 100644 --- a/lib/freeclimb/models/get_speech_webhook.rb +++ b/lib/freeclimb/models/get_speech_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The GetSpeech command has completed and its actionUrl is being invoked. A PerCL response is expected, unless reason is hangup. @@ -19,8 +17,8 @@ class GetSpeechWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h GetSpeechWebhook.new(hash) end # Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked. @@ -96,23 +94,23 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'reason' => :'reason', - :'recognition_result' => :'recognitionResult', - :'confidence' => :'confidence', - :'parent_call_id' => :'parentCallId', - :'completion_reason' => :'completionReason', - :'completion_cause' => :'completionCause', - :'mrcp_code' => :'mrcpCode', - :'mrcp_diagnostic' => :'mrcpDiagnostic' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + reason: :reason, + recognition_result: :recognitionResult, + confidence: :confidence, + parent_call_id: :parentCallId, + completion_reason: :completionReason, + completion_cause: :completionCause, + mrcp_code: :mrcpCode, + mrcp_diagnostic: :mrcpDiagnostic } end @@ -124,175 +122,173 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'reason' => :'GetSpeechReason', - :'recognition_result' => :'String', - :'confidence' => :'Integer', - :'parent_call_id' => :'String', - :'completion_reason' => :'String', - :'completion_cause' => :'String', - :'mrcp_code' => :'Integer', - :'mrcp_diagnostic' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + reason: :GetSpeechReason, + recognition_result: :String, + confidence: :Integer, + parent_call_id: :String, + completion_reason: :String, + completion_cause: :String, + mrcp_code: :Integer, + mrcp_diagnostic: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'queue_id', + :call_status, + :direction, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::GetSpeechWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::GetSpeechWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'reason') - self.reason = attributes[:'reason'] + if attributes.key?(:reason) + self.reason = attributes[:reason] end - if attributes.key?(:'recognition_result') - self.recognition_result = attributes[:'recognition_result'] + if attributes.key?(:recognition_result) + self.recognition_result = attributes[:recognition_result] end - if attributes.key?(:'confidence') - self.confidence = attributes[:'confidence'] + if attributes.key?(:confidence) + self.confidence = attributes[:confidence] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end - if attributes.key?(:'completion_reason') - self.completion_reason = attributes[:'completion_reason'] + if attributes.key?(:completion_reason) + self.completion_reason = attributes[:completion_reason] end - if attributes.key?(:'completion_cause') - self.completion_cause = attributes[:'completion_cause'] + if attributes.key?(:completion_cause) + self.completion_cause = attributes[:completion_cause] end - if attributes.key?(:'mrcp_code') - self.mrcp_code = attributes[:'mrcp_code'] + if attributes.key?(:mrcp_code) + self.mrcp_code = attributes[:mrcp_code] end - if attributes.key?(:'mrcp_diagnostic') - self.mrcp_diagnostic = attributes[:'mrcp_diagnostic'] + if attributes.key?(:mrcp_diagnostic) + self.mrcp_diagnostic = attributes[:mrcp_diagnostic] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - reason == o.reason && - recognition_result == o.recognition_result && - confidence == o.confidence && - parent_call_id == o.parent_call_id && - completion_reason == o.completion_reason && - completion_cause == o.completion_cause && - mrcp_code == o.mrcp_code && - mrcp_diagnostic == o.mrcp_diagnostic && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + reason == other.reason && + recognition_result == other.recognition_result && + confidence == other.confidence && + parent_call_id == other.parent_call_id && + completion_reason == other.completion_reason && + completion_cause == other.completion_cause && + mrcp_code == other.mrcp_code && + mrcp_diagnostic == other.mrcp_diagnostic && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -313,18 +309,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -391,7 +387,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/grammar_file_built_in.rb b/lib/freeclimb/models/grammar_file_built_in.rb index 22745d84..ba426b04 100644 --- a/lib/freeclimb/models/grammar_file_built_in.rb +++ b/lib/freeclimb/models/grammar_file_built_in.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class GrammarFileBuiltIn @@ -42,7 +40,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = GrammarFileBuiltIn.constants.select { |c| GrammarFileBuiltIn::const_get(c) == value } + constantValues = GrammarFileBuiltIn.constants.select { |c| GrammarFileBuiltIn.const_get(c) == value } raise "Invalid ENUM value #{value} for class #GrammarFileBuiltIn" if constantValues.empty? value end diff --git a/lib/freeclimb/models/grammar_type.rb b/lib/freeclimb/models/grammar_type.rb index c6f8dfa2..0c180170 100644 --- a/lib/freeclimb/models/grammar_type.rb +++ b/lib/freeclimb/models/grammar_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class GrammarType @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = GrammarType.constants.select { |c| GrammarType::const_get(c) == value } + constantValues = GrammarType.constants.select { |c| GrammarType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #GrammarType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/hangup.rb b/lib/freeclimb/models/hangup.rb index fa1f783a..b61257d5 100644 --- a/lib/freeclimb/models/hangup.rb +++ b/lib/freeclimb/models/hangup.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Hangup` command terminates a Call. If `Hangup` is used as the first action in a PerCL response, it does not prevent FreeClimb from answering the Call and billing your account. See the `Reject` command to hang up at no charge. @@ -22,7 +20,7 @@ class Hangup < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'reason' => :'reason' + reason: :reason } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'reason' => :'String' + reason: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Hangup` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Hangup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'reason') - self.reason = attributes[:'reason'] + if attributes.key?(:reason) + self.reason = attributes[:reason] end self.command = "Hangup" end @@ -78,33 +75,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @reason.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + reason == other.reason && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,18 +120,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -203,7 +198,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/if_machine.rb b/lib/freeclimb/models/if_machine.rb index b8e566fa..0e7a37ce 100644 --- a/lib/freeclimb/models/if_machine.rb +++ b/lib/freeclimb/models/if_machine.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class IfMachine @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = IfMachine.constants.select { |c| IfMachine::const_get(c) == value } + constantValues = IfMachine.constants.select { |c| IfMachine.const_get(c) == value } raise "Invalid ENUM value #{value} for class #IfMachine" if constantValues.empty? value end diff --git a/lib/freeclimb/models/inbound_call_webhook.rb b/lib/freeclimb/models/inbound_call_webhook.rb index 9823ab19..97e49f90 100644 --- a/lib/freeclimb/models/inbound_call_webhook.rb +++ b/lib/freeclimb/models/inbound_call_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An inbound Call to a number registered on FreeClimb will trigger a request to the voiceUrl of the application the number is assigned to. FreeClimb expects to receive PerCL in response to this request in order to process the Call. The following parameters are sent as the POST body. @@ -19,8 +17,8 @@ class InboundCallWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h InboundCallWebhook.new(hash) end # Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked. @@ -75,16 +73,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + parent_call_id: :parentCallId } end @@ -96,135 +94,133 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'parent_call_id' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', - :'parent_call_id' + :call_status, + :direction, + :conference_id, + :queue_id, + :parent_call_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::InboundCallWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::InboundCallWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -245,18 +241,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -323,7 +319,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/incoming_number_list.rb b/lib/freeclimb/models/incoming_number_list.rb index f645fa3d..7044f213 100644 --- a/lib/freeclimb/models/incoming_number_list.rb +++ b/lib/freeclimb/models/incoming_number_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class IncomingNumberList @@ -41,14 +39,14 @@ class IncomingNumberList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'incoming_phone_numbers' => :'incomingPhoneNumbers' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + incoming_phone_numbers: :incomingPhoneNumbers } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'incoming_phone_numbers' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + incoming_phone_numbers: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'incoming_phone_numbers' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :incoming_phone_numbers ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::IncomingNumberList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::IncomingNumberList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'incoming_phone_numbers') - if (value = attributes[:'incoming_phone_numbers']).is_a?(Array) + if attributes.key?(:incoming_phone_numbers) + if (value = attributes[:incoming_phone_numbers]).is_a?(Array) self.incoming_phone_numbers = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - incoming_phone_numbers == o.incoming_phone_numbers + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + incoming_phone_numbers == other.incoming_phone_numbers end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/incoming_number_request.rb b/lib/freeclimb/models/incoming_number_request.rb index bc4cf0c5..4daaeec5 100644 --- a/lib/freeclimb/models/incoming_number_request.rb +++ b/lib/freeclimb/models/incoming_number_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class IncomingNumberRequest @@ -27,9 +25,9 @@ class IncomingNumberRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'application_id' => :'applicationId', - :'_alias' => :'alias', - :'campaign_id' => :'campaignId' + application_id: :applicationId, + _alias: :alias, + campaign_id: :campaignId } end @@ -41,79 +39,77 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'application_id' => :'String', - :'_alias' => :'String', - :'campaign_id' => :'String' + application_id: :String, + _alias: :String, + campaign_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'campaign_id' + :campaign_id ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::IncomingNumberRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::IncomingNumberRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @application_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - application_id == o.application_id && - _alias == o._alias && - campaign_id == o.campaign_id + def ==(other) + return true if equal?(other) + self.class == other.class && + application_id == other.application_id && + _alias == other._alias && + campaign_id == other.campaign_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -136,15 +132,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -211,7 +207,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/incoming_number_result.rb b/lib/freeclimb/models/incoming_number_result.rb index 9203855c..fab5e447 100644 --- a/lib/freeclimb/models/incoming_number_result.rb +++ b/lib/freeclimb/models/incoming_number_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class IncomingNumberResult @@ -67,23 +65,23 @@ class IncomingNumberResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'capabilities' => :'capabilities', - :'campaign_id' => :'campaignId', - :'phone_number_id' => :'phoneNumberId', - :'account_id' => :'accountId', - :'application_id' => :'applicationId', - :'phone_number' => :'phoneNumber', - :'_alias' => :'alias', - :'region' => :'region', - :'country' => :'country', - :'voice_enabled' => :'voiceEnabled', - :'sms_enabled' => :'smsEnabled', - :'offnet' => :'offnet', - :'tfn' => :'tfn' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + capabilities: :capabilities, + campaign_id: :campaignId, + phone_number_id: :phoneNumberId, + account_id: :accountId, + application_id: :applicationId, + phone_number: :phoneNumber, + _alias: :alias, + region: :region, + country: :country, + voice_enabled: :voiceEnabled, + sms_enabled: :smsEnabled, + offnet: :offnet, + tfn: :tfn } end @@ -95,180 +93,178 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'capabilities' => :'Capabilities', - :'campaign_id' => :'String', - :'phone_number_id' => :'String', - :'account_id' => :'String', - :'application_id' => :'String', - :'phone_number' => :'String', - :'_alias' => :'String', - :'region' => :'String', - :'country' => :'String', - :'voice_enabled' => :'Boolean', - :'sms_enabled' => :'Boolean', - :'offnet' => :'Boolean', - :'tfn' => :'TFN' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + capabilities: :Capabilities, + campaign_id: :String, + phone_number_id: :String, + account_id: :String, + application_id: :String, + phone_number: :String, + _alias: :String, + region: :String, + country: :String, + voice_enabled: :Boolean, + sms_enabled: :Boolean, + offnet: :Boolean, + tfn: :TFN } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'campaign_id', - :'phone_number_id', - :'account_id', - :'application_id', - :'phone_number', - :'_alias', - :'region', - :'country', - :'voice_enabled', - :'sms_enabled', - :'offnet', + :campaign_id, + :phone_number_id, + :account_id, + :application_id, + :phone_number, + :_alias, + :region, + :country, + :voice_enabled, + :sms_enabled, + :offnet ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::IncomingNumberResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::IncomingNumberResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'capabilities') - self.capabilities = attributes[:'capabilities'] + if attributes.key?(:capabilities) + self.capabilities = attributes[:capabilities] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'phone_number_id') - self.phone_number_id = attributes[:'phone_number_id'] + if attributes.key?(:phone_number_id) + self.phone_number_id = attributes[:phone_number_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'phone_number') - self.phone_number = attributes[:'phone_number'] + if attributes.key?(:phone_number) + self.phone_number = attributes[:phone_number] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'region') - self.region = attributes[:'region'] + if attributes.key?(:region) + self.region = attributes[:region] end - if attributes.key?(:'country') - self.country = attributes[:'country'] + if attributes.key?(:country) + self.country = attributes[:country] end - if attributes.key?(:'voice_enabled') - self.voice_enabled = attributes[:'voice_enabled'] + if attributes.key?(:voice_enabled) + self.voice_enabled = attributes[:voice_enabled] end - if attributes.key?(:'sms_enabled') - self.sms_enabled = attributes[:'sms_enabled'] + if attributes.key?(:sms_enabled) + self.sms_enabled = attributes[:sms_enabled] end - if attributes.key?(:'offnet') - self.offnet = attributes[:'offnet'] + if attributes.key?(:offnet) + self.offnet = attributes[:offnet] end - if attributes.key?(:'tfn') - self.tfn = attributes[:'tfn'] + if attributes.key?(:tfn) + self.tfn = attributes[:tfn] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - capabilities == o.capabilities && - campaign_id == o.campaign_id && - phone_number_id == o.phone_number_id && - account_id == o.account_id && - application_id == o.application_id && - phone_number == o.phone_number && - _alias == o._alias && - region == o.region && - country == o.country && - voice_enabled == o.voice_enabled && - sms_enabled == o.sms_enabled && - offnet == o.offnet && - tfn == o.tfn + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + capabilities == other.capabilities && + campaign_id == other.campaign_id && + phone_number_id == other.phone_number_id && + account_id == other.account_id && + application_id == other.application_id && + phone_number == other.phone_number && + _alias == other._alias && + region == other.region && + country == other.country && + voice_enabled == other.voice_enabled && + sms_enabled == other.sms_enabled && + offnet == other.offnet && + tfn == other.tfn end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -291,15 +287,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -366,7 +362,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/language.rb b/lib/freeclimb/models/language.rb index def8fd47..612648b5 100644 --- a/lib/freeclimb/models/language.rb +++ b/lib/freeclimb/models/language.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class Language @@ -53,7 +51,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = Language.constants.select { |c| Language::const_get(c) == value } + constantValues = Language.constants.select { |c| Language.const_get(c) == value } raise "Invalid ENUM value #{value} for class #Language" if constantValues.empty? value end diff --git a/lib/freeclimb/models/leave_conference_webhook.rb b/lib/freeclimb/models/leave_conference_webhook.rb index 2805127c..3cd64cf3 100644 --- a/lib/freeclimb/models/leave_conference_webhook.rb +++ b/lib/freeclimb/models/leave_conference_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. A PerCL response is expected — unless the URL is invoked due to the participant hanging up. @@ -19,8 +17,8 @@ class LeaveConferenceWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h LeaveConferenceWebhook.new(hash) end # Context or reason why this request is being made. Will be leaveConference - Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. @@ -73,15 +71,15 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId } end @@ -93,128 +91,126 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id' + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::LeaveConferenceWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::LeaveConferenceWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -235,18 +231,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -313,7 +309,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/log_level.rb b/lib/freeclimb/models/log_level.rb index a4a58d0d..898c6083 100644 --- a/lib/freeclimb/models/log_level.rb +++ b/lib/freeclimb/models/log_level.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class LogLevel @@ -30,7 +28,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = LogLevel.constants.select { |c| LogLevel::const_get(c) == value } + constantValues = LogLevel.constants.select { |c| LogLevel.const_get(c) == value } raise "Invalid ENUM value #{value} for class #LogLevel" if constantValues.empty? value end diff --git a/lib/freeclimb/models/log_list.rb b/lib/freeclimb/models/log_list.rb index c2024dcb..30378a1c 100644 --- a/lib/freeclimb/models/log_list.rb +++ b/lib/freeclimb/models/log_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class LogList @@ -41,14 +39,14 @@ class LogList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'logs' => :'logs' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + logs: :logs } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'logs' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + logs: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'logs' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :logs ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::LogList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::LogList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'logs') - if (value = attributes[:'logs']).is_a?(Array) + if attributes.key?(:logs) + if (value = attributes[:logs]).is_a?(Array) self.logs = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - logs == o.logs + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + logs == other.logs end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/log_result.rb b/lib/freeclimb/models/log_result.rb index b6f20a38..99a9adb5 100644 --- a/lib/freeclimb/models/log_result.rb +++ b/lib/freeclimb/models/log_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class LogResult @@ -60,13 +58,13 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'timestamp' => :'timestamp', - :'level' => :'level', - :'request_id' => :'requestId', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'message' => :'message', - :'metadata' => :'metadata' + timestamp: :timestamp, + level: :level, + request_id: :requestId, + account_id: :accountId, + call_id: :callId, + message: :message, + metadata: :metadata } end @@ -78,109 +76,107 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'timestamp' => :'Integer', - :'level' => :'LogLevel', - :'request_id' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'message' => :'String', - :'metadata' => :'Object' + timestamp: :Integer, + level: :LogLevel, + request_id: :String, + account_id: :String, + call_id: :String, + message: :String, + metadata: :Object } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'timestamp', - :'level', - :'request_id', - :'account_id', - :'call_id', - :'message', - :'metadata' + :timestamp, + :level, + :request_id, + :account_id, + :call_id, + :message, + :metadata ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::LogResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::LogResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] + if attributes.key?(:timestamp) + self.timestamp = attributes[:timestamp] end - if attributes.key?(:'level') - self.level = attributes[:'level'] + if attributes.key?(:level) + self.level = attributes[:level] end - if attributes.key?(:'request_id') - self.request_id = attributes[:'request_id'] + if attributes.key?(:request_id) + self.request_id = attributes[:request_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'message') - self.message = attributes[:'message'] + if attributes.key?(:message) + self.message = attributes[:message] end - if attributes.key?(:'metadata') - self.metadata = attributes[:'metadata'] + if attributes.key?(:metadata) + self.metadata = attributes[:metadata] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @timestamp.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - timestamp == o.timestamp && - level == o.level && - request_id == o.request_id && - account_id == o.account_id && - call_id == o.call_id && - message == o.message && - metadata == o.metadata + def ==(other) + return true if equal?(other) + self.class == other.class && + timestamp == other.timestamp && + level == other.level && + request_id == other.request_id && + account_id == other.account_id && + call_id == other.call_id && + message == other.message && + metadata == other.metadata end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -203,15 +199,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -278,7 +274,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/machine_detected_webhook.rb b/lib/freeclimb/models/machine_detected_webhook.rb index 5f45cb0d..180e4a39 100644 --- a/lib/freeclimb/models/machine_detected_webhook.rb +++ b/lib/freeclimb/models/machine_detected_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An outbound call spawned by OutDial detected an answer by a machine (answering machine or fax/modem machine) and ifMachineUrl is being invoked. A PerCL response is expected. @@ -19,8 +17,8 @@ class MachineDetectedWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h MachineDetectedWebhook.new(hash) end # Context or reason why this request is being made. Will be machineDetected - An outbound call spawned by OutDial was answered by a machine and the ifMachineUrl is being invoked. @@ -78,17 +76,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'call_id' => :'callId', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'parent_call_id' => :'parentCallId', - :'machine_type' => :'machineType' + request_type: :requestType, + call_id: :callId, + account_id: :accountId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + parent_call_id: :parentCallId, + machine_type: :machineType } end @@ -100,140 +98,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'call_id' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'parent_call_id' => :'String', - :'machine_type' => :'MachineType' + request_type: :String, + call_id: :String, + account_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + parent_call_id: :String, + machine_type: :MachineType } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MachineDetectedWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MachineDetectedWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end - if attributes.key?(:'machine_type') - self.machine_type = attributes[:'machine_type'] + if attributes.key?(:machine_type) + self.machine_type = attributes[:machine_type] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - call_id == o.call_id && - account_id == o.account_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - parent_call_id == o.parent_call_id && - machine_type == o.machine_type && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + call_id == other.call_id && + account_id == other.account_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + parent_call_id == other.parent_call_id && + machine_type == other.machine_type && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -254,18 +250,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -332,7 +328,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/machine_type.rb b/lib/freeclimb/models/machine_type.rb index bf26e6a5..4522a342 100644 --- a/lib/freeclimb/models/machine_type.rb +++ b/lib/freeclimb/models/machine_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class MachineType @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = MachineType.constants.select { |c| MachineType::const_get(c) == value } + constantValues = MachineType.constants.select { |c| MachineType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #MachineType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/make_call_request.rb b/lib/freeclimb/models/make_call_request.rb index c611e81d..6e12de9f 100644 --- a/lib/freeclimb/models/make_call_request.rb +++ b/lib/freeclimb/models/make_call_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class MakeCallRequest @@ -48,16 +46,16 @@ class MakeCallRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'from' => :'from', - :'to' => :'to', - :'application_id' => :'applicationId', - :'send_digits' => :'sendDigits', - :'if_machine' => :'ifMachine', - :'if_machine_url' => :'ifMachineUrl', - :'timeout' => :'timeout', - :'parent_call_id' => :'parentCallId', - :'privacy_mode' => :'privacyMode', - :'call_connect_url' => :'callConnectUrl' + from: :from, + to: :to, + application_id: :applicationId, + send_digits: :sendDigits, + if_machine: :ifMachine, + if_machine_url: :ifMachineUrl, + timeout: :timeout, + parent_call_id: :parentCallId, + privacy_mode: :privacyMode, + call_connect_url: :callConnectUrl } end @@ -69,87 +67,86 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'from' => :'String', - :'to' => :'String', - :'application_id' => :'String', - :'send_digits' => :'String', - :'if_machine' => :'String', - :'if_machine_url' => :'String', - :'timeout' => :'Integer', - :'parent_call_id' => :'String', - :'privacy_mode' => :'Boolean', - :'call_connect_url' => :'String' + from: :String, + to: :String, + application_id: :String, + send_digits: :String, + if_machine: :String, + if_machine_url: :String, + timeout: :Integer, + parent_call_id: :String, + privacy_mode: :Boolean, + call_connect_url: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MakeCallRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MakeCallRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'send_digits') - self.send_digits = attributes[:'send_digits'] + if attributes.key?(:send_digits) + self.send_digits = attributes[:send_digits] end - if attributes.key?(:'if_machine') - self.if_machine = attributes[:'if_machine'] + if attributes.key?(:if_machine) + self.if_machine = attributes[:if_machine] end - if attributes.key?(:'if_machine_url') - self.if_machine_url = attributes[:'if_machine_url'] + if attributes.key?(:if_machine_url) + self.if_machine_url = attributes[:if_machine_url] end - if attributes.key?(:'timeout') - self.timeout = attributes[:'timeout'] + self.timeout = if attributes.key?(:timeout) + attributes[:timeout] else - self.timeout = 30 + 30 end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end - if attributes.key?(:'call_connect_url') - self.call_connect_url = attributes[:'call_connect_url'] + if attributes.key?(:call_connect_url) + self.call_connect_url = attributes[:call_connect_url] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @from.nil? invalid_properties.push('invalid value for "from", from cannot be nil.') end @@ -164,35 +161,34 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @from.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - from == o.from && - to == o.to && - application_id == o.application_id && - send_digits == o.send_digits && - if_machine == o.if_machine && - if_machine_url == o.if_machine_url && - timeout == o.timeout && - parent_call_id == o.parent_call_id && - privacy_mode == o.privacy_mode && - call_connect_url == o.call_connect_url + def ==(other) + return true if equal?(other) + self.class == other.class && + from == other.from && + to == other.to && + application_id == other.application_id && + send_digits == other.send_digits && + if_machine == other.if_machine && + if_machine_url == other.if_machine_url && + timeout == other.timeout && + parent_call_id == other.parent_call_id && + privacy_mode == other.privacy_mode && + call_connect_url == other.call_connect_url end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -215,15 +211,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -290,7 +286,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/message_delivery_webhook.rb b/lib/freeclimb/models/message_delivery_webhook.rb index 8784730c..52ffd1c8 100644 --- a/lib/freeclimb/models/message_delivery_webhook.rb +++ b/lib/freeclimb/models/message_delivery_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An SMS has been received by the platform and is being delivered to the smsUrl of the customer application that is associated with the destination number. A PerCL response will be ignored. @@ -19,8 +17,8 @@ class MessageDeliveryWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h MessageDeliveryWebhook.new(hash) end # Value will be messageDelivery - An SMS message has been received by the platform and is being delivered to the customer application associated with the destination number. @@ -56,16 +54,16 @@ def self.deserialize(payload) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'from' => :'from', - :'to' => :'to', - :'text' => :'text', - :'direction' => :'direction', - :'application_id' => :'applicationId', - :'status' => :'status', - :'phone_number_id' => :'phoneNumberId', - :'uri' => :'uri' + request_type: :requestType, + account_id: :accountId, + from: :from, + to: :to, + text: :text, + direction: :direction, + application_id: :applicationId, + status: :status, + phone_number_id: :phoneNumberId, + uri: :uri } end @@ -77,130 +75,127 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'text' => :'String', - :'direction' => :'String', - :'application_id' => :'String', - :'status' => :'String', - :'phone_number_id' => :'String', - :'uri' => :'String' + request_type: :String, + account_id: :String, + from: :String, + to: :String, + text: :String, + direction: :String, + application_id: :String, + status: :String, + phone_number_id: :String, + uri: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MessageDeliveryWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MessageDeliveryWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'phone_number_id') - self.phone_number_id = attributes[:'phone_number_id'] + if attributes.key?(:phone_number_id) + self.phone_number_id = attributes[:phone_number_id] end - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - from == o.from && - to == o.to && - text == o.text && - direction == o.direction && - application_id == o.application_id && - status == o.status && - phone_number_id == o.phone_number_id && - uri == o.uri && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + from == other.from && + to == other.to && + text == other.text && + direction == other.direction && + application_id == other.application_id && + status == other.status && + phone_number_id == other.phone_number_id && + uri == other.uri && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -221,18 +216,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -299,7 +294,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/message_direction.rb b/lib/freeclimb/models/message_direction.rb index d12daa57..3539cdd5 100644 --- a/lib/freeclimb/models/message_direction.rb +++ b/lib/freeclimb/models/message_direction.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class MessageDirection @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = MessageDirection.constants.select { |c| MessageDirection::const_get(c) == value } + constantValues = MessageDirection.constants.select { |c| MessageDirection.const_get(c) == value } raise "Invalid ENUM value #{value} for class #MessageDirection" if constantValues.empty? value end diff --git a/lib/freeclimb/models/message_request.rb b/lib/freeclimb/models/message_request.rb index df815d10..04e9da17 100644 --- a/lib/freeclimb/models/message_request.rb +++ b/lib/freeclimb/models/message_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class MessageRequest @@ -45,15 +43,15 @@ class MessageRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'from' => :'from', - :'to' => :'to', - :'text' => :'text', - :'notification_url' => :'notificationUrl', - :'media_urls' => :'mediaUrls' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + from: :from, + to: :to, + text: :text, + notification_url: :notificationUrl, + media_urls: :mediaUrls } end @@ -65,81 +63,81 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'from' => :'String', - :'to' => :'String', - :'text' => :'String', - :'notification_url' => :'String', - :'media_urls' => :'Array' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + from: :String, + to: :String, + text: :String, + notification_url: :String, + media_urls: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'media_urls' + :media_urls ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MessageRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MessageRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end - if attributes.key?(:'media_urls') - if (value = attributes[:'media_urls']).is_a?(Array) + if attributes.key?(:media_urls) + if (value = attributes[:media_urls]).is_a?(Array) self.media_urls = value end end @@ -148,7 +146,7 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @from.nil? invalid_properties.push('invalid value for "from", from cannot be nil.') end @@ -167,34 +165,33 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - from == o.from && - to == o.to && - text == o.text && - notification_url == o.notification_url && - media_urls == o.media_urls + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + from == other.from && + to == other.to && + text == other.text && + notification_url == other.notification_url && + media_urls == other.media_urls end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -217,15 +214,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -292,7 +289,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/message_result.rb b/lib/freeclimb/models/message_result.rb index 8446278f..344f1c31 100644 --- a/lib/freeclimb/models/message_result.rb +++ b/lib/freeclimb/models/message_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class MessageResult @@ -95,25 +93,25 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'account_id' => :'accountId', - :'message_id' => :'messageId', - :'status' => :'status', - :'from' => :'from', - :'to' => :'to', - :'text' => :'text', - :'direction' => :'direction', - :'notification_url' => :'notificationUrl', - :'brand_id' => :'brandId', - :'campaign_id' => :'campaignId', - :'segment_count' => :'segmentCount', - :'media_urls' => :'mediaUrls', - :'tfn' => :'tfn', - :'phone_number_id' => :'phoneNumberId', - :'application_id' => :'applicationId' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + account_id: :accountId, + message_id: :messageId, + status: :status, + from: :from, + to: :to, + text: :text, + direction: :direction, + notification_url: :notificationUrl, + brand_id: :brandId, + campaign_id: :campaignId, + segment_count: :segmentCount, + media_urls: :mediaUrls, + tfn: :tfn, + phone_number_id: :phoneNumberId, + application_id: :applicationId } end @@ -125,197 +123,195 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'account_id' => :'String', - :'message_id' => :'String', - :'status' => :'MessageStatus', - :'from' => :'String', - :'to' => :'String', - :'text' => :'String', - :'direction' => :'String', - :'notification_url' => :'String', - :'brand_id' => :'String', - :'campaign_id' => :'String', - :'segment_count' => :'Float', - :'media_urls' => :'Array', - :'tfn' => :'TFN', - :'phone_number_id' => :'String', - :'application_id' => :'String' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + account_id: :String, + message_id: :String, + status: :MessageStatus, + from: :String, + to: :String, + text: :String, + direction: :String, + notification_url: :String, + brand_id: :String, + campaign_id: :String, + segment_count: :Float, + media_urls: :"Array", + tfn: :TFN, + phone_number_id: :String, + application_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'message_id', - :'status', - :'from', - :'to', - :'text', - :'direction', - :'notification_url', - :'brand_id', - :'campaign_id', - :'segment_count', - :'media_urls', - :'phone_number_id', - :'application_id' + :account_id, + :message_id, + :status, + :from, + :to, + :text, + :direction, + :notification_url, + :brand_id, + :campaign_id, + :segment_count, + :media_urls, + :phone_number_id, + :application_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MessageResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MessageResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'message_id') - self.message_id = attributes[:'message_id'] + if attributes.key?(:message_id) + self.message_id = attributes[:message_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end - if attributes.key?(:'brand_id') - self.brand_id = attributes[:'brand_id'] + if attributes.key?(:brand_id) + self.brand_id = attributes[:brand_id] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'segment_count') - self.segment_count = attributes[:'segment_count'] + if attributes.key?(:segment_count) + self.segment_count = attributes[:segment_count] end - if attributes.key?(:'media_urls') - if (value = attributes[:'media_urls']).is_a?(Array) + if attributes.key?(:media_urls) + if (value = attributes[:media_urls]).is_a?(Array) self.media_urls = value end end - if attributes.key?(:'tfn') - self.tfn = attributes[:'tfn'] + if attributes.key?(:tfn) + self.tfn = attributes[:tfn] end - if attributes.key?(:'phone_number_id') - self.phone_number_id = attributes[:'phone_number_id'] + if attributes.key?(:phone_number_id) + self.phone_number_id = attributes[:phone_number_id] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - account_id == o.account_id && - message_id == o.message_id && - status == o.status && - from == o.from && - to == o.to && - text == o.text && - direction == o.direction && - notification_url == o.notification_url && - brand_id == o.brand_id && - campaign_id == o.campaign_id && - segment_count == o.segment_count && - media_urls == o.media_urls && - tfn == o.tfn && - phone_number_id == o.phone_number_id && - application_id == o.application_id + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + account_id == other.account_id && + message_id == other.message_id && + status == other.status && + from == other.from && + to == other.to && + text == other.text && + direction == other.direction && + notification_url == other.notification_url && + brand_id == other.brand_id && + campaign_id == other.campaign_id && + segment_count == other.segment_count && + media_urls == other.media_urls && + tfn == other.tfn && + phone_number_id == other.phone_number_id && + application_id == other.application_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -338,15 +334,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -413,7 +409,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/message_status.rb b/lib/freeclimb/models/message_status.rb index f389c9f8..11dfd8a8 100644 --- a/lib/freeclimb/models/message_status.rb +++ b/lib/freeclimb/models/message_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class MessageStatus @@ -38,7 +36,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = MessageStatus.constants.select { |c| MessageStatus::const_get(c) == value } + constantValues = MessageStatus.constants.select { |c| MessageStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #MessageStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/message_status_webhook.rb b/lib/freeclimb/models/message_status_webhook.rb index 461e757a..608d77c3 100644 --- a/lib/freeclimb/models/message_status_webhook.rb +++ b/lib/freeclimb/models/message_status_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An outbound SMS has changed status and the notificationUrl from the Sms command or Send an SMS request is being invoked. A PerCL response will be ignored. @@ -19,8 +17,8 @@ class MessageStatusWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h MessageStatusWebhook.new(hash) end # Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked. @@ -80,17 +78,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'message_id' => :'messageId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'text' => :'text', - :'direction' => :'direction', - :'application_id' => :'applicationId', - :'status' => :'status', - :'phone_number_id' => :'phoneNumberId' + request_type: :requestType, + account_id: :accountId, + message_id: :messageId, + call_id: :callId, + from: :from, + to: :to, + text: :text, + direction: :direction, + application_id: :applicationId, + status: :status, + phone_number_id: :phoneNumberId } end @@ -102,137 +100,135 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'message_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'text' => :'String', - :'direction' => :'String', - :'application_id' => :'String', - :'status' => :'MessageStatus', - :'phone_number_id' => :'String' + request_type: :String, + account_id: :String, + message_id: :String, + call_id: :String, + from: :String, + to: :String, + text: :String, + direction: :String, + application_id: :String, + status: :MessageStatus, + phone_number_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'status', + :status ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MessageStatusWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MessageStatusWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'message_id') - self.message_id = attributes[:'message_id'] + if attributes.key?(:message_id) + self.message_id = attributes[:message_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'application_id') - self.application_id = attributes[:'application_id'] + if attributes.key?(:application_id) + self.application_id = attributes[:application_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'phone_number_id') - self.phone_number_id = attributes[:'phone_number_id'] + if attributes.key?(:phone_number_id) + self.phone_number_id = attributes[:phone_number_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - message_id == o.message_id && - call_id == o.call_id && - from == o.from && - to == o.to && - text == o.text && - direction == o.direction && - application_id == o.application_id && - status == o.status && - phone_number_id == o.phone_number_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + message_id == other.message_id && + call_id == other.call_id && + from == other.from && + to == other.to && + text == other.text && + direction == other.direction && + application_id == other.application_id && + status == other.status && + phone_number_id == other.phone_number_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -253,18 +249,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -331,7 +327,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/messages_list.rb b/lib/freeclimb/models/messages_list.rb index 67402a21..faea2efd 100644 --- a/lib/freeclimb/models/messages_list.rb +++ b/lib/freeclimb/models/messages_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class MessagesList @@ -42,14 +40,14 @@ class MessagesList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'messages' => :'messages' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + messages: :messages } end @@ -61,83 +59,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'messages' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + messages: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'messages' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :messages ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MessagesList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MessagesList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'messages') - if (value = attributes[:'messages']).is_a?(Array) + if attributes.key?(:messages) + if (value = attributes[:messages]).is_a?(Array) self.messages = value end end @@ -146,40 +144,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - messages == o.messages + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + messages == other.messages end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -202,15 +198,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -277,7 +273,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/mutable_resource_model.rb b/lib/freeclimb/models/mutable_resource_model.rb index d6bde92f..34ef02ad 100644 --- a/lib/freeclimb/models/mutable_resource_model.rb +++ b/lib/freeclimb/models/mutable_resource_model.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class MutableResourceModel @@ -30,10 +28,10 @@ class MutableResourceModel # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision } end @@ -45,84 +43,81 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::MutableResourceModel` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::MutableResourceModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -145,15 +140,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -220,7 +215,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/out_dial.rb b/lib/freeclimb/models/out_dial.rb index dc99e2c3..e526a13c 100644 --- a/lib/freeclimb/models/out_dial.rb +++ b/lib/freeclimb/models/out_dial.rb @@ -1,22 +1,20 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The OutDial command is used to call a phone number class OutDial < PerclCommand - # URL to which FreeClimb sends an HTTP POST request. + # URL to which FreeClimb sends an HTTP POST request. attr_accessor :action_url # URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. @@ -25,7 +23,7 @@ class OutDial < PerclCommand # he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. attr_accessor :calling_number - # E.164 representation of the phone number to Call. + # E.164 representation of the phone number to Call. attr_accessor :destination attr_accessor :if_machine @@ -70,16 +68,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'call_connect_url' => :'callConnectUrl', - :'calling_number' => :'callingNumber', - :'destination' => :'destination', - :'if_machine' => :'ifMachine', - :'if_machine_url' => :'ifMachineUrl', - :'send_digits' => :'sendDigits', - :'status_callback_url' => :'statusCallbackUrl', - :'timeout' => :'timeout', - :'privacy_mode' => :'privacyMode' + action_url: :actionUrl, + call_connect_url: :callConnectUrl, + calling_number: :callingNumber, + destination: :destination, + if_machine: :ifMachine, + if_machine_url: :ifMachineUrl, + send_digits: :sendDigits, + status_callback_url: :statusCallbackUrl, + timeout: :timeout, + privacy_mode: :privacyMode } end @@ -91,88 +89,87 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'call_connect_url' => :'String', - :'calling_number' => :'String', - :'destination' => :'String', - :'if_machine' => :'IfMachine', - :'if_machine_url' => :'String', - :'send_digits' => :'String', - :'status_callback_url' => :'String', - :'timeout' => :'Integer', - :'privacy_mode' => :'Boolean' + action_url: :String, + call_connect_url: :String, + calling_number: :String, + destination: :String, + if_machine: :IfMachine, + if_machine_url: :String, + send_digits: :String, + status_callback_url: :String, + timeout: :Integer, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::OutDial` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::OutDial`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'call_connect_url') - self.call_connect_url = attributes[:'call_connect_url'] + if attributes.key?(:call_connect_url) + self.call_connect_url = attributes[:call_connect_url] end - if attributes.key?(:'calling_number') - self.calling_number = attributes[:'calling_number'] + if attributes.key?(:calling_number) + self.calling_number = attributes[:calling_number] end - if attributes.key?(:'destination') - self.destination = attributes[:'destination'] + if attributes.key?(:destination) + self.destination = attributes[:destination] end - if attributes.key?(:'if_machine') - self.if_machine = attributes[:'if_machine'] + if attributes.key?(:if_machine) + self.if_machine = attributes[:if_machine] end - if attributes.key?(:'if_machine_url') - self.if_machine_url = attributes[:'if_machine_url'] + if attributes.key?(:if_machine_url) + self.if_machine_url = attributes[:if_machine_url] end - if attributes.key?(:'send_digits') - self.send_digits = attributes[:'send_digits'] + if attributes.key?(:send_digits) + self.send_digits = attributes[:send_digits] end - if attributes.key?(:'status_callback_url') - self.status_callback_url = attributes[:'status_callback_url'] + if attributes.key?(:status_callback_url) + self.status_callback_url = attributes[:status_callback_url] end - if attributes.key?(:'timeout') - self.timeout = attributes[:'timeout'] + if attributes.key?(:timeout) + self.timeout = attributes[:timeout] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "OutDial" end @@ -203,35 +200,34 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - call_connect_url == o.call_connect_url && - calling_number == o.calling_number && - destination == o.destination && - if_machine == o.if_machine && - if_machine_url == o.if_machine_url && - send_digits == o.send_digits && - status_callback_url == o.status_callback_url && - timeout == o.timeout && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + call_connect_url == other.call_connect_url && + calling_number == other.calling_number && + destination == other.destination && + if_machine == other.if_machine && + if_machine_url == other.if_machine_url && + send_digits == other.send_digits && + status_callback_url == other.status_callback_url && + timeout == other.timeout && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -252,18 +248,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -330,7 +326,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/out_dial_api_connect_webhook.rb b/lib/freeclimb/models/out_dial_api_connect_webhook.rb index c09c25ac..c6e7f6b7 100644 --- a/lib/freeclimb/models/out_dial_api_connect_webhook.rb +++ b/lib/freeclimb/models/out_dial_api_connect_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An outbound call initiated by the REST API has connected and the callConnectUrl specified in the API request is being invoked. A PerCL response is expected if the call was successfully connected (with status of inProgress). @@ -19,8 +17,8 @@ class OutDialApiConnectWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h OutDialApiConnectWebhook.new(hash) end # Context or reason why this request is being made. Will be outDialApiConnect - An outbound call spawned by the REST API has connected and the callConnectUrl specified in the API request is being invoked. @@ -76,16 +74,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + parent_call_id: :parentCallId } end @@ -97,134 +95,132 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'parent_call_id' => :'String' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::OutDialApiConnectWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::OutDialApiConnectWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -245,18 +241,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -323,7 +319,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/out_dial_connect_webhook.rb b/lib/freeclimb/models/out_dial_connect_webhook.rb index 36e94e48..fe8462f3 100644 --- a/lib/freeclimb/models/out_dial_connect_webhook.rb +++ b/lib/freeclimb/models/out_dial_connect_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A Call generated by OutDial has connected and the callConnectUrl is being invoked. This request is made in the context of the Call leg that was generated using OutDial and not the parent (the OutDialStart webhook is invoked on the parent call to continue that call context). A PerCL response is expected if the call was successfully connected (as indicated by status of inProgress) and begins the execution context for this (child) call. @@ -19,8 +17,8 @@ class OutDialConnectWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h OutDialConnectWebhook.new(hash) end # Context or reason why this request is being made. Will be outDialConnect - A Call generated by OutDial has connected and the callConnectUrl is being invoked. @@ -76,16 +74,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + parent_call_id: :parentCallId } end @@ -97,134 +95,132 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'parent_call_id' => :'String' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::OutDialConnectWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::OutDialConnectWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -245,18 +241,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -323,7 +319,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/out_dial_start_webhook.rb b/lib/freeclimb/models/out_dial_start_webhook.rb index b935a03d..5a42e5e6 100644 --- a/lib/freeclimb/models/out_dial_start_webhook.rb +++ b/lib/freeclimb/models/out_dial_start_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The OutDial command has started and the actionUrl is being invoked. This request is made in the context of the parent call (Call leg that invoked). A PerCL response is expected. @@ -19,8 +17,8 @@ class OutDialStartWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h OutDialStartWebhook.new(hash) end # Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked. @@ -79,17 +77,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'dial_call_id' => :'dialCallId', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + dial_call_id: :dialCallId, + parent_call_id: :parentCallId } end @@ -101,141 +99,139 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'dial_call_id' => :'String', - :'parent_call_id' => :'String' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + dial_call_id: :String, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', - :'parent_call_id' + :call_status, + :direction, + :conference_id, + :queue_id, + :parent_call_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::OutDialStartWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::OutDialStartWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'dial_call_id') - self.dial_call_id = attributes[:'dial_call_id'] + if attributes.key?(:dial_call_id) + self.dial_call_id = attributes[:dial_call_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - dial_call_id == o.dial_call_id && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + dial_call_id == other.dial_call_id && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -256,18 +252,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -334,7 +330,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/pagination_model.rb b/lib/freeclimb/models/pagination_model.rb index 49e86a84..a368746d 100644 --- a/lib/freeclimb/models/pagination_model.rb +++ b/lib/freeclimb/models/pagination_model.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class PaginationModel @@ -39,13 +37,13 @@ class PaginationModel # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri } end @@ -57,109 +55,107 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::PaginationModel` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::PaginationModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -182,15 +178,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -257,7 +253,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/park.rb b/lib/freeclimb/models/park.rb index 8120fcd0..c7231c8b 100644 --- a/lib/freeclimb/models/park.rb +++ b/lib/freeclimb/models/park.rb @@ -1,20 +1,18 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb - # The `Park` command allows a caller to be put on hold. You can provide hold music,messages,etc until ready to resume the call. Park is a terminal command. Actions performed on the Call while on hold are provided in a PerCL script in response to the waitUrl property. Actions performed on the Call after it has been unparked (resumed) will be provided in a PerCL script in response to the actionUrl provided. A Call can be resumed in two ways -- REST API invocation or the Unpark percl command. No actions can be nested within Park and Park cannot be nested in any other actions. + # The `Park` command allows a caller to be put on hold. You can provide hold music,messages,etc until ready to resume the call. Park is a terminal command. Actions performed on the Call while on hold are provided in a PerCL script in response to the waitUrl property. Actions performed on the Call after it has been unparked (resumed) will be provided in a PerCL script in response to the actionUrl provided. A Call can be resumed in two ways -- REST API invocation or the Unpark percl command. No actions can be nested within Park and Park cannot be nested in any other actions. class Park < PerclCommand # Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. attr_accessor :wait_url @@ -28,9 +26,9 @@ class Park < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'wait_url' => :'waitUrl', - :'action_url' => :'actionUrl', - :'notification_url' => :'notificationUrl' + wait_url: :waitUrl, + action_url: :actionUrl, + notification_url: :notificationUrl } end @@ -42,53 +40,52 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'wait_url' => :'String', - :'action_url' => :'String', - :'notification_url' => :'String' + wait_url: :String, + action_url: :String, + notification_url: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Park` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Park`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'wait_url') - self.wait_url = attributes[:'wait_url'] + if attributes.key?(:wait_url) + self.wait_url = attributes[:wait_url] end - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end self.command = "Park" end @@ -111,28 +108,27 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @wait_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - wait_url == o.wait_url && - action_url == o.action_url && - notification_url == o.notification_url && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + wait_url == other.wait_url && + action_url == other.action_url && + notification_url == other.notification_url && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -153,18 +149,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -231,7 +227,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/pause.rb b/lib/freeclimb/models/pause.rb index 21ea880a..17e0d06a 100644 --- a/lib/freeclimb/models/pause.rb +++ b/lib/freeclimb/models/pause.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Pause` command halts execution of the current PerCL script for a specified number of milliseconds. If `Pause` is the first command in a PerCL document, FreeClimb will wait for the specified time to elapse before picking up the call. @@ -22,7 +20,7 @@ class Pause < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'length' => :'length' + length: :length } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'length' => :'Integer' + length: :Integer } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Pause` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Pause`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'length') - self.length = attributes[:'length'] + if attributes.key?(:length) + self.length = attributes[:length] end self.command = "Pause" end @@ -89,26 +86,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @length.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - length == o.length && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + length == other.length && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -129,18 +125,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -207,7 +203,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/percl_command.rb b/lib/freeclimb/models/percl_command.rb index b8770da3..9d8ea5b3 100644 --- a/lib/freeclimb/models/percl_command.rb +++ b/lib/freeclimb/models/percl_command.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # An individual command used in a PerCLScript. @@ -22,7 +20,7 @@ class PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'command' => :'command' + command: :command } end @@ -34,71 +32,68 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'command' => :'String' + command: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # discriminator's property name in OpenAPI v3 def self.openapi_discriminator_name - :'command' + :command end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::PerclCommand` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::PerclCommand`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'command') - self.command = attributes[:'command'] + if attributes.key?(:command) + self.command = attributes[:command] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @command.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - command == o.command + def ==(other) + return true if equal?(other) + self.class == other.class && + command == other.command end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -121,15 +116,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -196,7 +191,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) @@ -224,15 +219,16 @@ def _to_hash(value) value end end + def to_percl_hash command = self.command attributes = self.class.attribute_map percl_hash = attributes.each_with_object({}) do |(attr, percl_attr), hash| - value = self.send(attr) + value = send(attr) if value.is_a?(Array) - hash[percl_attr] = value.compact.map { |v| v.is_a?(PerclCommand) ? v.to_percl_hash() : v } + hash[percl_attr] = value.compact.map { |v| v.is_a?(PerclCommand) ? v.to_percl_hash : v } elsif value.is_a?(PerclCommand) - hash[percl_attr] = value.to_percl_hash() + hash[percl_attr] = value.to_percl_hash elsif !value.nil? hash[percl_attr] = value end diff --git a/lib/freeclimb/models/percl_script.rb b/lib/freeclimb/models/percl_script.rb index b2dd1a2c..b2dbee94 100644 --- a/lib/freeclimb/models/percl_script.rb +++ b/lib/freeclimb/models/percl_script.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A PerCL script to be returned to the FreeClimb servers in FreeClimb applications @@ -22,7 +20,7 @@ class PerclScript # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'commands' => :'commands' + commands: :commands } end @@ -34,33 +32,32 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'commands' => :'Array' + commands: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::PerclScript` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::PerclScript`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'commands') - if (value = attributes[:'commands']).is_a?(Array) + if attributes.key?(:commands) + if (value = attributes[:commands]).is_a?(Array) self.commands = value end end @@ -69,33 +66,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @commands.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - commands == o.commands + def ==(other) + return true if equal?(other) + self.class == other.class && + commands == other.commands end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -118,15 +113,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -193,7 +188,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) @@ -221,6 +216,7 @@ def _to_hash(value) value end end + def to_json commands = self.commands.map { |command| command.to_percl_hash } commands.to_json diff --git a/lib/freeclimb/models/play.rb b/lib/freeclimb/models/play.rb index 99e27576..815e7f10 100644 --- a/lib/freeclimb/models/play.rb +++ b/lib/freeclimb/models/play.rb @@ -1,22 +1,20 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Play` command plays an audio file back to the caller. The audio file may be located at any location accessible via a URL. `Play` can exist as a stand-alone command or as a nested command. It does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. class Play < PerclCommand - # RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. + # RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. attr_accessor :file # Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up. @@ -28,9 +26,9 @@ class Play < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'file' => :'file', - :'loop' => :'loop', - :'privacy_mode' => :'privacyMode' + file: :file, + loop: :loop, + privacy_mode: :privacyMode } end @@ -42,53 +40,52 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'file' => :'String', - :'loop' => :'Integer', - :'privacy_mode' => :'Boolean' + file: :String, + loop: :Integer, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Play` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Play`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'file') - self.file = attributes[:'file'] + if attributes.key?(:file) + self.file = attributes[:file] end - if attributes.key?(:'loop') - self.loop = attributes[:'loop'] + if attributes.key?(:loop) + self.loop = attributes[:loop] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "Play" end @@ -107,28 +104,27 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @file.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - file == o.file && - loop == o.loop && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + file == other.file && + loop == other.loop && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -149,18 +145,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -227,7 +223,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/play_beep.rb b/lib/freeclimb/models/play_beep.rb index 5c85c7ba..af867ff5 100644 --- a/lib/freeclimb/models/play_beep.rb +++ b/lib/freeclimb/models/play_beep.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class PlayBeep @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = PlayBeep.constants.select { |c| PlayBeep::const_get(c) == value } + constantValues = PlayBeep.constants.select { |c| PlayBeep.const_get(c) == value } raise "Invalid ENUM value #{value} for class #PlayBeep" if constantValues.empty? value end diff --git a/lib/freeclimb/models/play_early_media.rb b/lib/freeclimb/models/play_early_media.rb index cce0fa8b..cb606d25 100644 --- a/lib/freeclimb/models/play_early_media.rb +++ b/lib/freeclimb/models/play_early_media.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # `PlayEarlyMedia` is relevant only when present as the very first command in the PerCL script returned for an incoming Call. In such cases, the command is executed before FreeClimb attempts to connect the call. The audio file it uses can be stored in any location that is accessible via URL. @@ -22,7 +20,7 @@ class PlayEarlyMedia < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'file' => :'file' + file: :file } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'file' => :'String' + file: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::PlayEarlyMedia` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::PlayEarlyMedia`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'file') - self.file = attributes[:'file'] + if attributes.key?(:file) + self.file = attributes[:file] end self.command = "PlayEarlyMedia" end @@ -89,26 +86,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @file.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - file == o.file && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + file == other.file && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -129,18 +125,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -207,7 +203,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_list.rb b/lib/freeclimb/models/queue_list.rb index 69487b8d..f2b89e10 100644 --- a/lib/freeclimb/models/queue_list.rb +++ b/lib/freeclimb/models/queue_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class QueueList @@ -41,14 +39,14 @@ class QueueList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'queues' => :'queues' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + queues: :queues } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'queues' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + queues: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'queues' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :queues ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'queues') - if (value = attributes[:'queues']).is_a?(Array) + if attributes.key?(:queues) + if (value = attributes[:queues]).is_a?(Array) self.queues = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - queues == o.queues + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + queues == other.queues end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_member.rb b/lib/freeclimb/models/queue_member.rb index 74d35ee2..f55460ef 100644 --- a/lib/freeclimb/models/queue_member.rb +++ b/lib/freeclimb/models/queue_member.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class QueueMember @@ -33,11 +31,11 @@ class QueueMember # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'call_id' => :'callId', - :'wait_time' => :'waitTime', - :'position' => :'position', - :'date_enqueued' => :'dateEnqueued' + uri: :uri, + call_id: :callId, + wait_time: :waitTime, + position: :position, + date_enqueued: :dateEnqueued } end @@ -49,95 +47,93 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'call_id' => :'String', - :'wait_time' => :'Integer', - :'position' => :'Integer', - :'date_enqueued' => :'String' + uri: :String, + call_id: :String, + wait_time: :Integer, + position: :Integer, + date_enqueued: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'uri', - :'call_id', - :'wait_time', - :'position', - :'date_enqueued' + :uri, + :call_id, + :wait_time, + :position, + :date_enqueued ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueMember` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueMember`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'wait_time') - self.wait_time = attributes[:'wait_time'] + if attributes.key?(:wait_time) + self.wait_time = attributes[:wait_time] end - if attributes.key?(:'position') - self.position = attributes[:'position'] + if attributes.key?(:position) + self.position = attributes[:position] end - if attributes.key?(:'date_enqueued') - self.date_enqueued = attributes[:'date_enqueued'] + if attributes.key?(:date_enqueued) + self.date_enqueued = attributes[:date_enqueued] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - call_id == o.call_id && - wait_time == o.wait_time && - position == o.position && - date_enqueued == o.date_enqueued + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + call_id == other.call_id && + wait_time == other.wait_time && + position == other.position && + date_enqueued == other.date_enqueued end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -160,15 +156,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -235,7 +231,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_member_list.rb b/lib/freeclimb/models/queue_member_list.rb index 9c3d7648..0624c8fa 100644 --- a/lib/freeclimb/models/queue_member_list.rb +++ b/lib/freeclimb/models/queue_member_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class QueueMemberList @@ -41,14 +39,14 @@ class QueueMemberList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'queue_members' => :'queueMembers' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + queue_members: :queueMembers } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'queue_members' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + queue_members: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'queue_members' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :queue_members ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueMemberList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueMemberList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'queue_members') - if (value = attributes[:'queue_members']).is_a?(Array) + if attributes.key?(:queue_members) + if (value = attributes[:queue_members]).is_a?(Array) self.queue_members = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - queue_members == o.queue_members + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + queue_members == other.queue_members end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_request.rb b/lib/freeclimb/models/queue_request.rb index 02c3ed5d..9822b4f9 100644 --- a/lib/freeclimb/models/queue_request.rb +++ b/lib/freeclimb/models/queue_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class QueueRequest @@ -24,8 +22,8 @@ class QueueRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_alias' => :'alias', - :'max_size' => :'maxSize' + _alias: :alias, + max_size: :maxSize } end @@ -37,74 +35,71 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_alias' => :'String', - :'max_size' => :'Integer' + _alias: :String, + max_size: :Integer } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'max_size') - self.max_size = attributes[:'max_size'] + self.max_size = if attributes.key?(:max_size) + attributes[:max_size] else - self.max_size = 100 + 100 end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @_alias.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _alias == o._alias && - max_size == o.max_size + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + max_size == other.max_size end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -127,15 +122,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -202,7 +197,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_result.rb b/lib/freeclimb/models/queue_result.rb index 9f88d627..1e64ed10 100644 --- a/lib/freeclimb/models/queue_result.rb +++ b/lib/freeclimb/models/queue_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class QueueResult @@ -51,17 +49,17 @@ class QueueResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'account_id' => :'accountId', - :'queue_id' => :'queueId', - :'_alias' => :'alias', - :'max_size' => :'maxSize', - :'current_size' => :'currentSize', - :'average_queue_removal_time' => :'averageQueueRemovalTime', - :'subresource_uris' => :'subresourceUris' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + account_id: :accountId, + queue_id: :queueId, + _alias: :alias, + max_size: :maxSize, + current_size: :currentSize, + average_queue_removal_time: :averageQueueRemovalTime, + subresource_uris: :subresourceUris } end @@ -73,140 +71,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'account_id' => :'String', - :'queue_id' => :'String', - :'_alias' => :'String', - :'max_size' => :'Integer', - :'current_size' => :'Integer', - :'average_queue_removal_time' => :'Integer', - :'subresource_uris' => :'Object' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + account_id: :String, + queue_id: :String, + _alias: :String, + max_size: :Integer, + current_size: :Integer, + average_queue_removal_time: :Integer, + subresource_uris: :Object } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'queue_id', - :'_alias', - :'max_size', - :'current_size', - :'average_queue_removal_time', - :'subresource_uris' + :account_id, + :queue_id, + :_alias, + :max_size, + :current_size, + :average_queue_removal_time, + :subresource_uris ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'max_size') - self.max_size = attributes[:'max_size'] + if attributes.key?(:max_size) + self.max_size = attributes[:max_size] end - if attributes.key?(:'current_size') - self.current_size = attributes[:'current_size'] + if attributes.key?(:current_size) + self.current_size = attributes[:current_size] end - if attributes.key?(:'average_queue_removal_time') - self.average_queue_removal_time = attributes[:'average_queue_removal_time'] + if attributes.key?(:average_queue_removal_time) + self.average_queue_removal_time = attributes[:average_queue_removal_time] end - if attributes.key?(:'subresource_uris') - self.subresource_uris = attributes[:'subresource_uris'] + if attributes.key?(:subresource_uris) + self.subresource_uris = attributes[:subresource_uris] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - account_id == o.account_id && - queue_id == o.queue_id && - _alias == o._alias && - max_size == o.max_size && - current_size == o.current_size && - average_queue_removal_time == o.average_queue_removal_time && - subresource_uris == o.subresource_uris + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + account_id == other.account_id && + queue_id == other.queue_id && + _alias == other._alias && + max_size == other.max_size && + current_size == other.current_size && + average_queue_removal_time == other.average_queue_removal_time && + subresource_uris == other.subresource_uris end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -229,15 +225,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -304,7 +300,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/queue_result_status.rb b/lib/freeclimb/models/queue_result_status.rb index 613c2ca7..8bff9474 100644 --- a/lib/freeclimb/models/queue_result_status.rb +++ b/lib/freeclimb/models/queue_result_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class QueueResultStatus @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = QueueResultStatus.constants.select { |c| QueueResultStatus::const_get(c) == value } + constantValues = QueueResultStatus.constants.select { |c| QueueResultStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #QueueResultStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/queue_wait_webhook.rb b/lib/freeclimb/models/queue_wait_webhook.rb index 726dd232..1bd93497 100644 --- a/lib/freeclimb/models/queue_wait_webhook.rb +++ b/lib/freeclimb/models/queue_wait_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A queued Call is requesting instructions to execute during the wait in the Queue and the corresponding waitUrl is being invoked. A PerCL response is expected. The following are the only PerCL commands supported in the PerCL script response to a request to the waitUrl: Play,Say,Pause,GetDigits,Dequeue,Hangup @@ -19,8 +17,8 @@ class QueueWaitWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h QueueWaitWebhook.new(hash) end # Context or reason why this request is being made. Will be queueWait - A queued call is requesting instructions to execute during the wait in the queue and the corresponding waitUrl is being invoked. @@ -82,18 +80,18 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'queue_position' => :'queuePosition', - :'queue_time' => :'queueTime', - :'current_queue_size' => :'currentQueueSize' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + queue_position: :queuePosition, + queue_time: :queueTime, + current_queue_size: :currentQueueSize } end @@ -105,146 +103,144 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'queue_position' => :'String', - :'queue_time' => :'Integer', - :'current_queue_size' => :'Integer' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + queue_position: :String, + queue_time: :Integer, + current_queue_size: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::QueueWaitWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::QueueWaitWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'queue_position') - self.queue_position = attributes[:'queue_position'] + if attributes.key?(:queue_position) + self.queue_position = attributes[:queue_position] end - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] + if attributes.key?(:queue_time) + self.queue_time = attributes[:queue_time] end - if attributes.key?(:'current_queue_size') - self.current_queue_size = attributes[:'current_queue_size'] + if attributes.key?(:current_queue_size) + self.current_queue_size = attributes[:current_queue_size] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - queue_position == o.queue_position && - queue_time == o.queue_time && - current_queue_size == o.current_queue_size && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + queue_position == other.queue_position && + queue_time == other.queue_time && + current_queue_size == other.current_queue_size && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -265,18 +261,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -343,7 +339,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/record_utterance.rb b/lib/freeclimb/models/record_utterance.rb index 199dec74..7c3b062b 100644 --- a/lib/freeclimb/models/record_utterance.rb +++ b/lib/freeclimb/models/record_utterance.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `RecordUtterance` command records the caller's voice and returns the URL of a file containing the audio recording. `RecordUtterance` is blocking and is a terminal command. As such, the `actionUrl` property is required, and control of the Call picks up using the PerCL returned in response to the `actionUrl`. Recording information is returned in the `actionUrl` request. @@ -40,13 +38,13 @@ class RecordUtterance < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'silence_timeout_ms' => :'silenceTimeoutMs', - :'finish_on_key' => :'finishOnKey', - :'max_length_sec' => :'maxLengthSec', - :'play_beep' => :'playBeep', - :'auto_start' => :'autoStart', - :'privacy_mode' => :'privacyMode' + action_url: :actionUrl, + silence_timeout_ms: :silenceTimeoutMs, + finish_on_key: :finishOnKey, + max_length_sec: :maxLengthSec, + play_beep: :playBeep, + auto_start: :autoStart, + privacy_mode: :privacyMode } end @@ -58,73 +56,72 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'silence_timeout_ms' => :'Integer', - :'finish_on_key' => :'String', - :'max_length_sec' => :'Integer', - :'play_beep' => :'Boolean', - :'auto_start' => :'Boolean', - :'privacy_mode' => :'Boolean' + action_url: :String, + silence_timeout_ms: :Integer, + finish_on_key: :String, + max_length_sec: :Integer, + play_beep: :Boolean, + auto_start: :Boolean, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RecordUtterance` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RecordUtterance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'silence_timeout_ms') - self.silence_timeout_ms = attributes[:'silence_timeout_ms'] + if attributes.key?(:silence_timeout_ms) + self.silence_timeout_ms = attributes[:silence_timeout_ms] end - if attributes.key?(:'finish_on_key') - self.finish_on_key = attributes[:'finish_on_key'] + if attributes.key?(:finish_on_key) + self.finish_on_key = attributes[:finish_on_key] end - if attributes.key?(:'max_length_sec') - self.max_length_sec = attributes[:'max_length_sec'] + if attributes.key?(:max_length_sec) + self.max_length_sec = attributes[:max_length_sec] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'auto_start') - self.auto_start = attributes[:'auto_start'] + if attributes.key?(:auto_start) + self.auto_start = attributes[:auto_start] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "RecordUtterance" end @@ -143,32 +140,31 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - silence_timeout_ms == o.silence_timeout_ms && - finish_on_key == o.finish_on_key && - max_length_sec == o.max_length_sec && - play_beep == o.play_beep && - auto_start == o.auto_start && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + silence_timeout_ms == other.silence_timeout_ms && + finish_on_key == other.finish_on_key && + max_length_sec == other.max_length_sec && + play_beep == other.play_beep && + auto_start == other.auto_start && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -189,18 +185,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -267,7 +263,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/record_utterance_term_reason.rb b/lib/freeclimb/models/record_utterance_term_reason.rb index 934d524b..6a9fc713 100644 --- a/lib/freeclimb/models/record_utterance_term_reason.rb +++ b/lib/freeclimb/models/record_utterance_term_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class RecordUtteranceTermReason @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = RecordUtteranceTermReason.constants.select { |c| RecordUtteranceTermReason::const_get(c) == value } + constantValues = RecordUtteranceTermReason.constants.select { |c| RecordUtteranceTermReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #RecordUtteranceTermReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/record_webhook.rb b/lib/freeclimb/models/record_webhook.rb index ba48684e..2b066748 100644 --- a/lib/freeclimb/models/record_webhook.rb +++ b/lib/freeclimb/models/record_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The RecordUtterance command has completed and its actionUrl is being invoked. @@ -19,8 +17,8 @@ class RecordWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h RecordWebhook.new(hash) end # The context or reason why this request is being made. Will be record - The RecordUtterance command has completed and its actionUrl is being invoked. @@ -96,23 +94,23 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'recording_id' => :'recordingId', - :'recording_url' => :'recordingUrl', - :'recording_size' => :'recordingSize', - :'recording_format' => :'recordingFormat', - :'recording_duration_sec' => :'recordingDurationSec', - :'term_reason' => :'termReason', - :'parent_call_id' => :'parentCallId', - :'privacy_mode' => :'privacyMode' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + recording_id: :recordingId, + recording_url: :recordingUrl, + recording_size: :recordingSize, + recording_format: :recordingFormat, + recording_duration_sec: :recordingDurationSec, + term_reason: :termReason, + parent_call_id: :parentCallId, + privacy_mode: :privacyMode } end @@ -124,176 +122,174 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'recording_id' => :'String', - :'recording_url' => :'String', - :'recording_size' => :'String', - :'recording_format' => :'String', - :'recording_duration_sec' => :'Integer', - :'term_reason' => :'RecordUtteranceTermReason', - :'parent_call_id' => :'String', - :'privacy_mode' => :'Boolean' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + recording_id: :String, + recording_url: :String, + recording_size: :String, + recording_format: :String, + recording_duration_sec: :Integer, + term_reason: :RecordUtteranceTermReason, + parent_call_id: :String, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RecordWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RecordWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_size') - self.recording_size = attributes[:'recording_size'] + if attributes.key?(:recording_size) + self.recording_size = attributes[:recording_size] end - if attributes.key?(:'recording_format') - self.recording_format = attributes[:'recording_format'] + if attributes.key?(:recording_format) + self.recording_format = attributes[:recording_format] end - if attributes.key?(:'recording_duration_sec') - self.recording_duration_sec = attributes[:'recording_duration_sec'] + if attributes.key?(:recording_duration_sec) + self.recording_duration_sec = attributes[:recording_duration_sec] end - if attributes.key?(:'term_reason') - self.term_reason = attributes[:'term_reason'] + if attributes.key?(:term_reason) + self.term_reason = attributes[:term_reason] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - recording_id == o.recording_id && - recording_url == o.recording_url && - recording_size == o.recording_size && - recording_format == o.recording_format && - recording_duration_sec == o.recording_duration_sec && - term_reason == o.term_reason && - parent_call_id == o.parent_call_id && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + recording_id == other.recording_id && + recording_url == other.recording_url && + recording_size == other.recording_size && + recording_format == other.recording_format && + recording_duration_sec == other.recording_duration_sec && + term_reason == other.term_reason && + parent_call_id == other.parent_call_id && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -314,18 +310,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -392,7 +388,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/recording_list.rb b/lib/freeclimb/models/recording_list.rb index 008ef5bc..d73d7580 100644 --- a/lib/freeclimb/models/recording_list.rb +++ b/lib/freeclimb/models/recording_list.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class RecordingList @@ -41,14 +39,14 @@ class RecordingList # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'recordings' => :'recordings' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + recordings: :recordings } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'recordings' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + recordings: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'recordings' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :recordings ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RecordingList` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RecordingList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'recordings') - if (value = attributes[:'recordings']).is_a?(Array) + if attributes.key?(:recordings) + if (value = attributes[:recordings]).is_a?(Array) self.recordings = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - recordings == o.recordings + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + recordings == other.recordings end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/recording_result.rb b/lib/freeclimb/models/recording_result.rb index a9507ef6..4089c8de 100644 --- a/lib/freeclimb/models/recording_result.rb +++ b/lib/freeclimb/models/recording_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class RecordingResult @@ -45,15 +43,15 @@ class RecordingResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'uri' => :'uri', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision', - :'recording_id' => :'recordingId', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'duration_sec' => :'durationSec', - :'conference_id' => :'conferenceId' + uri: :uri, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision, + recording_id: :recordingId, + account_id: :accountId, + call_id: :callId, + duration_sec: :durationSec, + conference_id: :conferenceId } end @@ -65,126 +63,124 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'uri' => :'String', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer', - :'recording_id' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'duration_sec' => :'Integer', - :'conference_id' => :'String' + uri: :String, + date_created: :String, + date_updated: :String, + revision: :Integer, + recording_id: :String, + account_id: :String, + call_id: :String, + duration_sec: :Integer, + conference_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'recording_id', - :'account_id', - :'call_id', - :'duration_sec', - :'conference_id' + :recording_id, + :account_id, + :call_id, + :duration_sec, + :conference_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'MutableResourceModel' + :MutableResourceModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RecordingResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RecordingResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'uri') - self.uri = attributes[:'uri'] + if attributes.key?(:uri) + self.uri = attributes[:uri] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'duration_sec') - self.duration_sec = attributes[:'duration_sec'] + if attributes.key?(:duration_sec) + self.duration_sec = attributes[:duration_sec] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @uri.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - uri == o.uri && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision && - recording_id == o.recording_id && - account_id == o.account_id && - call_id == o.call_id && - duration_sec == o.duration_sec && - conference_id == o.conference_id + def ==(other) + return true if equal?(other) + self.class == other.class && + uri == other.uri && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision && + recording_id == other.recording_id && + account_id == other.account_id && + call_id == other.call_id && + duration_sec == other.duration_sec && + conference_id == other.conference_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -207,15 +203,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -282,7 +278,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/redirect.rb b/lib/freeclimb/models/redirect.rb index a452fd92..2ee64cba 100644 --- a/lib/freeclimb/models/redirect.rb +++ b/lib/freeclimb/models/redirect.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Redirect` command transfers control of a Call to the PerCL at a different URL. `Redirect` is a terminal command, so any actions following it are never executed. The maximum number of redirections allowed during the life time of a Call is 256. This is intended to prevent a Call from possibly looping infinitely due to errors in PerCL being generated. @@ -22,7 +20,7 @@ class Redirect < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl' + action_url: :actionUrl } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String' + action_url: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Redirect` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Redirect`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end self.command = "Redirect" end @@ -89,26 +86,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -129,18 +125,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -207,7 +203,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/redirect_webhook.rb b/lib/freeclimb/models/redirect_webhook.rb index 97072103..9ff24c2e 100644 --- a/lib/freeclimb/models/redirect_webhook.rb +++ b/lib/freeclimb/models/redirect_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected. @@ -19,8 +17,8 @@ class RedirectWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h RedirectWebhook.new(hash) end # Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked. @@ -76,16 +74,16 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'parent_call_id' => :'parentCallId' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + parent_call_id: :parentCallId } end @@ -97,134 +95,132 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'parent_call_id' => :'String' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + parent_call_id: :String } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RedirectWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RedirectWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'parent_call_id') - self.parent_call_id = attributes[:'parent_call_id'] + if attributes.key?(:parent_call_id) + self.parent_call_id = attributes[:parent_call_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - parent_call_id == o.parent_call_id && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + parent_call_id == other.parent_call_id && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -245,18 +241,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -323,7 +319,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/reject.rb b/lib/freeclimb/models/reject.rb index 2e7e5999..14297e02 100644 --- a/lib/freeclimb/models/reject.rb +++ b/lib/freeclimb/models/reject.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Reject` command blocks an incoming Call. Using `Reject` is the only way to prevent FreeClimb from answering a Call. Any other response will result in an answered Call and your account will be billed. @@ -22,7 +20,7 @@ class Reject < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'reason' => :'reason' + reason: :reason } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'reason' => :'String' + reason: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Reject` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Reject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'reason') - self.reason = attributes[:'reason'] + if attributes.key?(:reason) + self.reason = attributes[:reason] end self.command = "Reject" end @@ -78,33 +75,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @reason.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - reason == o.reason && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + reason == other.reason && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,18 +120,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -203,7 +198,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/remove_from_conference.rb b/lib/freeclimb/models/remove_from_conference.rb index ec411768..4b6fb5a8 100644 --- a/lib/freeclimb/models/remove_from_conference.rb +++ b/lib/freeclimb/models/remove_from_conference.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `RemoveFromConference` command removes a Participant from a Conference but does not hang up. Instead, the Call is simply unbridged and what happens next with the Call is determined by the PerCL returned in response to the `leaveConferenceUrl` attribute. @@ -33,62 +31,59 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RemoveFromConference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RemoveFromConference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super self.command = "RemoveFromConference" end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -109,18 +104,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -187,7 +182,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/remove_from_queue_notification_webhook.rb b/lib/freeclimb/models/remove_from_queue_notification_webhook.rb index 9b9e3534..3f268c35 100644 --- a/lib/freeclimb/models/remove_from_queue_notification_webhook.rb +++ b/lib/freeclimb/models/remove_from_queue_notification_webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A call has been removed from a queue and the Enqueue command’s actionUrl is being invoked. A PerCL response is expected except if reason is hangup. @@ -19,8 +17,8 @@ class RemoveFromQueueNotificationWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h RemoveFromQueueNotificationWebhook.new(hash) end # Context or reason why this request is being made. Will be removeFromQueueNotification - A Call has been removed from a Queue and the Enqueue command’s actionUrl is being invoked. @@ -78,17 +76,17 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'call_status' => :'callStatus', - :'direction' => :'direction', - :'conference_id' => :'conferenceId', - :'queue_id' => :'queueId', - :'queue_result' => :'queueResult', - :'queue_time' => :'queueTime' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + call_status: :callStatus, + direction: :direction, + conference_id: :conferenceId, + queue_id: :queueId, + queue_result: :queueResult, + queue_time: :queueTime } end @@ -100,140 +98,138 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'call_status' => :'CallStatus', - :'direction' => :'CallDirection', - :'conference_id' => :'String', - :'queue_id' => :'String', - :'queue_result' => :'QueueResultStatus', - :'queue_time' => :'Integer' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + call_status: :CallStatus, + direction: :CallDirection, + conference_id: :String, + queue_id: :String, + queue_result: :QueueResultStatus, + queue_time: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'call_status', - :'direction', - :'conference_id', - :'queue_id', + :call_status, + :direction, + :conference_id, + :queue_id ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RemoveFromQueueNotificationWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RemoveFromQueueNotificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'call_status') - self.call_status = attributes[:'call_status'] + if attributes.key?(:call_status) + self.call_status = attributes[:call_status] end - if attributes.key?(:'direction') - self.direction = attributes[:'direction'] + if attributes.key?(:direction) + self.direction = attributes[:direction] end - if attributes.key?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:conference_id) + self.conference_id = attributes[:conference_id] end - if attributes.key?(:'queue_id') - self.queue_id = attributes[:'queue_id'] + if attributes.key?(:queue_id) + self.queue_id = attributes[:queue_id] end - if attributes.key?(:'queue_result') - self.queue_result = attributes[:'queue_result'] + if attributes.key?(:queue_result) + self.queue_result = attributes[:queue_result] end - if attributes.key?(:'queue_time') - self.queue_time = attributes[:'queue_time'] + if attributes.key?(:queue_time) + self.queue_time = attributes[:queue_time] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - call_status == o.call_status && - direction == o.direction && - conference_id == o.conference_id && - queue_id == o.queue_id && - queue_result == o.queue_result && - queue_time == o.queue_time && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + call_status == other.call_status && + direction == other.direction && + conference_id == other.conference_id && + queue_id == other.queue_id && + queue_result == other.queue_result && + queue_time == other.queue_time && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -254,18 +250,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -332,7 +328,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/request_type.rb b/lib/freeclimb/models/request_type.rb index bcac768e..fb58f73c 100644 --- a/lib/freeclimb/models/request_type.rb +++ b/lib/freeclimb/models/request_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class RequestType @@ -50,7 +48,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = RequestType.constants.select { |c| RequestType::const_get(c) == value } + constantValues = RequestType.constants.select { |c| RequestType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #RequestType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/say.rb b/lib/freeclimb/models/say.rb index 4e5f7f1e..504df71a 100644 --- a/lib/freeclimb/models/say.rb +++ b/lib/freeclimb/models/say.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Say` command provides Text-To-Speech (TTS) support. It converts text to speech and then renders it in a female voice back to the caller. `Say` is useful in cases where it's difficult to pre-record a prompt for any reason. `Say` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. @@ -31,10 +29,10 @@ class Say < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'text' => :'text', - :'language' => :'language', - :'loop' => :'loop', - :'privacy_mode' => :'privacyMode' + text: :text, + language: :language, + loop: :loop, + privacy_mode: :privacyMode } end @@ -46,60 +44,59 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'text' => :'String', - :'language' => :'String', - :'loop' => :'Integer', - :'privacy_mode' => :'Boolean' + text: :String, + language: :String, + loop: :Integer, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Say` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Say`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'language') - self.language = attributes[:'language'] + if attributes.key?(:language) + self.language = attributes[:language] end - if attributes.key?(:'loop') - self.loop = attributes[:'loop'] + self.loop = if attributes.key?(:loop) + attributes[:loop] else - self.loop = 1 + 1 end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "Say" end @@ -118,29 +115,28 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @text.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - text == o.text && - language == o.language && - loop == o.loop && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + text == other.text && + language == other.language && + loop == other.loop && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -161,18 +157,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -239,7 +235,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/send_digits.rb b/lib/freeclimb/models/send_digits.rb index b0bffd31..95b52d55 100644 --- a/lib/freeclimb/models/send_digits.rb +++ b/lib/freeclimb/models/send_digits.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `SendDigits` command plays DTMF tones on a live Call. This is useful for navigating through IVR menus or dialing extensions. @@ -28,9 +26,9 @@ class SendDigits < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'digits' => :'digits', - :'pause_ms' => :'pauseMs', - :'privacy_mode' => :'privacyMode' + digits: :digits, + pause_ms: :pauseMs, + privacy_mode: :privacyMode } end @@ -42,53 +40,52 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'digits' => :'String', - :'pause_ms' => :'Integer', - :'privacy_mode' => :'Boolean' + digits: :String, + pause_ms: :Integer, + privacy_mode: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SendDigits` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SendDigits`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'digits') - self.digits = attributes[:'digits'] + if attributes.key?(:digits) + self.digits = attributes[:digits] end - if attributes.key?(:'pause_ms') - self.pause_ms = attributes[:'pause_ms'] + if attributes.key?(:pause_ms) + self.pause_ms = attributes[:pause_ms] end - if attributes.key?(:'privacy_mode') - self.privacy_mode = attributes[:'privacy_mode'] + if attributes.key?(:privacy_mode) + self.privacy_mode = attributes[:privacy_mode] end self.command = "SendDigits" end @@ -107,28 +104,27 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @digits.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - digits == o.digits && - pause_ms == o.pause_ms && - privacy_mode == o.privacy_mode && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + digits == other.digits && + pause_ms == other.pause_ms && + privacy_mode == other.privacy_mode && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -149,18 +145,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -227,7 +223,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/set_dtmf_pass_through.rb b/lib/freeclimb/models/set_dtmf_pass_through.rb index 00f8cd53..49de960d 100644 --- a/lib/freeclimb/models/set_dtmf_pass_through.rb +++ b/lib/freeclimb/models/set_dtmf_pass_through.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `SetDTMFPassThrough` command enables or disables the dtmfPassThrough privilege for this Conference Participant. If 'true', DTMFs will be passed through from this Participant to all other Participants in the Conference @@ -22,7 +20,7 @@ class SetDTMFPassThrough < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'dtmf_pass_through' => :'dtmfPassThrough' + dtmf_pass_through: :dtmfPassThrough } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'dtmf_pass_through' => :'Boolean' + dtmf_pass_through: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SetDTMFPassThrough` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SetDTMFPassThrough`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'dtmf_pass_through') - self.dtmf_pass_through = attributes[:'dtmf_pass_through'] + if attributes.key?(:dtmf_pass_through) + self.dtmf_pass_through = attributes[:dtmf_pass_through] end self.command = "SetDTMFPassThrough" end @@ -78,33 +75,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @dtmf_pass_through.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - dtmf_pass_through == o.dtmf_pass_through && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + dtmf_pass_through == other.dtmf_pass_through && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,18 +120,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -203,7 +198,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/set_listen.rb b/lib/freeclimb/models/set_listen.rb index b4867e34..91c74b2a 100644 --- a/lib/freeclimb/models/set_listen.rb +++ b/lib/freeclimb/models/set_listen.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `SetListen` command enables or disables the listen privilege for this Conference Participant. The Participant can hear what the other participants are saying only if this privilege is enabled. @@ -22,7 +20,7 @@ class SetListen < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'listen' => :'listen' + listen: :listen } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'listen' => :'Boolean' + listen: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SetListen` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SetListen`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'listen') - self.listen = attributes[:'listen'] + if attributes.key?(:listen) + self.listen = attributes[:listen] end self.command = "SetListen" end @@ -78,33 +75,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @listen.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - listen == o.listen && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + listen == other.listen && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,18 +120,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -203,7 +198,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/set_talk.rb b/lib/freeclimb/models/set_talk.rb index 0c7082f8..18892907 100644 --- a/lib/freeclimb/models/set_talk.rb +++ b/lib/freeclimb/models/set_talk.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `SetTalk` command enables or disables the talk privilege for this Conference Participant. If 'true', no audio from that Participant is shared with the other Participants of the Conference. @@ -22,7 +20,7 @@ class SetTalk < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'talk' => :'talk' + talk: :talk } end @@ -34,43 +32,42 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'talk' => :'Boolean' + talk: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SetTalk` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SetTalk`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'talk') - self.talk = attributes[:'talk'] + if attributes.key?(:talk) + self.talk = attributes[:talk] end self.command = "SetTalk" end @@ -78,33 +75,31 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @talk.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - talk == o.talk && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + talk == other.talk && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -125,18 +120,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -203,7 +198,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms.rb b/lib/freeclimb/models/sms.rb index 7c7a9b34..b6e6280f 100644 --- a/lib/freeclimb/models/sms.rb +++ b/lib/freeclimb/models/sms.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Sms` command can be used to send an SMS message to a phone number during a phone call. International SMS is disabled by default. @@ -31,10 +29,10 @@ class Sms < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'to' => :'to', - :'from' => :'from', - :'text' => :'text', - :'notification_url' => :'notificationUrl' + to: :to, + from: :from, + text: :text, + notification_url: :notificationUrl } end @@ -46,58 +44,57 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'to' => :'String', - :'from' => :'String', - :'text' => :'String', - :'notification_url' => :'String' + to: :String, + from: :String, + text: :String, + notification_url: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Sms` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Sms`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'text') - self.text = attributes[:'text'] + if attributes.key?(:text) + self.text = attributes[:text] end - if attributes.key?(:'notification_url') - self.notification_url = attributes[:'notification_url'] + if attributes.key?(:notification_url) + self.notification_url = attributes[:notification_url] end self.command = "Sms" end @@ -124,29 +121,28 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @to.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - to == o.to && - from == o.from && - text == o.text && - notification_url == o.notification_url && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + to == other.to && + from == other.from && + text == other.text && + notification_url == other.notification_url && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -167,18 +163,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -245,7 +241,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_brand.rb b/lib/freeclimb/models/sms_ten_dlc_brand.rb index 7e23a761..a67de8c8 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # A brand is a business identity behind the campaign. @@ -27,7 +25,7 @@ class SMSTenDLCBrand # Unique identifier assigned to the brand by the registry. attr_accessor :brand_id - # First or given name. + # First or given name. attr_accessor :first_name # Last or Surname. @@ -129,37 +127,37 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'entity_type' => :'entityType', - :'csp_id' => :'cspId', - :'brand_id' => :'brandId', - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'display_name' => :'displayName', - :'company_name' => :'companyName', - :'ein' => :'ein', - :'ein_issuing_country' => :'einIssuingCountry', - :'phone' => :'phone', - :'street' => :'street', - :'city' => :'city', - :'state' => :'state', - :'postal_code' => :'postalCode', - :'country' => :'country', - :'email' => :'email', - :'stock_symbol' => :'stockSymbol', - :'stock_exchange' => :'stockExchange', - :'ip_address' => :'ipAddress', - :'website' => :'website', - :'brand_relationship' => :'brandRelationship', - :'vertical' => :'vertical', - :'alt_business_id' => :'altBusinessId', - :'alt_business_id_type' => :'altBusinessIdType', - :'universal_ein' => :'universalEin', - :'reference_id' => :'referenceId', - :'optional_attributes' => :'optionalAttributes', - :'mock' => :'mock', - :'identity_status' => :'identityStatus', - :'create_date' => :'createDate' + account_id: :accountId, + entity_type: :entityType, + csp_id: :cspId, + brand_id: :brandId, + first_name: :firstName, + last_name: :lastName, + display_name: :displayName, + company_name: :companyName, + ein: :ein, + ein_issuing_country: :einIssuingCountry, + phone: :phone, + street: :street, + city: :city, + state: :state, + postal_code: :postalCode, + country: :country, + email: :email, + stock_symbol: :stockSymbol, + stock_exchange: :stockExchange, + ip_address: :ipAddress, + website: :website, + brand_relationship: :brandRelationship, + vertical: :vertical, + alt_business_id: :altBusinessId, + alt_business_id_type: :altBusinessIdType, + universal_ein: :universalEin, + reference_id: :referenceId, + optional_attributes: :optionalAttributes, + mock: :mock, + identity_status: :identityStatus, + create_date: :createDate } end @@ -171,193 +169,193 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'entity_type' => :'SMSTenDLCBrandEntityType', - :'csp_id' => :'String', - :'brand_id' => :'String', - :'first_name' => :'String', - :'last_name' => :'String', - :'display_name' => :'String', - :'company_name' => :'String', - :'ein' => :'String', - :'ein_issuing_country' => :'String', - :'phone' => :'String', - :'street' => :'String', - :'city' => :'String', - :'state' => :'String', - :'postal_code' => :'String', - :'country' => :'String', - :'email' => :'String', - :'stock_symbol' => :'String', - :'stock_exchange' => :'SMSTenDLCBrandStockExchange', - :'ip_address' => :'String', - :'website' => :'String', - :'brand_relationship' => :'SMSTenDLCBrandRelationship', - :'vertical' => :'String', - :'alt_business_id' => :'String', - :'alt_business_id_type' => :'SMSTenDLCBrandAltBusinessIdType', - :'universal_ein' => :'String', - :'reference_id' => :'String', - :'optional_attributes' => :'Hash', - :'mock' => :'Boolean', - :'identity_status' => :'SMSTenDLCBrandIdentityStatus', - :'create_date' => :'Time' + account_id: :String, + entity_type: :SMSTenDLCBrandEntityType, + csp_id: :String, + brand_id: :String, + first_name: :String, + last_name: :String, + display_name: :String, + company_name: :String, + ein: :String, + ein_issuing_country: :String, + phone: :String, + street: :String, + city: :String, + state: :String, + postal_code: :String, + country: :String, + email: :String, + stock_symbol: :String, + stock_exchange: :SMSTenDLCBrandStockExchange, + ip_address: :String, + website: :String, + brand_relationship: :SMSTenDLCBrandRelationship, + vertical: :String, + alt_business_id: :String, + alt_business_id_type: :SMSTenDLCBrandAltBusinessIdType, + universal_ein: :String, + reference_id: :String, + optional_attributes: :"Hash", + mock: :Boolean, + identity_status: :SMSTenDLCBrandIdentityStatus, + create_date: :Time } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', + :account_id ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCBrand` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCBrand`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'entity_type') - self.entity_type = attributes[:'entity_type'] + if attributes.key?(:entity_type) + self.entity_type = attributes[:entity_type] end - if attributes.key?(:'csp_id') - self.csp_id = attributes[:'csp_id'] + if attributes.key?(:csp_id) + self.csp_id = attributes[:csp_id] end - if attributes.key?(:'brand_id') - self.brand_id = attributes[:'brand_id'] + if attributes.key?(:brand_id) + self.brand_id = attributes[:brand_id] end - if attributes.key?(:'first_name') - self.first_name = attributes[:'first_name'] + if attributes.key?(:first_name) + self.first_name = attributes[:first_name] end - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] + if attributes.key?(:last_name) + self.last_name = attributes[:last_name] end - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] + if attributes.key?(:display_name) + self.display_name = attributes[:display_name] end - if attributes.key?(:'company_name') - self.company_name = attributes[:'company_name'] + if attributes.key?(:company_name) + self.company_name = attributes[:company_name] end - if attributes.key?(:'ein') - self.ein = attributes[:'ein'] + if attributes.key?(:ein) + self.ein = attributes[:ein] end - if attributes.key?(:'ein_issuing_country') - self.ein_issuing_country = attributes[:'ein_issuing_country'] + if attributes.key?(:ein_issuing_country) + self.ein_issuing_country = attributes[:ein_issuing_country] end - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] + if attributes.key?(:phone) + self.phone = attributes[:phone] end - if attributes.key?(:'street') - self.street = attributes[:'street'] + if attributes.key?(:street) + self.street = attributes[:street] end - if attributes.key?(:'city') - self.city = attributes[:'city'] + if attributes.key?(:city) + self.city = attributes[:city] end - if attributes.key?(:'state') - self.state = attributes[:'state'] + if attributes.key?(:state) + self.state = attributes[:state] end - if attributes.key?(:'postal_code') - self.postal_code = attributes[:'postal_code'] + if attributes.key?(:postal_code) + self.postal_code = attributes[:postal_code] end - if attributes.key?(:'country') - self.country = attributes[:'country'] + if attributes.key?(:country) + self.country = attributes[:country] end - if attributes.key?(:'email') - self.email = attributes[:'email'] + if attributes.key?(:email) + self.email = attributes[:email] end - if attributes.key?(:'stock_symbol') - self.stock_symbol = attributes[:'stock_symbol'] + if attributes.key?(:stock_symbol) + self.stock_symbol = attributes[:stock_symbol] end - if attributes.key?(:'stock_exchange') - self.stock_exchange = attributes[:'stock_exchange'] + if attributes.key?(:stock_exchange) + self.stock_exchange = attributes[:stock_exchange] end - if attributes.key?(:'ip_address') - self.ip_address = attributes[:'ip_address'] + if attributes.key?(:ip_address) + self.ip_address = attributes[:ip_address] end - if attributes.key?(:'website') - self.website = attributes[:'website'] + if attributes.key?(:website) + self.website = attributes[:website] end - if attributes.key?(:'brand_relationship') - self.brand_relationship = attributes[:'brand_relationship'] + if attributes.key?(:brand_relationship) + self.brand_relationship = attributes[:brand_relationship] end - if attributes.key?(:'vertical') - self.vertical = attributes[:'vertical'] + if attributes.key?(:vertical) + self.vertical = attributes[:vertical] end - if attributes.key?(:'alt_business_id') - self.alt_business_id = attributes[:'alt_business_id'] + if attributes.key?(:alt_business_id) + self.alt_business_id = attributes[:alt_business_id] end - if attributes.key?(:'alt_business_id_type') - self.alt_business_id_type = attributes[:'alt_business_id_type'] + if attributes.key?(:alt_business_id_type) + self.alt_business_id_type = attributes[:alt_business_id_type] end - if attributes.key?(:'universal_ein') - self.universal_ein = attributes[:'universal_ein'] + if attributes.key?(:universal_ein) + self.universal_ein = attributes[:universal_ein] end - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] + if attributes.key?(:reference_id) + self.reference_id = attributes[:reference_id] end - if attributes.key?(:'optional_attributes') - if (value = attributes[:'optional_attributes']).is_a?(Hash) + if attributes.key?(:optional_attributes) + if (value = attributes[:optional_attributes]).is_a?(Hash) self.optional_attributes = value end end - if attributes.key?(:'mock') - self.mock = attributes[:'mock'] + if attributes.key?(:mock) + self.mock = attributes[:mock] end - if attributes.key?(:'identity_status') - self.identity_status = attributes[:'identity_status'] + if attributes.key?(:identity_status) + self.identity_status = attributes[:identity_status] end - if attributes.key?(:'create_date') - self.create_date = attributes[:'create_date'] + if attributes.key?(:create_date) + self.create_date = attributes[:create_date] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @entity_type.nil? invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.') end @@ -476,11 +474,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -508,7 +505,7 @@ def last_name=(last_name) # @param [Object] display_name Value to be assigned def display_name=(display_name) if display_name.nil? - fail ArgumentError, 'display_name cannot be nil' + fail ArgumentError, "display_name cannot be nil" end if display_name.to_s.length > 255 @@ -552,7 +549,7 @@ def ein_issuing_country=(ein_issuing_country) # @param [Object] phone Value to be assigned def phone=(phone) if phone.nil? - fail ArgumentError, 'phone cannot be nil' + fail ArgumentError, "phone cannot be nil" end if phone.to_s.length > 20 @@ -606,7 +603,7 @@ def postal_code=(postal_code) # @param [Object] country Value to be assigned def country=(country) if country.nil? - fail ArgumentError, 'country cannot be nil' + fail ArgumentError, "country cannot be nil" end if country.to_s.length > 2 @@ -620,7 +617,7 @@ def country=(country) # @param [Object] email Value to be assigned def email=(email) if email.nil? - fail ArgumentError, 'email cannot be nil' + fail ArgumentError, "email cannot be nil" end if email.to_s.length > 100 @@ -664,7 +661,7 @@ def website=(website) # @param [Object] vertical Value to be assigned def vertical=(vertical) if vertical.nil? - fail ArgumentError, 'vertical cannot be nil' + fail ArgumentError, "vertical cannot be nil" end if vertical.to_s.length > 50 @@ -696,46 +693,46 @@ def reference_id=(reference_id) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - entity_type == o.entity_type && - csp_id == o.csp_id && - brand_id == o.brand_id && - first_name == o.first_name && - last_name == o.last_name && - display_name == o.display_name && - company_name == o.company_name && - ein == o.ein && - ein_issuing_country == o.ein_issuing_country && - phone == o.phone && - street == o.street && - city == o.city && - state == o.state && - postal_code == o.postal_code && - country == o.country && - email == o.email && - stock_symbol == o.stock_symbol && - stock_exchange == o.stock_exchange && - ip_address == o.ip_address && - website == o.website && - brand_relationship == o.brand_relationship && - vertical == o.vertical && - alt_business_id == o.alt_business_id && - alt_business_id_type == o.alt_business_id_type && - universal_ein == o.universal_ein && - reference_id == o.reference_id && - optional_attributes == o.optional_attributes && - mock == o.mock && - identity_status == o.identity_status && - create_date == o.create_date + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + entity_type == other.entity_type && + csp_id == other.csp_id && + brand_id == other.brand_id && + first_name == other.first_name && + last_name == other.last_name && + display_name == other.display_name && + company_name == other.company_name && + ein == other.ein && + ein_issuing_country == other.ein_issuing_country && + phone == other.phone && + street == other.street && + city == other.city && + state == other.state && + postal_code == other.postal_code && + country == other.country && + email == other.email && + stock_symbol == other.stock_symbol && + stock_exchange == other.stock_exchange && + ip_address == other.ip_address && + website == other.website && + brand_relationship == other.brand_relationship && + vertical == other.vertical && + alt_business_id == other.alt_business_id && + alt_business_id_type == other.alt_business_id_type && + universal_ein == other.universal_ein && + reference_id == other.reference_id && + optional_attributes == other.optional_attributes && + mock == other.mock && + identity_status == other.identity_status && + create_date == other.create_date end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -758,15 +755,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -833,7 +830,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb b/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb index 84ef941d..8c75f178 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCBrandAltBusinessIdType @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCBrandAltBusinessIdType.constants.select { |c| SMSTenDLCBrandAltBusinessIdType::const_get(c) == value } + constantValues = SMSTenDLCBrandAltBusinessIdType.constants.select { |c| SMSTenDLCBrandAltBusinessIdType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCBrandAltBusinessIdType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb b/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb index 225a3339..cd075335 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCBrandEntityType @@ -32,7 +30,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCBrandEntityType.constants.select { |c| SMSTenDLCBrandEntityType::const_get(c) == value } + constantValues = SMSTenDLCBrandEntityType.constants.select { |c| SMSTenDLCBrandEntityType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCBrandEntityType" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb b/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb index 959afb6f..f9530aed 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCBrandIdentityStatus @@ -31,7 +29,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCBrandIdentityStatus.constants.select { |c| SMSTenDLCBrandIdentityStatus::const_get(c) == value } + constantValues = SMSTenDLCBrandIdentityStatus.constants.select { |c| SMSTenDLCBrandIdentityStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCBrandIdentityStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb b/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb index ee11b4b2..95f409ec 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCBrandRelationship @@ -32,7 +30,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCBrandRelationship.constants.select { |c| SMSTenDLCBrandRelationship::const_get(c) == value } + constantValues = SMSTenDLCBrandRelationship.constants.select { |c| SMSTenDLCBrandRelationship.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCBrandRelationship" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb b/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb index 4654b39e..b1624087 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCBrandStockExchange @@ -54,7 +52,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCBrandStockExchange.constants.select { |c| SMSTenDLCBrandStockExchange::const_get(c) == value } + constantValues = SMSTenDLCBrandStockExchange.constants.select { |c| SMSTenDLCBrandStockExchange.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCBrandStockExchange" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb b/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb index 38031b50..7db40fcd 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCBrandsListResult @@ -41,14 +39,14 @@ class SMSTenDLCBrandsListResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'brands' => :'brands' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + brands: :brands } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'brands' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + brands: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'brands' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :brands ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCBrandsListResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCBrandsListResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'brands') - if (value = attributes[:'brands']).is_a?(Array) + if attributes.key?(:brands) + if (value = attributes[:brands]).is_a?(Array) self.brands = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - brands == o.brands + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + brands == other.brands end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_campaign.rb b/lib/freeclimb/models/sms_ten_dlc_campaign.rb index 18f37e4c..1ef728d9 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaign.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaign.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCCampaign @@ -146,42 +144,42 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'campaign_id' => :'campaignId', - :'csp_id' => :'cspId', - :'reseller_id' => :'resellerId', - :'status' => :'status', - :'create_date' => :'createDate', - :'auto_renewal' => :'autoRenewal', - :'billed_date' => :'billedDate', - :'brand_id' => :'brandId', - :'usecase' => :'usecase', - :'sub_usecases' => :'subUsecases', - :'description' => :'description', - :'embedded_link' => :'embeddedLink', - :'embedded_phone' => :'embeddedPhone', - :'affiliate_marketing' => :'affiliateMarketing', - :'number_pool' => :'numberPool', - :'age_gated' => :'ageGated', - :'direct_lending' => :'directLending', - :'subscriber_optin' => :'subscriberOptin', - :'subscriber_optout' => :'subscriberOptout', - :'subscriber_help' => :'subscriberHelp', - :'sample1' => :'sample1', - :'sample2' => :'sample2', - :'sample3' => :'sample3', - :'sample4' => :'sample4', - :'sample5' => :'sample5', - :'message_flow' => :'messageFlow', - :'help_message' => :'helpMessage', - :'optin_keywords' => :'optinKeywords', - :'optout_keywords' => :'optoutKeywords', - :'help_keywords' => :'helpKeywords', - :'optin_message' => :'optinMessage', - :'optout_message' => :'optoutMessage', - :'reference_id' => :'referenceId', - :'mock' => :'mock', - :'next_renewal_or_expiration_date' => :'nextRenewalOrExpirationDate' + account_id: :accountId, + campaign_id: :campaignId, + csp_id: :cspId, + reseller_id: :resellerId, + status: :status, + create_date: :createDate, + auto_renewal: :autoRenewal, + billed_date: :billedDate, + brand_id: :brandId, + usecase: :usecase, + sub_usecases: :subUsecases, + description: :description, + embedded_link: :embeddedLink, + embedded_phone: :embeddedPhone, + affiliate_marketing: :affiliateMarketing, + number_pool: :numberPool, + age_gated: :ageGated, + direct_lending: :directLending, + subscriber_optin: :subscriberOptin, + subscriber_optout: :subscriberOptout, + subscriber_help: :subscriberHelp, + sample1: :sample1, + sample2: :sample2, + sample3: :sample3, + sample4: :sample4, + sample5: :sample5, + message_flow: :messageFlow, + help_message: :helpMessage, + optin_keywords: :optinKeywords, + optout_keywords: :optoutKeywords, + help_keywords: :helpKeywords, + optin_message: :optinMessage, + optout_message: :optoutMessage, + reference_id: :referenceId, + mock: :mock, + next_renewal_or_expiration_date: :nextRenewalOrExpirationDate } end @@ -193,240 +191,240 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'campaign_id' => :'String', - :'csp_id' => :'String', - :'reseller_id' => :'String', - :'status' => :'SMSTenDLCCampaignStatus', - :'create_date' => :'Time', - :'auto_renewal' => :'Boolean', - :'billed_date' => :'Time', - :'brand_id' => :'String', - :'usecase' => :'String', - :'sub_usecases' => :'Array', - :'description' => :'String', - :'embedded_link' => :'Boolean', - :'embedded_phone' => :'Boolean', - :'affiliate_marketing' => :'Boolean', - :'number_pool' => :'Boolean', - :'age_gated' => :'Boolean', - :'direct_lending' => :'Boolean', - :'subscriber_optin' => :'Boolean', - :'subscriber_optout' => :'Boolean', - :'subscriber_help' => :'Boolean', - :'sample1' => :'String', - :'sample2' => :'String', - :'sample3' => :'String', - :'sample4' => :'String', - :'sample5' => :'String', - :'message_flow' => :'String', - :'help_message' => :'String', - :'optin_keywords' => :'String', - :'optout_keywords' => :'String', - :'help_keywords' => :'String', - :'optin_message' => :'String', - :'optout_message' => :'String', - :'reference_id' => :'String', - :'mock' => :'Boolean', - :'next_renewal_or_expiration_date' => :'Date' + account_id: :String, + campaign_id: :String, + csp_id: :String, + reseller_id: :String, + status: :SMSTenDLCCampaignStatus, + create_date: :Time, + auto_renewal: :Boolean, + billed_date: :Time, + brand_id: :String, + usecase: :String, + sub_usecases: :"Array", + description: :String, + embedded_link: :Boolean, + embedded_phone: :Boolean, + affiliate_marketing: :Boolean, + number_pool: :Boolean, + age_gated: :Boolean, + direct_lending: :Boolean, + subscriber_optin: :Boolean, + subscriber_optout: :Boolean, + subscriber_help: :Boolean, + sample1: :String, + sample2: :String, + sample3: :String, + sample4: :String, + sample5: :String, + message_flow: :String, + help_message: :String, + optin_keywords: :String, + optout_keywords: :String, + help_keywords: :String, + optin_message: :String, + optout_message: :String, + reference_id: :String, + mock: :Boolean, + next_renewal_or_expiration_date: :Date } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'reseller_id', - :'billed_date', - :'sample2', - :'sample3', - :'sample4', - :'sample5', - :'message_flow', - :'help_message', - :'reference_id', - :'next_renewal_or_expiration_date' + :account_id, + :reseller_id, + :billed_date, + :sample2, + :sample3, + :sample4, + :sample5, + :message_flow, + :help_message, + :reference_id, + :next_renewal_or_expiration_date ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'csp_id') - self.csp_id = attributes[:'csp_id'] + if attributes.key?(:csp_id) + self.csp_id = attributes[:csp_id] end - if attributes.key?(:'reseller_id') - self.reseller_id = attributes[:'reseller_id'] + if attributes.key?(:reseller_id) + self.reseller_id = attributes[:reseller_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'create_date') - self.create_date = attributes[:'create_date'] + if attributes.key?(:create_date) + self.create_date = attributes[:create_date] end - if attributes.key?(:'auto_renewal') - self.auto_renewal = attributes[:'auto_renewal'] + if attributes.key?(:auto_renewal) + self.auto_renewal = attributes[:auto_renewal] end - if attributes.key?(:'billed_date') - self.billed_date = attributes[:'billed_date'] + if attributes.key?(:billed_date) + self.billed_date = attributes[:billed_date] end - if attributes.key?(:'brand_id') - self.brand_id = attributes[:'brand_id'] + if attributes.key?(:brand_id) + self.brand_id = attributes[:brand_id] end - if attributes.key?(:'usecase') - self.usecase = attributes[:'usecase'] + if attributes.key?(:usecase) + self.usecase = attributes[:usecase] end - if attributes.key?(:'sub_usecases') - if (value = attributes[:'sub_usecases']).is_a?(Array) + if attributes.key?(:sub_usecases) + if (value = attributes[:sub_usecases]).is_a?(Array) self.sub_usecases = value end end - if attributes.key?(:'description') - self.description = attributes[:'description'] + if attributes.key?(:description) + self.description = attributes[:description] end - if attributes.key?(:'embedded_link') - self.embedded_link = attributes[:'embedded_link'] + self.embedded_link = if attributes.key?(:embedded_link) + attributes[:embedded_link] else - self.embedded_link = false + false end - if attributes.key?(:'embedded_phone') - self.embedded_phone = attributes[:'embedded_phone'] + self.embedded_phone = if attributes.key?(:embedded_phone) + attributes[:embedded_phone] else - self.embedded_phone = false + false end - if attributes.key?(:'affiliate_marketing') - self.affiliate_marketing = attributes[:'affiliate_marketing'] + if attributes.key?(:affiliate_marketing) + self.affiliate_marketing = attributes[:affiliate_marketing] end - if attributes.key?(:'number_pool') - self.number_pool = attributes[:'number_pool'] + self.number_pool = if attributes.key?(:number_pool) + attributes[:number_pool] else - self.number_pool = false + false end - if attributes.key?(:'age_gated') - self.age_gated = attributes[:'age_gated'] + if attributes.key?(:age_gated) + self.age_gated = attributes[:age_gated] end - if attributes.key?(:'direct_lending') - self.direct_lending = attributes[:'direct_lending'] + if attributes.key?(:direct_lending) + self.direct_lending = attributes[:direct_lending] end - if attributes.key?(:'subscriber_optin') - self.subscriber_optin = attributes[:'subscriber_optin'] + self.subscriber_optin = if attributes.key?(:subscriber_optin) + attributes[:subscriber_optin] else - self.subscriber_optin = false + false end - if attributes.key?(:'subscriber_optout') - self.subscriber_optout = attributes[:'subscriber_optout'] + self.subscriber_optout = if attributes.key?(:subscriber_optout) + attributes[:subscriber_optout] else - self.subscriber_optout = false + false end - if attributes.key?(:'subscriber_help') - self.subscriber_help = attributes[:'subscriber_help'] + self.subscriber_help = if attributes.key?(:subscriber_help) + attributes[:subscriber_help] else - self.subscriber_help = false + false end - if attributes.key?(:'sample1') - self.sample1 = attributes[:'sample1'] + if attributes.key?(:sample1) + self.sample1 = attributes[:sample1] end - if attributes.key?(:'sample2') - self.sample2 = attributes[:'sample2'] + if attributes.key?(:sample2) + self.sample2 = attributes[:sample2] end - if attributes.key?(:'sample3') - self.sample3 = attributes[:'sample3'] + if attributes.key?(:sample3) + self.sample3 = attributes[:sample3] end - if attributes.key?(:'sample4') - self.sample4 = attributes[:'sample4'] + if attributes.key?(:sample4) + self.sample4 = attributes[:sample4] end - if attributes.key?(:'sample5') - self.sample5 = attributes[:'sample5'] + if attributes.key?(:sample5) + self.sample5 = attributes[:sample5] end - if attributes.key?(:'message_flow') - self.message_flow = attributes[:'message_flow'] + if attributes.key?(:message_flow) + self.message_flow = attributes[:message_flow] end - if attributes.key?(:'help_message') - self.help_message = attributes[:'help_message'] + if attributes.key?(:help_message) + self.help_message = attributes[:help_message] end - if attributes.key?(:'optin_keywords') - self.optin_keywords = attributes[:'optin_keywords'] + if attributes.key?(:optin_keywords) + self.optin_keywords = attributes[:optin_keywords] end - if attributes.key?(:'optout_keywords') - self.optout_keywords = attributes[:'optout_keywords'] + if attributes.key?(:optout_keywords) + self.optout_keywords = attributes[:optout_keywords] end - if attributes.key?(:'help_keywords') - self.help_keywords = attributes[:'help_keywords'] + if attributes.key?(:help_keywords) + self.help_keywords = attributes[:help_keywords] end - if attributes.key?(:'optin_message') - self.optin_message = attributes[:'optin_message'] + if attributes.key?(:optin_message) + self.optin_message = attributes[:optin_message] end - if attributes.key?(:'optout_message') - self.optout_message = attributes[:'optout_message'] + if attributes.key?(:optout_message) + self.optout_message = attributes[:optout_message] end - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] + if attributes.key?(:reference_id) + self.reference_id = attributes[:reference_id] end - if attributes.key?(:'mock') - self.mock = attributes[:'mock'] + if attributes.key?(:mock) + self.mock = attributes[:mock] end - if attributes.key?(:'next_renewal_or_expiration_date') - self.next_renewal_or_expiration_date = attributes[:'next_renewal_or_expiration_date'] + if attributes.key?(:next_renewal_or_expiration_date) + self.next_renewal_or_expiration_date = attributes[:next_renewal_or_expiration_date] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end @@ -529,11 +527,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -551,7 +548,7 @@ def reseller_id=(reseller_id) # @param [Object] brand_id Value to be assigned def brand_id=(brand_id) if brand_id.nil? - fail ArgumentError, 'brand_id cannot be nil' + fail ArgumentError, "brand_id cannot be nil" end if brand_id.to_s.length > 8 @@ -565,7 +562,7 @@ def brand_id=(brand_id) # @param [Object] usecase Value to be assigned def usecase=(usecase) if usecase.nil? - fail ArgumentError, 'usecase cannot be nil' + fail ArgumentError, "usecase cannot be nil" end if usecase.to_s.length > 20 @@ -579,7 +576,7 @@ def usecase=(usecase) # @param [Object] sub_usecases Value to be assigned def sub_usecases=(sub_usecases) if sub_usecases.nil? - fail ArgumentError, 'sub_usecases cannot be nil' + fail ArgumentError, "sub_usecases cannot be nil" end @sub_usecases = sub_usecases @@ -589,7 +586,7 @@ def sub_usecases=(sub_usecases) # @param [Object] description Value to be assigned def description=(description) if description.nil? - fail ArgumentError, 'description cannot be nil' + fail ArgumentError, "description cannot be nil" end if description.to_s.length > 4096 @@ -731,51 +728,51 @@ def reference_id=(reference_id) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - campaign_id == o.campaign_id && - csp_id == o.csp_id && - reseller_id == o.reseller_id && - status == o.status && - create_date == o.create_date && - auto_renewal == o.auto_renewal && - billed_date == o.billed_date && - brand_id == o.brand_id && - usecase == o.usecase && - sub_usecases == o.sub_usecases && - description == o.description && - embedded_link == o.embedded_link && - embedded_phone == o.embedded_phone && - affiliate_marketing == o.affiliate_marketing && - number_pool == o.number_pool && - age_gated == o.age_gated && - direct_lending == o.direct_lending && - subscriber_optin == o.subscriber_optin && - subscriber_optout == o.subscriber_optout && - subscriber_help == o.subscriber_help && - sample1 == o.sample1 && - sample2 == o.sample2 && - sample3 == o.sample3 && - sample4 == o.sample4 && - sample5 == o.sample5 && - message_flow == o.message_flow && - help_message == o.help_message && - optin_keywords == o.optin_keywords && - optout_keywords == o.optout_keywords && - help_keywords == o.help_keywords && - optin_message == o.optin_message && - optout_message == o.optout_message && - reference_id == o.reference_id && - mock == o.mock && - next_renewal_or_expiration_date == o.next_renewal_or_expiration_date + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + campaign_id == other.campaign_id && + csp_id == other.csp_id && + reseller_id == other.reseller_id && + status == other.status && + create_date == other.create_date && + auto_renewal == other.auto_renewal && + billed_date == other.billed_date && + brand_id == other.brand_id && + usecase == other.usecase && + sub_usecases == other.sub_usecases && + description == other.description && + embedded_link == other.embedded_link && + embedded_phone == other.embedded_phone && + affiliate_marketing == other.affiliate_marketing && + number_pool == other.number_pool && + age_gated == other.age_gated && + direct_lending == other.direct_lending && + subscriber_optin == other.subscriber_optin && + subscriber_optout == other.subscriber_optout && + subscriber_help == other.subscriber_help && + sample1 == other.sample1 && + sample2 == other.sample2 && + sample3 == other.sample3 && + sample4 == other.sample4 && + sample5 == other.sample5 && + message_flow == other.message_flow && + help_message == other.help_message && + optin_keywords == other.optin_keywords && + optout_keywords == other.optout_keywords && + help_keywords == other.help_keywords && + optin_message == other.optin_message && + optout_message == other.optout_message && + reference_id == other.reference_id && + mock == other.mock && + next_renewal_or_expiration_date == other.next_renewal_or_expiration_date end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -798,15 +795,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -873,7 +870,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb b/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb index da232cfd..d9fe03de 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCCampaignStatus @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCCampaignStatus.constants.select { |c| SMSTenDLCCampaignStatus::const_get(c) == value } + constantValues = SMSTenDLCCampaignStatus.constants.select { |c| SMSTenDLCCampaignStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCCampaignStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb b/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb index 1aa66d6b..4a625d4c 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCCampaignsListResult @@ -41,14 +39,14 @@ class SMSTenDLCCampaignsListResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'campaigns' => :'campaigns' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + campaigns: :campaigns } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'campaigns' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + campaigns: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'campaigns' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :campaigns ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCCampaignsListResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCCampaignsListResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'campaigns') - if (value = attributes[:'campaigns']).is_a?(Array) + if attributes.key?(:campaigns) + if (value = attributes[:campaigns]).is_a?(Array) self.campaigns = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - campaigns == o.campaigns + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + campaigns == other.campaigns end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb index 57cac396..fd2acbc3 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCPartnerCampaign @@ -124,35 +122,35 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'campaign_id' => :'campaignId', - :'status' => :'status', - :'create_date' => :'createDate', - :'brand_id' => :'brandId', - :'usecase' => :'usecase', - :'description' => :'description', - :'embedded_link' => :'embeddedLink', - :'embedded_phone' => :'embeddedPhone', - :'affiliate_marketing' => :'affiliateMarketing', - :'number_pool' => :'numberPool', - :'age_gated' => :'ageGated', - :'direct_lending' => :'directLending', - :'subscriber_optin' => :'subscriberOptin', - :'subscriber_optout' => :'subscriberOptout', - :'subscriber_help' => :'subscriberHelp', - :'sample1' => :'sample1', - :'sample2' => :'sample2', - :'sample3' => :'sample3', - :'sample4' => :'sample4', - :'sample5' => :'sample5', - :'message_flow' => :'messageFlow', - :'help_message' => :'helpMessage', - :'optin_keywords' => :'optinKeywords', - :'optout_keywords' => :'optoutKeywords', - :'help_keywords' => :'helpKeywords', - :'optin_message' => :'optinMessage', - :'optout_message' => :'optoutMessage', - :'brand' => :'brand' + account_id: :accountId, + campaign_id: :campaignId, + status: :status, + create_date: :createDate, + brand_id: :brandId, + usecase: :usecase, + description: :description, + embedded_link: :embeddedLink, + embedded_phone: :embeddedPhone, + affiliate_marketing: :affiliateMarketing, + number_pool: :numberPool, + age_gated: :ageGated, + direct_lending: :directLending, + subscriber_optin: :subscriberOptin, + subscriber_optout: :subscriberOptout, + subscriber_help: :subscriberHelp, + sample1: :sample1, + sample2: :sample2, + sample3: :sample3, + sample4: :sample4, + sample5: :sample5, + message_flow: :messageFlow, + help_message: :helpMessage, + optin_keywords: :optinKeywords, + optout_keywords: :optoutKeywords, + help_keywords: :helpKeywords, + optin_message: :optinMessage, + optout_message: :optoutMessage, + brand: :brand } end @@ -164,199 +162,199 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'campaign_id' => :'String', - :'status' => :'SMSTenDLCPartnerCampaignStatus', - :'create_date' => :'Time', - :'brand_id' => :'String', - :'usecase' => :'String', - :'description' => :'String', - :'embedded_link' => :'Boolean', - :'embedded_phone' => :'Boolean', - :'affiliate_marketing' => :'Boolean', - :'number_pool' => :'Boolean', - :'age_gated' => :'Boolean', - :'direct_lending' => :'Boolean', - :'subscriber_optin' => :'Boolean', - :'subscriber_optout' => :'Boolean', - :'subscriber_help' => :'Boolean', - :'sample1' => :'String', - :'sample2' => :'String', - :'sample3' => :'String', - :'sample4' => :'String', - :'sample5' => :'String', - :'message_flow' => :'String', - :'help_message' => :'String', - :'optin_keywords' => :'String', - :'optout_keywords' => :'String', - :'help_keywords' => :'String', - :'optin_message' => :'String', - :'optout_message' => :'String', - :'brand' => :'SMSTenDLCPartnerCampaignBrand' + account_id: :String, + campaign_id: :String, + status: :SMSTenDLCPartnerCampaignStatus, + create_date: :Time, + brand_id: :String, + usecase: :String, + description: :String, + embedded_link: :Boolean, + embedded_phone: :Boolean, + affiliate_marketing: :Boolean, + number_pool: :Boolean, + age_gated: :Boolean, + direct_lending: :Boolean, + subscriber_optin: :Boolean, + subscriber_optout: :Boolean, + subscriber_help: :Boolean, + sample1: :String, + sample2: :String, + sample3: :String, + sample4: :String, + sample5: :String, + message_flow: :String, + help_message: :String, + optin_keywords: :String, + optout_keywords: :String, + help_keywords: :String, + optin_message: :String, + optout_message: :String, + brand: :SMSTenDLCPartnerCampaignBrand } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', - :'sample2', - :'sample3', - :'sample4', - :'sample5', - :'message_flow', - :'help_message', + :account_id, + :sample2, + :sample3, + :sample4, + :sample5, + :message_flow, + :help_message ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCPartnerCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCPartnerCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end - if attributes.key?(:'create_date') - self.create_date = attributes[:'create_date'] + if attributes.key?(:create_date) + self.create_date = attributes[:create_date] end - if attributes.key?(:'brand_id') - self.brand_id = attributes[:'brand_id'] + if attributes.key?(:brand_id) + self.brand_id = attributes[:brand_id] end - if attributes.key?(:'usecase') - self.usecase = attributes[:'usecase'] + if attributes.key?(:usecase) + self.usecase = attributes[:usecase] end - if attributes.key?(:'description') - self.description = attributes[:'description'] + if attributes.key?(:description) + self.description = attributes[:description] end - if attributes.key?(:'embedded_link') - self.embedded_link = attributes[:'embedded_link'] + self.embedded_link = if attributes.key?(:embedded_link) + attributes[:embedded_link] else - self.embedded_link = false + false end - if attributes.key?(:'embedded_phone') - self.embedded_phone = attributes[:'embedded_phone'] + self.embedded_phone = if attributes.key?(:embedded_phone) + attributes[:embedded_phone] else - self.embedded_phone = false + false end - if attributes.key?(:'affiliate_marketing') - self.affiliate_marketing = attributes[:'affiliate_marketing'] + if attributes.key?(:affiliate_marketing) + self.affiliate_marketing = attributes[:affiliate_marketing] end - if attributes.key?(:'number_pool') - self.number_pool = attributes[:'number_pool'] + self.number_pool = if attributes.key?(:number_pool) + attributes[:number_pool] else - self.number_pool = false + false end - if attributes.key?(:'age_gated') - self.age_gated = attributes[:'age_gated'] + if attributes.key?(:age_gated) + self.age_gated = attributes[:age_gated] end - if attributes.key?(:'direct_lending') - self.direct_lending = attributes[:'direct_lending'] + if attributes.key?(:direct_lending) + self.direct_lending = attributes[:direct_lending] end - if attributes.key?(:'subscriber_optin') - self.subscriber_optin = attributes[:'subscriber_optin'] + self.subscriber_optin = if attributes.key?(:subscriber_optin) + attributes[:subscriber_optin] else - self.subscriber_optin = false + false end - if attributes.key?(:'subscriber_optout') - self.subscriber_optout = attributes[:'subscriber_optout'] + self.subscriber_optout = if attributes.key?(:subscriber_optout) + attributes[:subscriber_optout] else - self.subscriber_optout = false + false end - if attributes.key?(:'subscriber_help') - self.subscriber_help = attributes[:'subscriber_help'] + self.subscriber_help = if attributes.key?(:subscriber_help) + attributes[:subscriber_help] else - self.subscriber_help = false + false end - if attributes.key?(:'sample1') - self.sample1 = attributes[:'sample1'] + if attributes.key?(:sample1) + self.sample1 = attributes[:sample1] end - if attributes.key?(:'sample2') - self.sample2 = attributes[:'sample2'] + if attributes.key?(:sample2) + self.sample2 = attributes[:sample2] end - if attributes.key?(:'sample3') - self.sample3 = attributes[:'sample3'] + if attributes.key?(:sample3) + self.sample3 = attributes[:sample3] end - if attributes.key?(:'sample4') - self.sample4 = attributes[:'sample4'] + if attributes.key?(:sample4) + self.sample4 = attributes[:sample4] end - if attributes.key?(:'sample5') - self.sample5 = attributes[:'sample5'] + if attributes.key?(:sample5) + self.sample5 = attributes[:sample5] end - if attributes.key?(:'message_flow') - self.message_flow = attributes[:'message_flow'] + if attributes.key?(:message_flow) + self.message_flow = attributes[:message_flow] end - if attributes.key?(:'help_message') - self.help_message = attributes[:'help_message'] + if attributes.key?(:help_message) + self.help_message = attributes[:help_message] end - if attributes.key?(:'optin_keywords') - self.optin_keywords = attributes[:'optin_keywords'] + if attributes.key?(:optin_keywords) + self.optin_keywords = attributes[:optin_keywords] end - if attributes.key?(:'optout_keywords') - self.optout_keywords = attributes[:'optout_keywords'] + if attributes.key?(:optout_keywords) + self.optout_keywords = attributes[:optout_keywords] end - if attributes.key?(:'help_keywords') - self.help_keywords = attributes[:'help_keywords'] + if attributes.key?(:help_keywords) + self.help_keywords = attributes[:help_keywords] end - if attributes.key?(:'optin_message') - self.optin_message = attributes[:'optin_message'] + if attributes.key?(:optin_message) + self.optin_message = attributes[:optin_message] end - if attributes.key?(:'optout_message') - self.optout_message = attributes[:'optout_message'] + if attributes.key?(:optout_message) + self.optout_message = attributes[:optout_message] end - if attributes.key?(:'brand') - self.brand = attributes[:'brand'] + if attributes.key?(:brand) + self.brand = attributes[:brand] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end @@ -439,11 +437,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -451,7 +448,7 @@ def valid? # @param [Object] brand_id Value to be assigned def brand_id=(brand_id) if brand_id.nil? - fail ArgumentError, 'brand_id cannot be nil' + fail ArgumentError, "brand_id cannot be nil" end if brand_id.to_s.length > 8 @@ -465,7 +462,7 @@ def brand_id=(brand_id) # @param [Object] usecase Value to be assigned def usecase=(usecase) if usecase.nil? - fail ArgumentError, 'usecase cannot be nil' + fail ArgumentError, "usecase cannot be nil" end if usecase.to_s.length > 20 @@ -479,7 +476,7 @@ def usecase=(usecase) # @param [Object] description Value to be assigned def description=(description) if description.nil? - fail ArgumentError, 'description cannot be nil' + fail ArgumentError, "description cannot be nil" end if description.to_s.length > 4096 @@ -611,44 +608,44 @@ def optout_message=(optout_message) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - campaign_id == o.campaign_id && - status == o.status && - create_date == o.create_date && - brand_id == o.brand_id && - usecase == o.usecase && - description == o.description && - embedded_link == o.embedded_link && - embedded_phone == o.embedded_phone && - affiliate_marketing == o.affiliate_marketing && - number_pool == o.number_pool && - age_gated == o.age_gated && - direct_lending == o.direct_lending && - subscriber_optin == o.subscriber_optin && - subscriber_optout == o.subscriber_optout && - subscriber_help == o.subscriber_help && - sample1 == o.sample1 && - sample2 == o.sample2 && - sample3 == o.sample3 && - sample4 == o.sample4 && - sample5 == o.sample5 && - message_flow == o.message_flow && - help_message == o.help_message && - optin_keywords == o.optin_keywords && - optout_keywords == o.optout_keywords && - help_keywords == o.help_keywords && - optin_message == o.optin_message && - optout_message == o.optout_message && - brand == o.brand + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + campaign_id == other.campaign_id && + status == other.status && + create_date == other.create_date && + brand_id == other.brand_id && + usecase == other.usecase && + description == other.description && + embedded_link == other.embedded_link && + embedded_phone == other.embedded_phone && + affiliate_marketing == other.affiliate_marketing && + number_pool == other.number_pool && + age_gated == other.age_gated && + direct_lending == other.direct_lending && + subscriber_optin == other.subscriber_optin && + subscriber_optout == other.subscriber_optout && + subscriber_help == other.subscriber_help && + sample1 == other.sample1 && + sample2 == other.sample2 && + sample3 == other.sample3 && + sample4 == other.sample4 && + sample5 == other.sample5 && + message_flow == other.message_flow && + help_message == other.help_message && + optin_keywords == other.optin_keywords && + optout_keywords == other.optout_keywords && + help_keywords == other.help_keywords && + optin_message == other.optin_message && + optout_message == other.optout_message && + brand == other.brand end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -671,15 +668,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -746,7 +743,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb index 7a62dded..503e1bf7 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCPartnerCampaignBrand @@ -21,7 +19,7 @@ class SMSTenDLCPartnerCampaignBrand # Unique identifier assigned to the brand by the registry. attr_accessor :brand_id - # First or given name. + # First or given name. attr_accessor :first_name # Last or Surname. @@ -51,17 +49,17 @@ class SMSTenDLCPartnerCampaignBrand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'brand_id' => :'brandId', - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'display_name' => :'displayName', - :'company_name' => :'companyName', - :'phone' => :'phone', - :'email' => :'email', - :'website' => :'website', - :'optional_attributes' => :'optionalAttributes', - :'evp_vetting_score' => :'evpVettingScore' + account_id: :accountId, + brand_id: :brandId, + first_name: :firstName, + last_name: :lastName, + display_name: :displayName, + company_name: :companyName, + phone: :phone, + email: :email, + website: :website, + optional_attributes: :optionalAttributes, + evp_vetting_score: :evpVettingScore } end @@ -73,93 +71,93 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'brand_id' => :'String', - :'first_name' => :'String', - :'last_name' => :'String', - :'display_name' => :'String', - :'company_name' => :'String', - :'phone' => :'String', - :'email' => :'String', - :'website' => :'String', - :'optional_attributes' => :'Hash', - :'evp_vetting_score' => :'Integer' + account_id: :String, + brand_id: :String, + first_name: :String, + last_name: :String, + display_name: :String, + company_name: :String, + phone: :String, + email: :String, + website: :String, + optional_attributes: :"Hash", + evp_vetting_score: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', + :account_id ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCPartnerCampaignBrand` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCPartnerCampaignBrand`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'brand_id') - self.brand_id = attributes[:'brand_id'] + if attributes.key?(:brand_id) + self.brand_id = attributes[:brand_id] end - if attributes.key?(:'first_name') - self.first_name = attributes[:'first_name'] + if attributes.key?(:first_name) + self.first_name = attributes[:first_name] end - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] + if attributes.key?(:last_name) + self.last_name = attributes[:last_name] end - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] + if attributes.key?(:display_name) + self.display_name = attributes[:display_name] end - if attributes.key?(:'company_name') - self.company_name = attributes[:'company_name'] + if attributes.key?(:company_name) + self.company_name = attributes[:company_name] end - if attributes.key?(:'phone') - self.phone = attributes[:'phone'] + if attributes.key?(:phone) + self.phone = attributes[:phone] end - if attributes.key?(:'email') - self.email = attributes[:'email'] + if attributes.key?(:email) + self.email = attributes[:email] end - if attributes.key?(:'website') - self.website = attributes[:'website'] + if attributes.key?(:website) + self.website = attributes[:website] end - if attributes.key?(:'optional_attributes') - if (value = attributes[:'optional_attributes']).is_a?(Hash) + if attributes.key?(:optional_attributes) + if (value = attributes[:optional_attributes]).is_a?(Hash) self.optional_attributes = value end end - if attributes.key?(:'evp_vetting_score') - self.evp_vetting_score = attributes[:'evp_vetting_score'] + if attributes.key?(:evp_vetting_score) + self.evp_vetting_score = attributes[:evp_vetting_score] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if !@first_name.nil? && @first_name.to_s.length > 100 invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 100.') end @@ -202,11 +200,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -254,7 +251,7 @@ def company_name=(company_name) # @param [Object] phone Value to be assigned def phone=(phone) if phone.nil? - fail ArgumentError, 'phone cannot be nil' + fail ArgumentError, "phone cannot be nil" end if phone.to_s.length > 20 @@ -268,7 +265,7 @@ def phone=(phone) # @param [Object] email Value to be assigned def email=(email) if email.nil? - fail ArgumentError, 'email cannot be nil' + fail ArgumentError, "email cannot be nil" end if email.to_s.length > 100 @@ -290,26 +287,26 @@ def website=(website) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - brand_id == o.brand_id && - first_name == o.first_name && - last_name == o.last_name && - display_name == o.display_name && - company_name == o.company_name && - phone == o.phone && - email == o.email && - website == o.website && - optional_attributes == o.optional_attributes && - evp_vetting_score == o.evp_vetting_score + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + brand_id == other.brand_id && + first_name == other.first_name && + last_name == other.last_name && + display_name == other.display_name && + company_name == other.company_name && + phone == other.phone && + email == other.email && + website == other.website && + optional_attributes == other.optional_attributes && + evp_vetting_score == other.evp_vetting_score end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -332,15 +329,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -407,7 +404,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb index 7af06177..e1f393c2 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTenDLCPartnerCampaignStatus @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTenDLCPartnerCampaignStatus.constants.select { |c| SMSTenDLCPartnerCampaignStatus::const_get(c) == value } + constantValues = SMSTenDLCPartnerCampaignStatus.constants.select { |c| SMSTenDLCPartnerCampaignStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTenDLCPartnerCampaignStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb index 50e41d55..24845e8a 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTenDLCPartnerCampaignsListResult @@ -41,14 +39,14 @@ class SMSTenDLCPartnerCampaignsListResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'partner_campaigns' => :'partnerCampaigns' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + partner_campaigns: :partnerCampaigns } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'partner_campaigns' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + partner_campaigns: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'partner_campaigns' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :partner_campaigns ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTenDLCPartnerCampaignsListResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTenDLCPartnerCampaignsListResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'partner_campaigns') - if (value = attributes[:'partner_campaigns']).is_a?(Array) + if attributes.key?(:partner_campaigns) + if (value = attributes[:partner_campaigns]).is_a?(Array) self.partner_campaigns = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - partner_campaigns == o.partner_campaigns + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + partner_campaigns == other.partner_campaigns end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_toll_free_campaign.rb b/lib/freeclimb/models/sms_toll_free_campaign.rb index 170dfec6..e33baddd 100644 --- a/lib/freeclimb/models/sms_toll_free_campaign.rb +++ b/lib/freeclimb/models/sms_toll_free_campaign.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTollFreeCampaign @@ -56,13 +54,13 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'campaign_id' => :'campaignId', - :'use_case' => :'useCase', - :'registration_status' => :'registrationStatus', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'revision' => :'revision' + account_id: :accountId, + campaign_id: :campaignId, + use_case: :useCase, + registration_status: :registrationStatus, + date_created: :dateCreated, + date_updated: :dateUpdated, + revision: :revision } end @@ -74,71 +72,71 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'campaign_id' => :'String', - :'use_case' => :'String', - :'registration_status' => :'SMSTollFreeCampaignRegistrationStatus', - :'date_created' => :'String', - :'date_updated' => :'String', - :'revision' => :'Integer' + account_id: :String, + campaign_id: :String, + use_case: :String, + registration_status: :SMSTollFreeCampaignRegistrationStatus, + date_created: :String, + date_updated: :String, + revision: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', + :account_id ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTollFreeCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTollFreeCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'use_case') - self.use_case = attributes[:'use_case'] + if attributes.key?(:use_case) + self.use_case = attributes[:use_case] end - if attributes.key?(:'registration_status') - self.registration_status = attributes[:'registration_status'] + if attributes.key?(:registration_status) + self.registration_status = attributes[:registration_status] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end @@ -169,32 +167,31 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - campaign_id == o.campaign_id && - use_case == o.use_case && - registration_status == o.registration_status && - date_created == o.date_created && - date_updated == o.date_updated && - revision == o.revision + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + campaign_id == other.campaign_id && + use_case == other.use_case && + registration_status == other.registration_status && + date_created == other.date_created && + date_updated == other.date_updated && + revision == other.revision end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -217,15 +214,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -292,7 +289,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb b/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb index e2af53da..9e6ca9d2 100644 --- a/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb +++ b/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class SMSTollFreeCampaignRegistrationStatus @@ -32,7 +30,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = SMSTollFreeCampaignRegistrationStatus.constants.select { |c| SMSTollFreeCampaignRegistrationStatus::const_get(c) == value } + constantValues = SMSTollFreeCampaignRegistrationStatus.constants.select { |c| SMSTollFreeCampaignRegistrationStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #SMSTollFreeCampaignRegistrationStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb b/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb index 9485d60c..ac26d9f1 100644 --- a/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +++ b/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class SMSTollFreeCampaignsListResult @@ -41,14 +39,14 @@ class SMSTollFreeCampaignsListResult # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'total' => :'total', - :'start' => :'start', - :'_end' => :'end', - :'page' => :'page', - :'num_pages' => :'numPages', - :'page_size' => :'pageSize', - :'next_page_uri' => :'nextPageUri', - :'brands' => :'brands' + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + brands: :brands } end @@ -60,83 +58,83 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total' => :'Integer', - :'start' => :'Integer', - :'_end' => :'Integer', - :'page' => :'Integer', - :'num_pages' => :'Integer', - :'page_size' => :'Integer', - :'next_page_uri' => :'String', - :'brands' => :'Array' + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + brands: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'total', - :'start', - :'_end', - :'page', - :'num_pages', - :'page_size', - :'next_page_uri', - :'brands' + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri, + :brands ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PaginationModel' + :PaginationModel ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTollFreeCampaignsListResult` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTollFreeCampaignsListResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'total') - self.total = attributes[:'total'] + if attributes.key?(:total) + self.total = attributes[:total] end - if attributes.key?(:'start') - self.start = attributes[:'start'] + if attributes.key?(:start) + self.start = attributes[:start] end - if attributes.key?(:'_end') - self._end = attributes[:'_end'] + if attributes.key?(:_end) + self._end = attributes[:_end] end - if attributes.key?(:'page') - self.page = attributes[:'page'] + if attributes.key?(:page) + self.page = attributes[:page] end - if attributes.key?(:'num_pages') - self.num_pages = attributes[:'num_pages'] + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] end - if attributes.key?(:'page_size') - self.page_size = attributes[:'page_size'] + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] end - if attributes.key?(:'next_page_uri') - self.next_page_uri = attributes[:'next_page_uri'] + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] end - if attributes.key?(:'brands') - if (value = attributes[:'brands']).is_a?(Array) + if attributes.key?(:brands) + if (value = attributes[:brands]).is_a?(Array) self.brands = value end end @@ -145,40 +143,38 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @total.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - total == o.total && - start == o.start && - _end == o._end && - page == o.page && - num_pages == o.num_pages && - page_size == o.page_size && - next_page_uri == o.next_page_uri && - brands == o.brands + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + brands == other.brands end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -201,15 +197,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -276,7 +272,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/start_record_call.rb b/lib/freeclimb/models/start_record_call.rb index 3989817f..4b1dc1e8 100644 --- a/lib/freeclimb/models/start_record_call.rb +++ b/lib/freeclimb/models/start_record_call.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `StartRecordCall` command records the current call and returns the URL of a file containing the audio recording when recording completes. `StartRecordCall` is non-blocking. After recording of the current call begins, control of the call moves to the PerCL command that follows `StartRecordCall` in the current PerCL script. @@ -33,62 +31,59 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::StartRecordCall` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::StartRecordCall`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super self.command = "StartRecordCall" end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -109,18 +104,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -187,7 +182,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/terminate_conference.rb b/lib/freeclimb/models/terminate_conference.rb index 46fa333b..d16b307d 100644 --- a/lib/freeclimb/models/terminate_conference.rb +++ b/lib/freeclimb/models/terminate_conference.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `TerminateConference` command terminates an existing Conference. Any active participants are hung up on by FreeClimb. If this is not the desired behavior, use the `RemoveFromConference` command to unbridge Calls that should not be hung up. Note: The Call requesting TerminateConference must be on the same Conference for this command to execute. @@ -33,62 +31,59 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TerminateConference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TerminateConference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super self.command = "TerminateConference" end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -109,18 +104,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -187,7 +182,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/tfn.rb b/lib/freeclimb/models/tfn.rb index 0fb93abc..95885d39 100644 --- a/lib/freeclimb/models/tfn.rb +++ b/lib/freeclimb/models/tfn.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # TollFree Campaign details for this number @@ -22,7 +20,7 @@ class TFN # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'campaign_id' => :'campaignId' + campaign_id: :campaignId } end @@ -34,40 +32,39 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'campaign_id' => :'String' + campaign_id: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TFN` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TFN`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end @@ -78,26 +75,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @campaign_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - campaign_id == o.campaign_id + def ==(other) + return true if equal?(other) + self.class == other.class && + campaign_id == other.campaign_id end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -120,15 +116,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -195,7 +191,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/tfn_campaign.rb b/lib/freeclimb/models/tfn_campaign.rb index 915fadb6..93ed54db 100644 --- a/lib/freeclimb/models/tfn_campaign.rb +++ b/lib/freeclimb/models/tfn_campaign.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class TFNCampaign @@ -60,15 +58,15 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'account_id' => :'accountId', - :'campaign_id' => :'campaignId', - :'use_case' => :'useCase', - :'registration_status' => :'registrationStatus', - :'date_created' => :'dateCreated', - :'date_updated' => :'dateUpdated', - :'date_created_iso' => :'dateCreatedISO', - :'date_updated_iso' => :'dateUpdatedISO', - :'revision' => :'revision' + account_id: :accountId, + campaign_id: :campaignId, + use_case: :useCase, + registration_status: :registrationStatus, + date_created: :dateCreated, + date_updated: :dateUpdated, + date_created_iso: :dateCreatedISO, + date_updated_iso: :dateUpdatedISO, + revision: :revision } end @@ -80,87 +78,87 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'account_id' => :'String', - :'campaign_id' => :'String', - :'use_case' => :'String', - :'registration_status' => :'SMSTollFreeCampaignRegistrationStatus', - :'date_created' => :'String', - :'date_updated' => :'String', - :'date_created_iso' => :'String', - :'date_updated_iso' => :'String', - :'revision' => :'Integer' + account_id: :String, + campaign_id: :String, + use_case: :String, + registration_status: :SMSTollFreeCampaignRegistrationStatus, + date_created: :String, + date_updated: :String, + date_created_iso: :String, + date_updated_iso: :String, + revision: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'account_id', + :account_id ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TFNCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TFNCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'campaign_id') - self.campaign_id = attributes[:'campaign_id'] + if attributes.key?(:campaign_id) + self.campaign_id = attributes[:campaign_id] end - if attributes.key?(:'use_case') - self.use_case = attributes[:'use_case'] + if attributes.key?(:use_case) + self.use_case = attributes[:use_case] end - if attributes.key?(:'registration_status') - self.registration_status = attributes[:'registration_status'] + if attributes.key?(:registration_status) + self.registration_status = attributes[:registration_status] end - if attributes.key?(:'date_created') - self.date_created = attributes[:'date_created'] + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] end - if attributes.key?(:'date_updated') - self.date_updated = attributes[:'date_updated'] + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] end - if attributes.key?(:'date_created_iso') - self.date_created_iso = attributes[:'date_created_iso'] + if attributes.key?(:date_created_iso) + self.date_created_iso = attributes[:date_created_iso] end - if attributes.key?(:'date_updated_iso') - self.date_updated_iso = attributes[:'date_updated_iso'] + if attributes.key?(:date_updated_iso) + self.date_updated_iso = attributes[:date_updated_iso] end - if attributes.key?(:'revision') - self.revision = attributes[:'revision'] + if attributes.key?(:revision) + self.revision = attributes[:revision] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end - pattern = Regexp.new(/cmptfn_[a-fA-F0-9]{40}/) - if @campaign_id !~ pattern + pattern = /cmptfn_[a-fA-F0-9]{40}/ + if !@campaign_id&.match?(pattern) invalid_properties.push("invalid value for \"campaign_id\", must conform to the pattern #{pattern}.") end @@ -198,11 +196,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @account_id.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -210,11 +207,11 @@ def valid? # @param [Object] campaign_id Value to be assigned def campaign_id=(campaign_id) if campaign_id.nil? - fail ArgumentError, 'campaign_id cannot be nil' + fail ArgumentError, "campaign_id cannot be nil" end - pattern = Regexp.new(/cmptfn_[a-fA-F0-9]{40}/) - if campaign_id !~ pattern + pattern = /cmptfn_[a-fA-F0-9]{40}/ + if !campaign_id&.match?(pattern) fail ArgumentError, "invalid value for \"campaign_id\", must conform to the pattern #{pattern}." end @@ -223,24 +220,24 @@ def campaign_id=(campaign_id) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - account_id == o.account_id && - campaign_id == o.campaign_id && - use_case == o.use_case && - registration_status == o.registration_status && - date_created == o.date_created && - date_updated == o.date_updated && - date_created_iso == o.date_created_iso && - date_updated_iso == o.date_updated_iso && - revision == o.revision + def ==(other) + return true if equal?(other) + self.class == other.class && + account_id == other.account_id && + campaign_id == other.campaign_id && + use_case == other.use_case && + registration_status == other.registration_status && + date_created == other.date_created && + date_updated == other.date_updated && + date_created_iso == other.date_created_iso && + date_updated_iso == other.date_updated_iso && + revision == other.revision end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -263,15 +260,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -338,7 +335,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/transcribe_reason.rb b/lib/freeclimb/models/transcribe_reason.rb index 3975737d..7af9b214 100644 --- a/lib/freeclimb/models/transcribe_reason.rb +++ b/lib/freeclimb/models/transcribe_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class TranscribeReason @@ -32,7 +30,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = TranscribeReason.constants.select { |c| TranscribeReason::const_get(c) == value } + constantValues = TranscribeReason.constants.select { |c| TranscribeReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #TranscribeReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/transcribe_term_reason.rb b/lib/freeclimb/models/transcribe_term_reason.rb index 89664b34..01f59034 100644 --- a/lib/freeclimb/models/transcribe_term_reason.rb +++ b/lib/freeclimb/models/transcribe_term_reason.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class TranscribeTermReason @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = TranscribeTermReason.constants.select { |c| TranscribeTermReason::const_get(c) == value } + constantValues = TranscribeTermReason.constants.select { |c| TranscribeTermReason.const_get(c) == value } raise "Invalid ENUM value #{value} for class #TranscribeTermReason" if constantValues.empty? value end diff --git a/lib/freeclimb/models/transcribe_utterance.rb b/lib/freeclimb/models/transcribe_utterance.rb index 23a3de17..95baab53 100644 --- a/lib/freeclimb/models/transcribe_utterance.rb +++ b/lib/freeclimb/models/transcribe_utterance.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed. `TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute. @@ -31,12 +29,12 @@ class TranscribeUtterance < PerclCommand # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_url' => :'actionUrl', - :'play_beep' => :'playBeep', - :'record' => :'record', - :'privacy_for_logging' => :'privacyForLogging', - :'privacy_for_recording' => :'privacyForRecording', - :'prompts' => :'prompts' + action_url: :actionUrl, + play_beep: :playBeep, + record: :record, + privacy_for_logging: :privacyForLogging, + privacy_for_recording: :privacyForRecording, + prompts: :prompts } end @@ -48,74 +46,73 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_url' => :'String', - :'play_beep' => :'Boolean', - :'record' => :'TranscribeUtteranceRecord', - :'privacy_for_logging' => :'Boolean', - :'privacy_for_recording' => :'Boolean', - :'prompts' => :'Array' + action_url: :String, + play_beep: :Boolean, + record: :TranscribeUtteranceRecord, + privacy_for_logging: :Boolean, + privacy_for_recording: :Boolean, + prompts: :"Array" } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeUtterance` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TranscribeUtterance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'action_url') - self.action_url = attributes[:'action_url'] + if attributes.key?(:action_url) + self.action_url = attributes[:action_url] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + self.play_beep = if attributes.key?(:play_beep) + attributes[:play_beep] else - self.play_beep = false + false end - if attributes.key?(:'record') - self.record = attributes[:'record'] + if attributes.key?(:record) + self.record = attributes[:record] end - if attributes.key?(:'privacy_for_logging') - self.privacy_for_logging = attributes[:'privacy_for_logging'] + self.privacy_for_logging = if attributes.key?(:privacy_for_logging) + attributes[:privacy_for_logging] else - self.privacy_for_logging = false + false end - if attributes.key?(:'privacy_for_recording') - self.privacy_for_recording = attributes[:'privacy_for_recording'] + self.privacy_for_recording = if attributes.key?(:privacy_for_recording) + attributes[:privacy_for_recording] else - self.privacy_for_recording = false + false end - if attributes.key?(:'prompts') - if (value = attributes[:'prompts']).is_a?(Array) + if attributes.key?(:prompts) + if (value = attributes[:prompts]).is_a?(Array) self.prompts = value end end @@ -136,31 +133,30 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @action_url.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action_url == o.action_url && - play_beep == o.play_beep && - record == o.record && - privacy_for_logging == o.privacy_for_logging && - privacy_for_recording == o.privacy_for_recording && - prompts == o.prompts && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + action_url == other.action_url && + play_beep == other.play_beep && + record == other.record && + privacy_for_logging == other.privacy_for_logging && + privacy_for_recording == other.privacy_for_recording && + prompts == other.prompts && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -181,18 +177,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -259,7 +255,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/transcribe_utterance_record.rb b/lib/freeclimb/models/transcribe_utterance_record.rb index 5a018d6a..50743143 100644 --- a/lib/freeclimb/models/transcribe_utterance_record.rb +++ b/lib/freeclimb/models/transcribe_utterance_record.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class TranscribeUtteranceRecord @@ -24,9 +22,9 @@ class TranscribeUtteranceRecord # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'save_recording' => :'saveRecording', - :'max_length_sec' => :'maxLengthSec', - :'rcrd_termination_silence_time_ms' => :'rcrdTerminationSilenceTimeMs' + save_recording: :saveRecording, + max_length_sec: :maxLengthSec, + rcrd_termination_silence_time_ms: :rcrdTerminationSilenceTimeMs } end @@ -38,54 +36,53 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'save_recording' => :'Boolean', - :'max_length_sec' => :'Integer', - :'rcrd_termination_silence_time_ms' => :'Integer' + save_recording: :Boolean, + max_length_sec: :Integer, + rcrd_termination_silence_time_ms: :Integer } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeUtteranceRecord` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TranscribeUtteranceRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'save_recording') - self.save_recording = attributes[:'save_recording'] + self.save_recording = if attributes.key?(:save_recording) + attributes[:save_recording] else - self.save_recording = false + false end - if attributes.key?(:'max_length_sec') - self.max_length_sec = attributes[:'max_length_sec'] + self.max_length_sec = if attributes.key?(:max_length_sec) + attributes[:max_length_sec] else - self.max_length_sec = 60 + 60 end - if attributes.key?(:'rcrd_termination_silence_time_ms') - self.rcrd_termination_silence_time_ms = attributes[:'rcrd_termination_silence_time_ms'] + if attributes.key?(:rcrd_termination_silence_time_ms) + self.rcrd_termination_silence_time_ms = attributes[:rcrd_termination_silence_time_ms] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if !@max_length_sec.nil? && @max_length_sec > 60 invalid_properties.push('invalid value for "max_length_sec", must be smaller than or equal to 60.') end @@ -108,11 +105,10 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @save_recording.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end @@ -146,18 +142,18 @@ def rcrd_termination_silence_time_ms=(rcrd_termination_silence_time_ms) # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - save_recording == o.save_recording && - max_length_sec == o.max_length_sec && - rcrd_termination_silence_time_ms == o.rcrd_termination_silence_time_ms + def ==(other) + return true if equal?(other) + self.class == other.class && + save_recording == other.save_recording && + max_length_sec == other.max_length_sec && + rcrd_termination_silence_time_ms == other.rcrd_termination_silence_time_ms end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -180,15 +176,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -255,7 +251,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/transcribe_webhook.rb b/lib/freeclimb/models/transcribe_webhook.rb index e00f6c6a..52ad7f7b 100644 --- a/lib/freeclimb/models/transcribe_webhook.rb +++ b/lib/freeclimb/models/transcribe_webhook.rb @@ -1,25 +1,23 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class TranscribeWebhook < Webhook def self.deserialize(payload) return nil if payload.nil? || payload.empty? data = JSON.parse("[#{payload}]")[0] - inverted_attributes = self.attribute_map.invert - hash = self.acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h + inverted_attributes = attribute_map.invert + hash = acceptable_attributes.uniq.map { |k| [inverted_attributes[k], data[k.to_s]] }.to_h TranscribeWebhook.new(hash) end # The context or reason why this request is being made. Will be transcribe - The TranscribeUtterance command has completed and its actionUrl is being invoked. @@ -110,29 +108,29 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType', - :'account_id' => :'accountId', - :'call_id' => :'callId', - :'from' => :'from', - :'to' => :'to', - :'recording_id' => :'recordingId', - :'recording_url' => :'recordingUrl', - :'recording_size' => :'recordingSize', - :'recording_format' => :'recordingFormat', - :'recording_duration_ms' => :'recordingDurationMs', - :'term_reason' => :'termReason', - :'record_term_reason' => :'recordTermReason', - :'digit' => :'digit', - :'privacy_for_logging' => :'privacyForLogging', - :'privacy_for_recording' => :'privacyForRecording', - :'barge_in_reason' => :'bargeInReason', - :'barged_in_prompt_no' => :'bargedInPromptNo', - :'barged_in_prompt_ms' => :'bargedInPromptMs', - :'barged_in_prompt_loop_no' => :'bargedInPromptLoopNo', - :'barge_in_time_ms' => :'bargeInTimeMs', - :'transcript' => :'transcript', - :'transcribe_reason' => :'transcribeReason', - :'transcription_duration_ms' => :'transcriptionDurationMs' + request_type: :requestType, + account_id: :accountId, + call_id: :callId, + from: :from, + to: :to, + recording_id: :recordingId, + recording_url: :recordingUrl, + recording_size: :recordingSize, + recording_format: :recordingFormat, + recording_duration_ms: :recordingDurationMs, + term_reason: :termReason, + record_term_reason: :recordTermReason, + digit: :digit, + privacy_for_logging: :privacyForLogging, + privacy_for_recording: :privacyForRecording, + barge_in_reason: :bargeInReason, + barged_in_prompt_no: :bargedInPromptNo, + barged_in_prompt_ms: :bargedInPromptMs, + barged_in_prompt_loop_no: :bargedInPromptLoopNo, + barge_in_time_ms: :bargeInTimeMs, + transcript: :transcript, + transcribe_reason: :transcribeReason, + transcription_duration_ms: :transcriptionDurationMs } end @@ -144,213 +142,211 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String', - :'account_id' => :'String', - :'call_id' => :'String', - :'from' => :'String', - :'to' => :'String', - :'recording_id' => :'String', - :'recording_url' => :'String', - :'recording_size' => :'Integer', - :'recording_format' => :'String', - :'recording_duration_ms' => :'Integer', - :'term_reason' => :'TranscribeTermReason', - :'record_term_reason' => :'RecordUtteranceTermReason', - :'digit' => :'String', - :'privacy_for_logging' => :'Boolean', - :'privacy_for_recording' => :'Boolean', - :'barge_in_reason' => :'BargeInReason', - :'barged_in_prompt_no' => :'Integer', - :'barged_in_prompt_ms' => :'Integer', - :'barged_in_prompt_loop_no' => :'Integer', - :'barge_in_time_ms' => :'Integer', - :'transcript' => :'String', - :'transcribe_reason' => :'TranscribeReason', - :'transcription_duration_ms' => :'Integer' + request_type: :String, + account_id: :String, + call_id: :String, + from: :String, + to: :String, + recording_id: :String, + recording_url: :String, + recording_size: :Integer, + recording_format: :String, + recording_duration_ms: :Integer, + term_reason: :TranscribeTermReason, + record_term_reason: :RecordUtteranceTermReason, + digit: :String, + privacy_for_logging: :Boolean, + privacy_for_recording: :Boolean, + barge_in_reason: :BargeInReason, + barged_in_prompt_no: :Integer, + barged_in_prompt_ms: :Integer, + barged_in_prompt_loop_no: :Integer, + barge_in_time_ms: :Integer, + transcript: :String, + transcribe_reason: :TranscribeReason, + transcription_duration_ms: :Integer } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'recording_id', - :'recording_url', - :'recording_format', - :'digit', - :'transcript', + :recording_id, + :recording_url, + :recording_format, + :digit, + :transcript ]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Webhook' + :Webhook ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeWebhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TranscribeWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end - if attributes.key?(:'account_id') - self.account_id = attributes[:'account_id'] + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] end - if attributes.key?(:'call_id') - self.call_id = attributes[:'call_id'] + if attributes.key?(:call_id) + self.call_id = attributes[:call_id] end - if attributes.key?(:'from') - self.from = attributes[:'from'] + if attributes.key?(:from) + self.from = attributes[:from] end - if attributes.key?(:'to') - self.to = attributes[:'to'] + if attributes.key?(:to) + self.to = attributes[:to] end - if attributes.key?(:'recording_id') - self.recording_id = attributes[:'recording_id'] + if attributes.key?(:recording_id) + self.recording_id = attributes[:recording_id] end - if attributes.key?(:'recording_url') - self.recording_url = attributes[:'recording_url'] + if attributes.key?(:recording_url) + self.recording_url = attributes[:recording_url] end - if attributes.key?(:'recording_size') - self.recording_size = attributes[:'recording_size'] + if attributes.key?(:recording_size) + self.recording_size = attributes[:recording_size] end - if attributes.key?(:'recording_format') - self.recording_format = attributes[:'recording_format'] + if attributes.key?(:recording_format) + self.recording_format = attributes[:recording_format] end - if attributes.key?(:'recording_duration_ms') - self.recording_duration_ms = attributes[:'recording_duration_ms'] + if attributes.key?(:recording_duration_ms) + self.recording_duration_ms = attributes[:recording_duration_ms] end - if attributes.key?(:'term_reason') - self.term_reason = attributes[:'term_reason'] + if attributes.key?(:term_reason) + self.term_reason = attributes[:term_reason] end - if attributes.key?(:'record_term_reason') - self.record_term_reason = attributes[:'record_term_reason'] + if attributes.key?(:record_term_reason) + self.record_term_reason = attributes[:record_term_reason] end - if attributes.key?(:'digit') - self.digit = attributes[:'digit'] + if attributes.key?(:digit) + self.digit = attributes[:digit] end - if attributes.key?(:'privacy_for_logging') - self.privacy_for_logging = attributes[:'privacy_for_logging'] + if attributes.key?(:privacy_for_logging) + self.privacy_for_logging = attributes[:privacy_for_logging] end - if attributes.key?(:'privacy_for_recording') - self.privacy_for_recording = attributes[:'privacy_for_recording'] + if attributes.key?(:privacy_for_recording) + self.privacy_for_recording = attributes[:privacy_for_recording] end - if attributes.key?(:'barge_in_reason') - self.barge_in_reason = attributes[:'barge_in_reason'] + if attributes.key?(:barge_in_reason) + self.barge_in_reason = attributes[:barge_in_reason] end - if attributes.key?(:'barged_in_prompt_no') - self.barged_in_prompt_no = attributes[:'barged_in_prompt_no'] + if attributes.key?(:barged_in_prompt_no) + self.barged_in_prompt_no = attributes[:barged_in_prompt_no] end - if attributes.key?(:'barged_in_prompt_ms') - self.barged_in_prompt_ms = attributes[:'barged_in_prompt_ms'] + if attributes.key?(:barged_in_prompt_ms) + self.barged_in_prompt_ms = attributes[:barged_in_prompt_ms] end - if attributes.key?(:'barged_in_prompt_loop_no') - self.barged_in_prompt_loop_no = attributes[:'barged_in_prompt_loop_no'] + if attributes.key?(:barged_in_prompt_loop_no) + self.barged_in_prompt_loop_no = attributes[:barged_in_prompt_loop_no] end - if attributes.key?(:'barge_in_time_ms') - self.barge_in_time_ms = attributes[:'barge_in_time_ms'] + if attributes.key?(:barge_in_time_ms) + self.barge_in_time_ms = attributes[:barge_in_time_ms] end - if attributes.key?(:'transcript') - self.transcript = attributes[:'transcript'] + if attributes.key?(:transcript) + self.transcript = attributes[:transcript] end - if attributes.key?(:'transcribe_reason') - self.transcribe_reason = attributes[:'transcribe_reason'] + if attributes.key?(:transcribe_reason) + self.transcribe_reason = attributes[:transcribe_reason] end - if attributes.key?(:'transcription_duration_ms') - self.transcription_duration_ms = attributes[:'transcription_duration_ms'] + if attributes.key?(:transcription_duration_ms) + self.transcription_duration_ms = attributes[:transcription_duration_ms] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type && - account_id == o.account_id && - call_id == o.call_id && - from == o.from && - to == o.to && - recording_id == o.recording_id && - recording_url == o.recording_url && - recording_size == o.recording_size && - recording_format == o.recording_format && - recording_duration_ms == o.recording_duration_ms && - term_reason == o.term_reason && - record_term_reason == o.record_term_reason && - digit == o.digit && - privacy_for_logging == o.privacy_for_logging && - privacy_for_recording == o.privacy_for_recording && - barge_in_reason == o.barge_in_reason && - barged_in_prompt_no == o.barged_in_prompt_no && - barged_in_prompt_ms == o.barged_in_prompt_ms && - barged_in_prompt_loop_no == o.barged_in_prompt_loop_no && - barge_in_time_ms == o.barge_in_time_ms && - transcript == o.transcript && - transcribe_reason == o.transcribe_reason && - transcription_duration_ms == o.transcription_duration_ms && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type && + account_id == other.account_id && + call_id == other.call_id && + from == other.from && + to == other.to && + recording_id == other.recording_id && + recording_url == other.recording_url && + recording_size == other.recording_size && + recording_format == other.recording_format && + recording_duration_ms == other.recording_duration_ms && + term_reason == other.term_reason && + record_term_reason == other.record_term_reason && + digit == other.digit && + privacy_for_logging == other.privacy_for_logging && + privacy_for_recording == other.privacy_for_recording && + barge_in_reason == other.barge_in_reason && + barged_in_prompt_no == other.barged_in_prompt_no && + barged_in_prompt_ms == other.barged_in_prompt_ms && + barged_in_prompt_loop_no == other.barged_in_prompt_loop_no && + barge_in_time_ms == other.barge_in_time_ms && + transcript == other.transcript && + transcribe_reason == other.transcribe_reason && + transcription_duration_ms == other.transcription_duration_ms && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -371,18 +367,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -449,7 +445,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/unpark.rb b/lib/freeclimb/models/unpark.rb index d8b6ace3..bf1a12af 100644 --- a/lib/freeclimb/models/unpark.rb +++ b/lib/freeclimb/models/unpark.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb # The `Unpark` command resumes a parked call. Execution continues with the first command in the PerCL scripted returned by the actionUrl specified in the Park command as long as the call is still in progress. If the call is no longer in progress, any returned PerCL will not be executed. Unpark is a terminal command -- any commands following it in the same script are not executed. @@ -33,62 +31,59 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :PerclCommand ] end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Unpark` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Unpark`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize - super(attributes) + super self.command = "Unpark" end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = super - invalid_properties + super end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) + def ==(other) + return true if equal?(other) + self.class == other.class && super end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -109,18 +104,18 @@ def self.build_from_hash(attributes) # @return [Object] Returns the model itself def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) - super(attributes) + super self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -187,7 +182,7 @@ def to_body def to_hash hash = super self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/update_call_request.rb b/lib/freeclimb/models/update_call_request.rb index 80a42528..1550a4df 100644 --- a/lib/freeclimb/models/update_call_request.rb +++ b/lib/freeclimb/models/update_call_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class UpdateCallRequest @@ -42,7 +40,7 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'status' => :'status' + status: :status } end @@ -54,40 +52,39 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'status' => :'UpdateCallRequestStatus' + status: :UpdateCallRequestStatus } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::UpdateCallRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::UpdateCallRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new + invalid_properties = [] if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end @@ -98,26 +95,25 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @status.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - status == o.status + def ==(other) + return true if equal?(other) + self.class == other.class && + status == other.status end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -140,15 +136,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -215,7 +211,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/update_call_request_status.rb b/lib/freeclimb/models/update_call_request_status.rb index a924f66b..45f92613 100644 --- a/lib/freeclimb/models/update_call_request_status.rb +++ b/lib/freeclimb/models/update_call_request_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class UpdateCallRequestStatus @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = UpdateCallRequestStatus.constants.select { |c| UpdateCallRequestStatus::const_get(c) == value } + constantValues = UpdateCallRequestStatus.constants.select { |c| UpdateCallRequestStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #UpdateCallRequestStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/update_conference_participant_request.rb b/lib/freeclimb/models/update_conference_participant_request.rb index 1a1d9a95..4c678f0f 100644 --- a/lib/freeclimb/models/update_conference_participant_request.rb +++ b/lib/freeclimb/models/update_conference_participant_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class UpdateConferenceParticipantRequest @@ -27,9 +25,9 @@ class UpdateConferenceParticipantRequest # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'talk' => :'talk', - :'listen' => :'listen', - :'dtmf_pass_through' => :'dtmfPassThrough' + talk: :talk, + listen: :listen, + dtmf_pass_through: :dtmfPassThrough } end @@ -41,78 +39,75 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'talk' => :'Boolean', - :'listen' => :'Boolean', - :'dtmf_pass_through' => :'Boolean' + talk: :Boolean, + listen: :Boolean, + dtmf_pass_through: :Boolean } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::UpdateConferenceParticipantRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::UpdateConferenceParticipantRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'talk') - self.talk = attributes[:'talk'] + if attributes.key?(:talk) + self.talk = attributes[:talk] end - if attributes.key?(:'listen') - self.listen = attributes[:'listen'] + if attributes.key?(:listen) + self.listen = attributes[:listen] end - if attributes.key?(:'dtmf_pass_through') - self.dtmf_pass_through = attributes[:'dtmf_pass_through'] + if attributes.key?(:dtmf_pass_through) + self.dtmf_pass_through = attributes[:dtmf_pass_through] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @talk.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - talk == o.talk && - listen == o.listen && - dtmf_pass_through == o.dtmf_pass_through + def ==(other) + return true if equal?(other) + self.class == other.class && + talk == other.talk && + listen == other.listen && + dtmf_pass_through == other.dtmf_pass_through end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -135,15 +130,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -210,7 +205,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/update_conference_request.rb b/lib/freeclimb/models/update_conference_request.rb index 6eb7d683..c23b0487 100644 --- a/lib/freeclimb/models/update_conference_request.rb +++ b/lib/freeclimb/models/update_conference_request.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class UpdateConferenceRequest @@ -47,9 +45,9 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'_alias' => :'alias', - :'play_beep' => :'playBeep', - :'status' => :'status' + _alias: :alias, + play_beep: :playBeep, + status: :status } end @@ -61,79 +59,77 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'_alias' => :'String', - :'play_beep' => :'PlayBeep', - :'status' => :'UpdateConferenceRequestStatus' + _alias: :String, + play_beep: :PlayBeep, + status: :UpdateConferenceRequestStatus } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'play_beep', + :play_beep ]) end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::UpdateConferenceRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::UpdateConferenceRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] + if attributes.key?(:_alias) + self._alias = attributes[:_alias] end - if attributes.key?(:'play_beep') - self.play_beep = attributes[:'play_beep'] + if attributes.key?(:play_beep) + self.play_beep = attributes[:play_beep] end - if attributes.key?(:'status') - self.status = attributes[:'status'] + if attributes.key?(:status) + self.status = attributes[:status] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @_alias.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _alias == o._alias && - play_beep == o.play_beep && - status == o.status + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + play_beep == other.play_beep && + status == other.status end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -156,15 +152,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -231,7 +227,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/models/update_conference_request_status.rb b/lib/freeclimb/models/update_conference_request_status.rb index e579e212..37e46f24 100644 --- a/lib/freeclimb/models/update_conference_request_status.rb +++ b/lib/freeclimb/models/update_conference_request_status.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +require "date" +require "time" module Freeclimb class UpdateConferenceRequestStatus @@ -29,7 +27,7 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - constantValues = UpdateConferenceRequestStatus.constants.select { |c| UpdateConferenceRequestStatus::const_get(c) == value } + constantValues = UpdateConferenceRequestStatus.constants.select { |c| UpdateConferenceRequestStatus.const_get(c) == value } raise "Invalid ENUM value #{value} for class #UpdateConferenceRequestStatus" if constantValues.empty? value end diff --git a/lib/freeclimb/models/webhook.rb b/lib/freeclimb/models/webhook.rb index 426ea148..343be003 100644 --- a/lib/freeclimb/models/webhook.rb +++ b/lib/freeclimb/models/webhook.rb @@ -1,17 +1,15 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'date' -require 'time' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" module Freeclimb class Webhook @@ -21,7 +19,7 @@ class Webhook # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'request_type' => :'requestType' + request_type: :requestType } end @@ -33,71 +31,68 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'request_type' => :'String' + request_type: :String } end # List of attributes with nullable: true def self.openapi_nullable - Set.new([ - ]) + Set.new([]) end # discriminator's property name in OpenAPI v3 def self.openapi_discriminator_name - :'request_type' + :request_type end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) + if !attributes.is_a?(Hash) fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Webhook` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) + if !self.class.attribute_map.key?(k.to_sym) fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Webhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] + if attributes.key?(:request_type) + self.request_type = attributes[:request_type] end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - invalid_properties = Array.new - invalid_properties + [] end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - if @request_type.nil? false else - list_invalid_properties.length() == 0 + list_invalid_properties.length == 0 end end # Checks equality by comparing each attribute. # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - request_type == o.request_type + def ==(other) + return true if equal?(other) + self.class == other.class && + request_type == other.request_type end # @see the `==` method # @param [Object] Object to be compared - def eql?(o) - self == o + def eql?(other) + self == other end # Calculates hash code according to all attributes. @@ -120,15 +115,15 @@ def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) + send(:"#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end @@ -195,7 +190,7 @@ def to_body def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) + value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) diff --git a/lib/freeclimb/utils/request_verifier.rb b/lib/freeclimb/utils/request_verifier.rb index 994b2e71..2482a80b 100644 --- a/lib/freeclimb/utils/request_verifier.rb +++ b/lib/freeclimb/utils/request_verifier.rb @@ -2,9 +2,9 @@ module Freeclimb class RequestVerifier class << self @@DEFAULT_TOLERANCE = 5 * 60 * 1000 - + def verify_request_signature(request_body, request_header, signing_secret, tolerance = DEFAULT_TOLERANCE) - request_verifier_object = Freeclimb::RequestVerifier.new() + request_verifier_object = Freeclimb::RequestVerifier.new request_verifier_object.instance_eval { check_request_body(request_body) } request_verifier_object.instance_eval { check_request_header(request_header) } request_verifier_object.instance_eval { check_signing_secret(signing_secret) } @@ -15,38 +15,38 @@ def verify_request_signature(request_body, request_header, signing_secret, toler end end - private + private def check_request_body(request_body) - if request_body == "" || request_body == nil - raise 'Request Body cannot be empty or null' + if request_body == "" || request_body.nil? + raise "Request Body cannot be empty or null" end end def check_request_header(request_header) - if request_header == "" || request_header == nil - raise 'Error with request header, Request header is empty' + if request_header == "" || request_header.nil? + raise "Error with request header, Request header is empty" elsif !(request_header.include? "t") - raise 'Error with request header, timestamp is not present' + raise "Error with request header, timestamp is not present" elsif !(request_header.include? "v1") - raise 'Error with request header, signatures are not present' + raise "Error with request header, signatures are not present" end end def check_signing_secret(signing_secret) - if signing_secret == "" || signing_secret == nil - raise 'Signing secret cannot be empty or null' + if signing_secret == "" || signing_secret.nil? + raise "Signing secret cannot be empty or null" end end def check_tolerance(tolerance) if tolerance <= 0 || !(tolerance.is_a? Integer) - raise 'Tolerance value must be a positive integer' + raise "Tolerance value must be a positive integer" end end def verify_tolerance(info, tolerance) - currentTime = info.get_current_unix_time() + currentTime = info.get_current_unix_time if !info.is_request_time_valid(tolerance) raise "Request time exceeded tolerance threshold. Request: " + info.request_timestamp.to_s + ", CurrentTime: " + currentTime.to_s + ", tolerance: " + tolerance.to_s end @@ -58,4 +58,4 @@ def verify_signature(info, request_body, signing_secret) end end end -end \ No newline at end of file +end diff --git a/lib/freeclimb/utils/signature_information.rb b/lib/freeclimb/utils/signature_information.rb index 02b5e933..1e516ec6 100644 --- a/lib/freeclimb/utils/signature_information.rb +++ b/lib/freeclimb/utils/signature_information.rb @@ -1,5 +1,5 @@ -require 'date' -require 'openssl' +require "date" +require "openssl" module Freeclimb class SignatureInformation @@ -16,30 +16,30 @@ def initialize(request_header) @request_timestamp = value.to_i elsif header == "v1" @signatures.append(value) - end + end } end def is_request_time_valid(tolerance) - currentTime = self.get_current_unix_time() + currentTime = get_current_unix_time timeCalculation = @request_timestamp + tolerance currentTime < (timeCalculation) end def is_signature_safe(request_body, signing_secret) - hashValue = self.compute_hash(request_body, signing_secret) + hashValue = compute_hash(request_body, signing_secret) @signatures.include? hashValue end def compute_hash(request_body, signing_secret) data = @request_timestamp.to_s + "." + request_body - OpenSSL::HMAC.hexdigest('sha256', signing_secret, data) + OpenSSL::HMAC.hexdigest("sha256", signing_secret, data) end def get_current_unix_time - DateTime.now.strftime('%s').to_i + DateTime.now.strftime("%s").to_i end private :compute_hash end -end \ No newline at end of file +end diff --git a/lib/freeclimb/version.rb b/lib/freeclimb/version.rb index a22e8245..901c27a1 100644 --- a/lib/freeclimb/version.rb +++ b/lib/freeclimb/version.rb @@ -1,15 +1,13 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# module Freeclimb - VERSION = '5.1.0' + VERSION = "5.1.0" end diff --git a/openapi.json b/openapi.json index 0302013f..e8f5da9d 100644 --- a/openapi.json +++ b/openapi.json @@ -3658,6 +3658,9 @@ }, "CreateConferenceRequest": { "type": "object", + "required": [ + "statusCallbackUrl" + ], "properties": { "alias": { "type": "string", diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index e7805b0e..51ddb88f 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -1,33 +1,31 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'facets/string/snakecase' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "facets/string/snakecase" # Unit tests for Freeclimb::DefaultApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'DefaultApi' do +describe "DefaultApi" do before do # run before each test Freeclimb.configure do |config| # Configure HTTP basic authorization: fc - config.scheme = 'http' - config.host = 'http://127.0.0.1:4010/' - config.base_path = '/' + config.scheme = "http" + config.host = "http://127.0.0.1:4010/" + config.base_path = "/" config.server_index = nil - config.username = 'ACCOUNT_ID' - config.password = 'API_KEY' + config.username = "ACCOUNT_ID" + config.password = "API_KEY" end @api_client = Freeclimb::ApiClient.new @@ -35,63 +33,63 @@ Freeclimb::File = Tempfile @api_instance = Freeclimb::DefaultApi.new(@api_client) - @buy_incoming_number_request_buy_a_phone_number_test_value = Freeclimb::BuyIncomingNumberRequest.new({ phone_number: 'phone_number_example' }) - - @create_conference_request_create_a_conference_test_value = Freeclimb::CreateConferenceRequest.new({ _alias: 'alias_example', play_beep: Freeclimb::PlayBeep::ALWAYS, record: true, wait_url: 'https://wait_url_example.com', status_callback_url: 'https://status_callback_url_example.com' }) + @buy_incoming_number_request_buy_a_phone_number_test_value = Freeclimb::BuyIncomingNumberRequest.new({phone_number: "phone_number_example"}) + + @create_conference_request_create_a_conference_test_value = Freeclimb::CreateConferenceRequest.new({_alias: "alias_example", play_beep: Freeclimb::PlayBeep::ALWAYS, record: true, wait_url: "https://wait_url_example.com", status_callback_url: "https://status_callback_url_example.com"}) @queue_request_create_a_queue_test_value = Freeclimb::QueueRequest.new @application_request_create_an_application_test_value = Freeclimb::ApplicationRequest.new - - @recording_id_delete_a_recording_test_value = 'recordingId_example' - @application_id_delete_an_application_test_value = 'applicationId_example' + @recording_id_delete_a_recording_test_value = "recordingId_example" + + @application_id_delete_an_application_test_value = "applicationId_example" - @phone_number_id_delete_an_incoming_number_test_value = 'phoneNumberId_example' + @phone_number_id_delete_an_incoming_number_test_value = "phoneNumberId_example" - @queue_id_dequeue_a_member_test_value = 'queueId_example' + @queue_id_dequeue_a_member_test_value = "queueId_example" - @call_id_dequeue_a_member_test_value = 'callId_example' + @call_id_dequeue_a_member_test_value = "callId_example" - @queue_id_dequeue_head_member_test_value = 'queueId_example' + @queue_id_dequeue_head_member_test_value = "queueId_example" - @recording_id_download_a_recording_file_test_value = 'recordingId_example' + @recording_id_download_a_recording_file_test_value = "recordingId_example" - @filter_logs_request_filter_logs_test_value = Freeclimb::FilterLogsRequest.new({ pql: 'pql_example' }) + @filter_logs_request_filter_logs_test_value = Freeclimb::FilterLogsRequest.new({pql: "pql_example"}) - @call_id_get_a_call_test_value = 'callId_example' + @call_id_get_a_call_test_value = "callId_example" - @conference_id_get_a_conference_test_value = 'conferenceId_example' + @conference_id_get_a_conference_test_value = "conferenceId_example" - @queue_id_get_a_member_test_value = 'queueId_example' + @queue_id_get_a_member_test_value = "queueId_example" - @call_id_get_a_member_test_value = 'callId_example' + @call_id_get_a_member_test_value = "callId_example" - @conference_id_get_a_participant_test_value = 'conferenceId_example' + @conference_id_get_a_participant_test_value = "conferenceId_example" - @call_id_get_a_participant_test_value = 'callId_example' + @call_id_get_a_participant_test_value = "callId_example" - @queue_id_get_a_queue_test_value = 'queueId_example' + @queue_id_get_a_queue_test_value = "queueId_example" - @recording_id_get_a_recording_test_value = 'recordingId_example' + @recording_id_get_a_recording_test_value = "recordingId_example" - @application_id_get_an_application_test_value = 'applicationId_example' + @application_id_get_an_application_test_value = "applicationId_example" - @phone_number_id_get_an_incoming_number_test_value = 'phoneNumberId_example' + @phone_number_id_get_an_incoming_number_test_value = "phoneNumberId_example" - @message_id_get_an_sms_message_test_value = 'messageId_example' + @message_id_get_an_sms_message_test_value = "messageId_example" - @queue_id_get_head_member_test_value = 'queueId_example' + @queue_id_get_head_member_test_value = "queueId_example" - @alias_list_active_queues_test_value = 'alias_example' + @alias_list_active_queues_test_value = "alias_example" - @alias_list_applications_test_value = 'alias_example' + @alias_list_applications_test_value = "alias_example" - @phone_number_list_available_numbers_test_value = 'phoneNumberId_example' + @phone_number_list_available_numbers_test_value = "phoneNumberId_example" - @region_list_available_numbers_test_value = 'region_example' + @region_list_available_numbers_test_value = "region_example" - @country_list_available_numbers_test_value = 'country_example' + @country_list_available_numbers_test_value = "country_example" @voice_enabled_list_available_numbers_test_value = true @@ -107,45 +105,45 @@ @capabilities_short_code_list_available_numbers_test_value = true - @call_id_list_call_logs_test_value = 'callId_example' + @call_id_list_call_logs_test_value = "callId_example" - @call_id_list_call_recordings_test_value = 'callId_example' + @call_id_list_call_recordings_test_value = "callId_example" - @date_created_list_call_recordings_test_value = 'dateCreated_example' + @date_created_list_call_recordings_test_value = "dateCreated_example" - @active_list_calls_test_value = false + @active_list_calls_test_value = false - @to_list_calls_test_value = 'to_example' + @to_list_calls_test_value = "to_example" - @_from_list_calls_test_value = 'from_example' + @_from_list_calls_test_value = "from_example" @status_list_calls_test_value = Freeclimb::CallStatus::QUEUED - @start_time_list_calls_test_value = 'startTime_example' + @start_time_list_calls_test_value = "startTime_example" - @end_time_list_calls_test_value = 'endTime_example' + @end_time_list_calls_test_value = "endTime_example" - @parent_call_id_list_calls_test_value = 'parentCallId_example' + @parent_call_id_list_calls_test_value = "parentCallId_example" - @application_id_list_calls_test_value = ['AP0123456789ABCDEFabcedf000000000000000001', 'AP0123456789ABCDEFabcedf000000000000000002', 'AP0123456789ABCDEFabcedf000000000000000002'] + @application_id_list_calls_test_value = ["AP0123456789ABCDEFabcedf000000000000000001", "AP0123456789ABCDEFabcedf000000000000000002", "AP0123456789ABCDEFabcedf000000000000000002"] - @status_list_conferences_test_value = 'status_example' + @status_list_conferences_test_value = "status_example" - @alias_list_conferences_test_value = 'alias_example' + @alias_list_conferences_test_value = "alias_example" - @date_created_list_conferences_test_value = 'dateCreated_example' + @date_created_list_conferences_test_value = "dateCreated_example" - @date_updated_list_conferences_test_value = 'dateUpdated_example' - - @phone_number_list_incoming_numbers_test_value = 'phoneNumberId_example' + @date_updated_list_conferences_test_value = "dateUpdated_example" - @alias_list_incoming_numbers_test_value = 'alias_example' + @phone_number_list_incoming_numbers_test_value = "phoneNumberId_example" - @region_list_incoming_numbers_test_value = 'region_example' + @alias_list_incoming_numbers_test_value = "alias_example" - @country_list_incoming_numbers_test_value = 'country_example' + @region_list_incoming_numbers_test_value = "region_example" - @application_id_list_incoming_numbers_test_value = 'applicationId_example' + @country_list_incoming_numbers_test_value = "country_example" + + @application_id_list_incoming_numbers_test_value = "applicationId_example" @has_application_list_incoming_numbers_test_value = false @@ -163,67 +161,67 @@ @capabilities_short_code_list_incoming_numbers_test_value = true - @queue_id_list_members_test_value = 'queueId_example' + @queue_id_list_members_test_value = "queueId_example" - @conference_id_list_participants_test_value = 'conferenceId_example' + @conference_id_list_participants_test_value = "conferenceId_example" @talk_list_participants_test_value = true @listen_list_participants_test_value = true - @to_list_sms_messages_test_value = 'to_example' + @to_list_sms_messages_test_value = "to_example" - @_from_list_sms_messages_test_value = 'from_example' + @_from_list_sms_messages_test_value = "from_example" - @begin_time_list_sms_messages_test_value = 'beginTime_example' + @begin_time_list_sms_messages_test_value = "beginTime_example" - @end_time_list_sms_messages_test_value = 'endTime_example' + @end_time_list_sms_messages_test_value = "endTime_example" @direction_list_sms_messages_test_value = Freeclimb::MessageDirection::INBOUND - @conference_id_remove_a_participant_test_value = 'conferenceId_example' + @conference_id_remove_a_participant_test_value = "conferenceId_example" - @call_id_remove_a_participant_test_value = 'callId_example' + @call_id_remove_a_participant_test_value = "callId_example" - @recording_id_stream_a_recording_file_test_value = 'recordingId_example' + @recording_id_stream_a_recording_file_test_value = "recordingId_example" - @conference_id_update_a_conference_test_value = 'conferenceId_example' + @conference_id_update_a_conference_test_value = "conferenceId_example" - @call_id_update_a_live_call_test_value = 'callId_example' + @call_id_update_a_live_call_test_value = "callId_example" - @conference_id_update_a_participant_test_value = 'conferenceId_example' + @conference_id_update_a_participant_test_value = "conferenceId_example" - @call_id_update_a_participant_test_value = 'callId_example' + @call_id_update_a_participant_test_value = "callId_example" - @queue_id_update_a_queue_test_value = 'queueId_example' + @queue_id_update_a_queue_test_value = "queueId_example" - @application_id_update_an_application_test_value = 'applicationId_example' + @application_id_update_an_application_test_value = "applicationId_example" - @phone_number_id_update_an_incoming_number_test_value = 'phoneNumberId_example' + @phone_number_id_update_an_incoming_number_test_value = "phoneNumberId_example" @offnet_list_incoming_numbers_test_value = true - @call_id_list_recordings_test_value = 'callId_example' + @call_id_list_recordings_test_value = "callId_example" - @conference_id_list_recordings_test_value = 'conferenceId_example' + @conference_id_list_recordings_test_value = "conferenceId_example" - @date_created_list_recordings_test_value = 'dateCreated_example' + @date_created_list_recordings_test_value = "dateCreated_example" - @brand_id_get_ten_dlc_sms_campaigns_test_value = 'BX56XX4' + @brand_id_get_ten_dlc_sms_campaigns_test_value = "BX56XX4" - @brand_id_get_ten_dlc_sms_partner_campaigns_test_value = 'BX56XX4' + @brand_id_get_ten_dlc_sms_partner_campaigns_test_value = "BX56XX4" - @brand_id_get_ten_dlc_sms_brand_test_value = 'BX56XX4' + @brand_id_get_ten_dlc_sms_brand_test_value = "BX56XX4" - @campaign_id_get_ten_dlc_sms_campaign_test_value = 'CX56XX4' + @campaign_id_get_ten_dlc_sms_campaign_test_value = "CX56XX4" - @campaign_id_get_ten_dlc_sms_partner_campaign_test_value = 'CX56XX4' + @campaign_id_get_ten_dlc_sms_partner_campaign_test_value = "CX56XX4" @has_campaign_list_incoming_numbers_test_value = true - @campaign_id_list_sms_messages_test_value = 'CX56XX4' + @campaign_id_list_sms_messages_test_value = "CX56XX4" - @brand_id_list_sms_messages_test_value = 'BX56XX4' + @brand_id_list_sms_messages_test_value = "BX56XX4" @is10_dlc_list_sms_messages_test_value = true @@ -231,29 +229,29 @@ @application_request_update_an_application_test_value = Freeclimb::ApplicationRequest.new - @make_call_request_make_a_call_test_value = Freeclimb::MakeCallRequest.new({ from: 'from_example', to: 'to_example' }) + @make_call_request_make_a_call_test_value = Freeclimb::MakeCallRequest.new({from: "from_example", to: "to_example"}) + + @message_request_send_an_sms_message_test_value = Freeclimb::MessageRequest.new({from: "from_example", to: "to_example", text: "text_example"}) - @message_request_send_an_sms_message_test_value = Freeclimb::MessageRequest.new({ from: 'from_example', to: 'to_example', text: 'text_example' }) + @update_conference_request_update_a_conference_test_value = Freeclimb::UpdateConferenceRequest.new({_alias: "alias_example", play_beep: Freeclimb::PlayBeep::ALWAYS, status: Freeclimb::UpdateConferenceRequestStatus::EMPTY}) - @update_conference_request_update_a_conference_test_value = Freeclimb::UpdateConferenceRequest.new({ _alias: 'alias_example', play_beep: Freeclimb::PlayBeep::ALWAYS, status: Freeclimb::UpdateConferenceRequestStatus::EMPTY }) + @update_call_request_update_a_live_call_test_value = Freeclimb::UpdateCallRequest.new({status: Freeclimb::UpdateCallRequestStatus::CANCELED}) - @update_call_request_update_a_live_call_test_value = Freeclimb::UpdateCallRequest.new({ status: Freeclimb::UpdateCallRequestStatus::CANCELED }) - - @update_conference_participant_request_update_a_participant_test_value = Freeclimb::UpdateConferenceParticipantRequest.new + @update_conference_participant_request_update_a_participant_test_value = Freeclimb::UpdateConferenceParticipantRequest.new @account_request_update_an_account_test_value = Freeclimb::AccountRequest.new @incoming_number_request_update_an_incoming_number_test_value = Freeclimb::IncomingNumberRequest.new - - @campaign_id_get_toll_free_sms_campaign_test_value = 'CX56XX4' - @conference_id_list_conference_recordings_test_value = 'conferenceId_example' + @campaign_id_get_toll_free_sms_campaign_test_value = "CX56XX4" + + @conference_id_list_conference_recordings_test_value = "conferenceId_example" - @create_web_rtc_token_make_a_webrtc_jwt_test_value = Freeclimb::CreateWebRTCToken.new({ to: 'to_example', from: 'from_example', uses: 2 }) + @create_web_rtc_token_make_a_webrtc_jwt_test_value = Freeclimb::CreateWebRTCToken.new({to: "to_example", from: "from_example", uses: 2}) - @knowledge_base_id_create_knowledge_base_completion_test_value = 'knowledgeBaseId_example' + @knowledge_base_id_create_knowledge_base_completion_test_value = "knowledgeBaseId_example" - @completion_request_create_knowledge_base_completion_test_value = Freeclimb::CompletionRequest.new({ query: 'query_example' }) + @completion_request_create_knowledge_base_completion_test_value = Freeclimb::CompletionRequest.new({query: "query_example"}) end after do @@ -261,8 +259,8 @@ # run after each test end - describe 'test an instance of DefaultApi' do - it 'should create an instance of DefaultApi' do + describe "test an instance of DefaultApi" do + it "should create an instance of DefaultApi" do expect(@api_instance).to be_instance_of(Freeclimb::DefaultApi) end end @@ -272,19 +270,17 @@ # @param buy_incoming_number_request Incoming Number transaction details # @param [Hash] opts the optional parameters # @return [IncomingNumberResult] - describe 'buy_a_phone_number test' do - it 'should work' do - + describe "buy_a_phone_number test" do + it "should work" do buy_incoming_number_request = @buy_incoming_number_request_buy_a_phone_number_test_value - + result = @api_instance.buy_a_phone_number( buy_incoming_number_request, {} ) - false - + expect(result).to be_a Freeclimb::IncomingNumberResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -294,21 +290,18 @@ # @param [Hash] opts the optional parameters # @option opts [CreateConferenceRequest] :create_conference_request Conference to create # @return [ConferenceResult] - describe 'create_a_conference test' do - it 'should work' do - + describe "create_a_conference test" do + it "should work" do create_conference_request = @create_conference_request_create_a_conference_test_value - + result = @api_instance.create_a_conference( - { - :create_conference_request => create_conference_request, + create_conference_request: create_conference_request } ) - false - + expect(result).to be_a Freeclimb::ConferenceResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -318,21 +311,18 @@ # @param [Hash] opts the optional parameters # @option opts [QueueRequest] :queue_request Queue details used to create a queue # @return [QueueResult] - describe 'create_a_queue test' do - it 'should work' do - + describe "create_a_queue test" do + it "should work" do queue_request = @queue_request_create_a_queue_test_value - + result = @api_instance.create_a_queue( - { - :queue_request => queue_request, + queue_request: queue_request } ) - false - + expect(result).to be_a Freeclimb::QueueResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -342,21 +332,18 @@ # @param [Hash] opts the optional parameters # @option opts [ApplicationRequest] :application_request Application Details # @return [ApplicationResult] - describe 'create_an_application test' do - it 'should work' do - + describe "create_an_application test" do + it "should work" do application_request = @application_request_create_an_application_test_value - + result = @api_instance.create_an_application( - { - :application_request => application_request, + application_request: application_request } ) - false - + expect(result).to be_a Freeclimb::ApplicationResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -367,22 +354,20 @@ # @param [Hash] opts the optional parameters # @option opts [CompletionRequest] :completion_request Completion request details # @return [CompletionResult] - describe 'create_knowledge_base_completion test' do - it 'should work' do - + describe "create_knowledge_base_completion test" do + it "should work" do knowledge_base_id = @knowledge_base_id_create_knowledge_base_completion_test_value completion_request = @completion_request_create_knowledge_base_completion_test_value - + result = @api_instance.create_knowledge_base_completion( knowledge_base_id, { - :completion_request => completion_request, + completion_request: completion_request } ) - false - + expect(result).to be_a Freeclimb::CompletionResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -392,18 +377,15 @@ # @param recording_id String that uniquely identifies this recording resource. # @param [Hash] opts the optional parameters # @return [nil] - describe 'delete_a_recording test' do - it 'should work' do - + describe "delete_a_recording test" do + it "should work" do recording_id = @recording_id_delete_a_recording_test_value - + result = @api_instance.delete_a_recording( recording_id, {} ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -414,18 +396,15 @@ # @param application_id String that uniquely identifies this application resource. # @param [Hash] opts the optional parameters # @return [nil] - describe 'delete_an_application test' do - it 'should work' do - + describe "delete_an_application test" do + it "should work" do application_id = @application_id_delete_an_application_test_value - + result = @api_instance.delete_an_application( application_id, {} ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -436,18 +415,15 @@ # @param phone_number_id String that uniquely identifies this phone number resource. # @param [Hash] opts the optional parameters # @return [nil] - describe 'delete_an_incoming_number test' do - it 'should work' do - + describe "delete_an_incoming_number test" do + it "should work" do phone_number_id = @phone_number_id_delete_an_incoming_number_test_value - + result = @api_instance.delete_an_incoming_number( phone_number_id, {} ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -459,20 +435,18 @@ # @param call_id ID if the Call that the Member belongs to # @param [Hash] opts the optional parameters # @return [QueueMember] - describe 'dequeue_a_member test' do - it 'should work' do - + describe "dequeue_a_member test" do + it "should work" do queue_id = @queue_id_dequeue_a_member_test_value call_id = @call_id_dequeue_a_member_test_value - + result = @api_instance.dequeue_a_member( queue_id, call_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueMember - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -482,19 +456,17 @@ # @param queue_id String that uniquely identifies this queue resource. # @param [Hash] opts the optional parameters # @return [QueueMember] - describe 'dequeue_head_member test' do - it 'should work' do - + describe "dequeue_head_member test" do + it "should work" do queue_id = @queue_id_dequeue_head_member_test_value - + result = @api_instance.dequeue_head_member( queue_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueMember - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -504,19 +476,17 @@ # @param recording_id String that uniquely identifies this recording resource. # @param [Hash] opts the optional parameters # @return [File] - describe 'download_a_recording_file test' do - it 'should work' do - + describe "download_a_recording_file test" do + it "should work" do recording_id = @recording_id_download_a_recording_file_test_value - + result = @api_instance.download_a_recording_file( recording_id, {} ) - false - + expect(result).to be_a Freeclimb::File - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -526,19 +496,17 @@ # @param filter_logs_request Filter logs request paramters # @param [Hash] opts the optional parameters # @return [LogList] - describe 'filter_logs test' do - it 'should work' do - + describe "filter_logs test" do + it "should work" do filter_logs_request = @filter_logs_request_filter_logs_test_value - + result = @api_instance.filter_logs( filter_logs_request, {} ) - false - + expect(result).to be_a Freeclimb::LogList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -548,19 +516,17 @@ # @param call_id String that uniquely identifies this call resource. # @param [Hash] opts the optional parameters # @return [CallResult] - describe 'get_a_call test' do - it 'should work' do - + describe "get_a_call test" do + it "should work" do call_id = @call_id_get_a_call_test_value - + result = @api_instance.get_a_call( call_id, {} ) - false - + expect(result).to be_a Freeclimb::CallResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -570,19 +536,17 @@ # @param conference_id A string that uniquely identifies this conference resource. # @param [Hash] opts the optional parameters # @return [ConferenceResult] - describe 'get_a_conference test' do - it 'should work' do - + describe "get_a_conference test" do + it "should work" do conference_id = @conference_id_get_a_conference_test_value - + result = @api_instance.get_a_conference( conference_id, {} ) - false - + expect(result).to be_a Freeclimb::ConferenceResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -593,20 +557,18 @@ # @param call_id ID of the Call that the Member belongs to # @param [Hash] opts the optional parameters # @return [QueueMember] - describe 'get_a_member test' do - it 'should work' do - + describe "get_a_member test" do + it "should work" do queue_id = @queue_id_get_a_member_test_value call_id = @call_id_get_a_member_test_value - + result = @api_instance.get_a_member( queue_id, call_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueMember - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -617,20 +579,18 @@ # @param call_id ID of the Call associated with this participant. # @param [Hash] opts the optional parameters # @return [ConferenceParticipantResult] - describe 'get_a_participant test' do - it 'should work' do - + describe "get_a_participant test" do + it "should work" do conference_id = @conference_id_get_a_participant_test_value call_id = @call_id_get_a_participant_test_value - + result = @api_instance.get_a_participant( conference_id, call_id, {} ) - false - + expect(result).to be_a Freeclimb::ConferenceParticipantResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -640,19 +600,17 @@ # @param queue_id A string that uniquely identifies this queue resource. # @param [Hash] opts the optional parameters # @return [QueueResult] - describe 'get_a_queue test' do - it 'should work' do - + describe "get_a_queue test" do + it "should work" do queue_id = @queue_id_get_a_queue_test_value - + result = @api_instance.get_a_queue( queue_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -662,19 +620,17 @@ # @param recording_id String that uniquely identifies this recording resource. # @param [Hash] opts the optional parameters # @return [RecordingResult] - describe 'get_a_recording test' do - it 'should work' do - + describe "get_a_recording test" do + it "should work" do recording_id = @recording_id_get_a_recording_test_value - + result = @api_instance.get_a_recording( recording_id, {} ) - false - + expect(result).to be_a Freeclimb::RecordingResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -683,18 +639,14 @@ # Get an Account # @param [Hash] opts the optional parameters # @return [AccountResult] - describe 'get_an_account test' do - it 'should work' do - - + describe "get_an_account test" do + it "should work" do result = @api_instance.get_an_account( - {} ) - false - + expect(result).to be_a Freeclimb::AccountResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -704,19 +656,17 @@ # @param application_id A string that uniquely identifies this application resource. # @param [Hash] opts the optional parameters # @return [ApplicationResult] - describe 'get_an_application test' do - it 'should work' do - + describe "get_an_application test" do + it "should work" do application_id = @application_id_get_an_application_test_value - + result = @api_instance.get_an_application( application_id, {} ) - false - + expect(result).to be_a Freeclimb::ApplicationResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -726,19 +676,17 @@ # @param phone_number_id String that uniquely identifies this phone number resource. # @param [Hash] opts the optional parameters # @return [IncomingNumberResult] - describe 'get_an_incoming_number test' do - it 'should work' do - + describe "get_an_incoming_number test" do + it "should work" do phone_number_id = @phone_number_id_get_an_incoming_number_test_value - + result = @api_instance.get_an_incoming_number( phone_number_id, {} ) - false - + expect(result).to be_a Freeclimb::IncomingNumberResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -748,19 +696,17 @@ # @param message_id String that uniquely identifies this Message resource. # @param [Hash] opts the optional parameters # @return [MessageResult] - describe 'get_an_sms_message test' do - it 'should work' do - + describe "get_an_sms_message test" do + it "should work" do message_id = @message_id_get_an_sms_message_test_value - + result = @api_instance.get_an_sms_message( message_id, {} ) - false - + expect(result).to be_a Freeclimb::MessageResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -770,19 +716,17 @@ # @param queue_id String that uniquely identifies the Queue that the Member belongs to. # @param [Hash] opts the optional parameters # @return [QueueMember] - describe 'get_head_member test' do - it 'should work' do - + describe "get_head_member test" do + it "should work" do queue_id = @queue_id_get_head_member_test_value - + result = @api_instance.get_head_member( queue_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueMember - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -792,19 +736,17 @@ # @param brand_id String that uniquely identifies this brand resource. # @param [Hash] opts the optional parameters # @return [SMSTenDLCBrand] - describe 'get_ten_dlc_sms_brand test' do - it 'should work' do - + describe "get_ten_dlc_sms_brand test" do + it "should work" do brand_id = @brand_id_get_ten_dlc_sms_brand_test_value - + result = @api_instance.get_ten_dlc_sms_brand( brand_id, {} ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCBrand - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -813,18 +755,14 @@ # Get list of SMS 10DLC Brands # @param [Hash] opts the optional parameters # @return [SMSTenDLCBrandsListResult] - describe 'get_ten_dlc_sms_brands test' do - it 'should work' do - - + describe "get_ten_dlc_sms_brands test" do + it "should work" do result = @api_instance.get_ten_dlc_sms_brands( - {} ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCBrandsListResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -834,19 +772,17 @@ # @param campaign_id String that uniquely identifies this campaign resource. # @param [Hash] opts the optional parameters # @return [SMSTenDLCCampaign] - describe 'get_ten_dlc_sms_campaign test' do - it 'should work' do - + describe "get_ten_dlc_sms_campaign test" do + it "should work" do campaign_id = @campaign_id_get_ten_dlc_sms_campaign_test_value - + result = @api_instance.get_ten_dlc_sms_campaign( campaign_id, {} ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCCampaign - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -856,21 +792,18 @@ # @param [Hash] opts the optional parameters # @option opts [String] :brand_id The unique identifier for a brand # @return [SMSTenDLCCampaignsListResult] - describe 'get_ten_dlc_sms_campaigns test' do - it 'should work' do - + describe "get_ten_dlc_sms_campaigns test" do + it "should work" do brand_id = @brand_id_get_ten_dlc_sms_campaigns_test_value - + result = @api_instance.get_ten_dlc_sms_campaigns( - { - :brand_id => brand_id, + brand_id: brand_id } ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCCampaignsListResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -880,19 +813,17 @@ # @param campaign_id String that uniquely identifies this campaign resource. # @param [Hash] opts the optional parameters # @return [SMSTenDLCPartnerCampaign] - describe 'get_ten_dlc_sms_partner_campaign test' do - it 'should work' do - + describe "get_ten_dlc_sms_partner_campaign test" do + it "should work" do campaign_id = @campaign_id_get_ten_dlc_sms_partner_campaign_test_value - + result = @api_instance.get_ten_dlc_sms_partner_campaign( campaign_id, {} ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCPartnerCampaign - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -902,21 +833,18 @@ # @param [Hash] opts the optional parameters # @option opts [String] :brand_id The unique identifier for a brand # @return [SMSTenDLCPartnerCampaignsListResult] - describe 'get_ten_dlc_sms_partner_campaigns test' do - it 'should work' do - + describe "get_ten_dlc_sms_partner_campaigns test" do + it "should work" do brand_id = @brand_id_get_ten_dlc_sms_partner_campaigns_test_value - + result = @api_instance.get_ten_dlc_sms_partner_campaigns( - { - :brand_id => brand_id, + brand_id: brand_id } ) - false - + expect(result).to be_a Freeclimb::SMSTenDLCPartnerCampaignsListResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -926,19 +854,17 @@ # @param campaign_id String that uniquely identifies this TollFree Campaign resource. # @param [Hash] opts the optional parameters # @return [SMSTollFreeCampaign] - describe 'get_toll_free_sms_campaign test' do - it 'should work' do - + describe "get_toll_free_sms_campaign test" do + it "should work" do campaign_id = @campaign_id_get_toll_free_sms_campaign_test_value - + result = @api_instance.get_toll_free_sms_campaign( campaign_id, {} ) - false - + expect(result).to be_a Freeclimb::SMSTollFreeCampaign - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -947,18 +873,14 @@ # Get list of TollFree Campaigns # @param [Hash] opts the optional parameters # @return [SMSTollFreeCampaignsListResult] - describe 'get_toll_free_sms_campaigns test' do - it 'should work' do - - + describe "get_toll_free_sms_campaigns test" do + it "should work" do result = @api_instance.get_toll_free_sms_campaigns( - {} ) - false - + expect(result).to be_a Freeclimb::SMSTollFreeCampaignsListResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -968,21 +890,18 @@ # @param [Hash] opts the optional parameters # @option opts [String] :_alias Return only the Queue resources with aliases that exactly match this name. # @return [QueueList] - describe 'list_active_queues test' do - it 'should work' do - + describe "list_active_queues test" do + it "should work" do _alias = @_alias_list_active_queues_test_value - + result = @api_instance.list_active_queues( - { - :_alias => _alias, + _alias: _alias } ) - false - + expect(result).to be_a Freeclimb::QueueList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -991,18 +910,14 @@ # List All Account Logs # @param [Hash] opts the optional parameters # @return [LogList] - describe 'list_all_account_logs test' do - it 'should work' do - - + describe "list_all_account_logs test" do + it "should work" do result = @api_instance.list_all_account_logs( - {} ) - false - + expect(result).to be_a Freeclimb::LogList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1012,21 +927,18 @@ # @param [Hash] opts the optional parameters # @option opts [String] :_alias Return only applications with aliases that exactly match this value. # @return [ApplicationList] - describe 'list_applications test' do - it 'should work' do - + describe "list_applications test" do + it "should work" do _alias = @_alias_list_applications_test_value - + result = @api_instance.list_applications( - { - :_alias => _alias, + _alias: _alias } ) - false - + expect(result).to be_a Freeclimb::ApplicationList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1039,15 +951,14 @@ # @option opts [String] :country Country of this phone number. # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @return [AvailableNumberList] - describe 'list_available_numbers test' do - it 'should work' do - + describe "list_available_numbers test" do + it "should work" do phone_number = @phone_number_list_available_numbers_test_value region = @region_list_available_numbers_test_value country = @country_list_available_numbers_test_value @@ -1058,17 +969,15 @@ capabilities_toll_free = @capabilities_toll_free_list_available_numbers_test_value capabilities_ten_dlc = @capabilities_ten_dlc_list_available_numbers_test_value capabilities_short_code = @capabilities_short_code_list_available_numbers_test_value - + result = @api_instance.list_available_numbers( - { - :phone_number => phone_number, :region => region, :country => country, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code, + phone_number: phone_number, region: region, country: country, voice_enabled: voice_enabled, sms_enabled: sms_enabled, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code } ) - false - + expect(result).to be_a Freeclimb::AvailableNumberList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1078,19 +987,17 @@ # @param call_id String that uniquely identifies this call resource. # @param [Hash] opts the optional parameters # @return [LogList] - describe 'list_call_logs test' do - it 'should work' do - + describe "list_call_logs test" do + it "should work" do call_id = @call_id_list_call_logs_test_value - + result = @api_instance.list_call_logs( call_id, {} ) - false - + expect(result).to be_a Freeclimb::LogList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1101,22 +1008,20 @@ # @param [Hash] opts the optional parameters # @option opts [String] :date_created Only show recordings created on the specified date, in the form *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_call_recordings test' do - it 'should work' do - + describe "list_call_recordings test" do + it "should work" do call_id = @call_id_list_call_recordings_test_value date_created = @date_created_list_call_recordings_test_value - + result = @api_instance.list_call_recordings( call_id, { - :date_created => date_created, + date_created: date_created } ) - false - + expect(result).to be_a Freeclimb::RecordingList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1133,9 +1038,8 @@ # @option opts [String] :parent_call_id Only show Calls spawned by the call with this ID. # @option opts [Array] :application_id Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. # @return [CallList] - describe 'list_calls test' do - it 'should work' do - + describe "list_calls test" do + it "should work" do active = @active_list_calls_test_value to = @to_list_calls_test_value from = @from_list_calls_test_value @@ -1144,17 +1048,15 @@ end_time = @end_time_list_calls_test_value parent_call_id = @parent_call_id_list_calls_test_value application_id = @application_id_list_calls_test_value - + result = @api_instance.list_calls( - { - :active => active, :to => to, :from => from, :status => status, :start_time => start_time, :end_time => end_time, :parent_call_id => parent_call_id, :application_id => application_id, + active: active, to: to, from: from, status: status, start_time: start_time, end_time: end_time, parent_call_id: parent_call_id, application_id: application_id } ) - false - + expect(result).to be_a Freeclimb::CallList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1166,23 +1068,21 @@ # @option opts [String] :call_id Show only Recordings made during the Call with this ID. # @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_conference_recordings test' do - it 'should work' do - + describe "list_conference_recordings test" do + it "should work" do conference_id = @conference_id_list_conference_recordings_test_value call_id = @call_id_list_conference_recordings_test_value date_created = @date_created_list_conference_recordings_test_value - + result = @api_instance.list_conference_recordings( conference_id, { - :call_id => call_id, :date_created => date_created, + call_id: call_id, date_created: date_created } ) - false - + expect(result).to be_a Freeclimb::RecordingList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1195,24 +1095,21 @@ # @option opts [String] :date_created Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. # @option opts [String] :date_updated Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. # @return [ConferenceList] - describe 'list_conferences test' do - it 'should work' do - + describe "list_conferences test" do + it "should work" do status = @status_list_conferences_test_value _alias = @_alias_list_conferences_test_value date_created = @date_created_list_conferences_test_value date_updated = @date_updated_list_conferences_test_value - + result = @api_instance.list_conferences( - { - :status => status, :_alias => _alias, :date_created => date_created, :date_updated => date_updated, + status: status, _alias: _alias, date_created: date_created, date_updated: date_updated } ) - false - + expect(result).to be_a Freeclimb::ConferenceList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1229,17 +1126,16 @@ # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @option opts [String] :tfn_campaign_id Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. # @option opts [Boolean] :offnet Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. # @return [IncomingNumberList] - describe 'list_incoming_numbers test' do - it 'should work' do - + describe "list_incoming_numbers test" do + it "should work" do phone_number = @phone_number_list_incoming_numbers_test_value _alias = @_alias_list_incoming_numbers_test_value region = @region_list_incoming_numbers_test_value @@ -1256,17 +1152,15 @@ capabilities_short_code = @capabilities_short_code_list_incoming_numbers_test_value tfn_campaign_id = @tfn_campaign_id_list_incoming_numbers_test_value offnet = @offnet_list_incoming_numbers_test_value - + result = @api_instance.list_incoming_numbers( - { - :phone_number => phone_number, :_alias => _alias, :region => region, :country => country, :application_id => application_id, :has_application => has_application, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :has_campaign => has_campaign, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code, :tfn_campaign_id => tfn_campaign_id, :offnet => offnet, + phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, voice_enabled: voice_enabled, sms_enabled: sms_enabled, has_campaign: has_campaign, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code, tfn_campaign_id: tfn_campaign_id, offnet: offnet } ) - false - + expect(result).to be_a Freeclimb::IncomingNumberList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1276,19 +1170,17 @@ # @param queue_id String that uniquely identifies the Queue that the Member belongs to. # @param [Hash] opts the optional parameters # @return [QueueMemberList] - describe 'list_members test' do - it 'should work' do - + describe "list_members test" do + it "should work" do queue_id = @queue_id_list_members_test_value - + result = @api_instance.list_members( queue_id, {} ) - false - + expect(result).to be_a Freeclimb::QueueMemberList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1301,24 +1193,22 @@ # @option opts [Boolean] :listen Only show Participants with the listen privilege. # @option opts [Boolean] :dtmf_pass_through Only show Participants with the dtmfPassThrough privilege. # @return [ConferenceParticipantList] - describe 'list_participants test' do - it 'should work' do - + describe "list_participants test" do + it "should work" do conference_id = @conference_id_list_participants_test_value talk = @talk_list_participants_test_value listen = @listen_list_participants_test_value dtmf_pass_through = @dtmf_pass_through_list_participants_test_value - + result = @api_instance.list_participants( conference_id, { - :talk => talk, :listen => listen, :dtmf_pass_through => dtmf_pass_through, + talk: talk, listen: listen, dtmf_pass_through: dtmf_pass_through } ) - false - + expect(result).to be_a Freeclimb::ConferenceParticipantList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1330,23 +1220,20 @@ # @option opts [String] :conference_id Show only Recordings made during the conference with this ID. # @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_recordings test' do - it 'should work' do - + describe "list_recordings test" do + it "should work" do call_id = @call_id_list_recordings_test_value conference_id = @conference_id_list_recordings_test_value date_created = @date_created_list_recordings_test_value - + result = @api_instance.list_recordings( - { - :call_id => call_id, :conference_id => conference_id, :date_created => date_created, + call_id: call_id, conference_id: conference_id, date_created: date_created } ) - false - + expect(result).to be_a Freeclimb::RecordingList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1363,9 +1250,8 @@ # @option opts [String] :brand_id Only show messages associated with this brand ID # @option opts [Boolean] :is10_dlc Only show messages that were sent as part of a 10DLC campaign. # @return [MessagesList] - describe 'list_sms_messages test' do - it 'should work' do - + describe "list_sms_messages test" do + it "should work" do to = @to_list_sms_messages_test_value from = @from_list_sms_messages_test_value begin_time = @begin_time_list_sms_messages_test_value @@ -1374,17 +1260,15 @@ campaign_id = @campaign_id_list_sms_messages_test_value brand_id = @brand_id_list_sms_messages_test_value is10_dlc = @is10_dlc_list_sms_messages_test_value - + result = @api_instance.list_sms_messages( - { - :to => to, :from => from, :begin_time => begin_time, :end_time => end_time, :direction => direction, :campaign_id => campaign_id, :brand_id => brand_id, :is10_dlc => is10_dlc, + to: to, from: from, begin_time: begin_time, end_time: end_time, direction: direction, campaign_id: campaign_id, brand_id: brand_id, is10_dlc: is10_dlc } ) - false - + expect(result).to be_a Freeclimb::MessagesList - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1394,21 +1278,18 @@ # @param [Hash] opts the optional parameters # @option opts [MakeCallRequest] :make_call_request Call details for making a call # @return [CallResult] - describe 'make_a_call test' do - it 'should work' do - + describe "make_a_call test" do + it "should work" do make_call_request = @make_call_request_make_a_call_test_value - + result = @api_instance.make_a_call( - { - :make_call_request => make_call_request, + make_call_request: make_call_request } ) - false - + expect(result).to be_a Freeclimb::CallResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1418,19 +1299,16 @@ # @param create_web_rtc_token Information needed to craft a JWT compatible with the platforms WebRTC APIs # @param [Hash] opts the optional parameters # @return [String] - describe 'make_a_webrtc_jwt test' do - it 'should work' do - + describe "make_a_webrtc_jwt test" do + it "should work" do create_web_rtc_token = @create_web_rtc_token_make_a_webrtc_jwt_test_value - + result = @api_instance.make_a_webrtc_jwt( create_web_rtc_token, {} ) - true expect(result).to be_a String - - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1441,19 +1319,16 @@ # @param call_id ID of the Call associated with this participant. # @param [Hash] opts the optional parameters # @return [nil] - describe 'remove_a_participant test' do - it 'should work' do - + describe "remove_a_participant test" do + it "should work" do conference_id = @conference_id_remove_a_participant_test_value call_id = @call_id_remove_a_participant_test_value - + result = @api_instance.remove_a_participant( conference_id, call_id, {} ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -1464,19 +1339,17 @@ # @param message_request Details to create a message # @param [Hash] opts the optional parameters # @return [MessageResult] - describe 'send_an_sms_message test' do - it 'should work' do - + describe "send_an_sms_message test" do + it "should work" do message_request = @message_request_send_an_sms_message_test_value - + result = @api_instance.send_an_sms_message( message_request, {} ) - false - + expect(result).to be_a Freeclimb::MessageResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1486,19 +1359,17 @@ # @param recording_id String that uniquely identifies this recording resource. # @param [Hash] opts the optional parameters # @return [File] - describe 'stream_a_recording_file test' do - it 'should work' do - + describe "stream_a_recording_file test" do + it "should work" do recording_id = @recording_id_stream_a_recording_file_test_value - + result = @api_instance.stream_a_recording_file( recording_id, {} ) - false - + expect(result).to be_a Freeclimb::File - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1509,21 +1380,18 @@ # @param [Hash] opts the optional parameters # @option opts [UpdateConferenceRequest] :update_conference_request Conference Details to update # @return [nil] - describe 'update_a_conference test' do - it 'should work' do - + describe "update_a_conference test" do + it "should work" do conference_id = @conference_id_update_a_conference_test_value update_conference_request = @update_conference_request_update_a_conference_test_value - + result = @api_instance.update_a_conference( conference_id, { - :update_conference_request => update_conference_request, + update_conference_request: update_conference_request } ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -1535,19 +1403,16 @@ # @param update_call_request Call details to update # @param [Hash] opts the optional parameters # @return [nil] - describe 'update_a_live_call test' do - it 'should work' do - + describe "update_a_live_call test" do + it "should work" do call_id = @call_id_update_a_live_call_test_value update_call_request = @update_call_request_update_a_live_call_test_value - + result = @api_instance.update_a_live_call( call_id, update_call_request, {} ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -1560,23 +1425,21 @@ # @param [Hash] opts the optional parameters # @option opts [UpdateConferenceParticipantRequest] :update_conference_participant_request Conference participant details to update # @return [ConferenceParticipantResult] - describe 'update_a_participant test' do - it 'should work' do - + describe "update_a_participant test" do + it "should work" do conference_id = @conference_id_update_a_participant_test_value call_id = @call_id_update_a_participant_test_value update_conference_participant_request = @update_conference_participant_request_update_a_participant_test_value - + result = @api_instance.update_a_participant( conference_id, call_id, { - :update_conference_participant_request => update_conference_participant_request, + update_conference_participant_request: update_conference_participant_request } ) - false - + expect(result).to be_a Freeclimb::ConferenceParticipantResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1587,22 +1450,20 @@ # @param [Hash] opts the optional parameters # @option opts [QueueRequest] :queue_request Queue Details to update # @return [QueueResult] - describe 'update_a_queue test' do - it 'should work' do - + describe "update_a_queue test" do + it "should work" do queue_id = @queue_id_update_a_queue_test_value queue_request = @queue_request_update_a_queue_test_value - + result = @api_instance.update_a_queue( queue_id, { - :queue_request => queue_request, + queue_request: queue_request } ) - false - + expect(result).to be_a Freeclimb::QueueResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1612,20 +1473,16 @@ # @param [Hash] opts the optional parameters # @option opts [AccountRequest] :account_request Account details to update # @return [nil] - describe 'update_an_account test' do - it 'should work' do - + describe "update_an_account test" do + it "should work" do account_request = @account_request_update_an_account_test_value - + result = @api_instance.update_an_account( - { - :account_request => account_request, + account_request: account_request } ) - false - - + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -1637,22 +1494,20 @@ # @param [Hash] opts the optional parameters # @option opts [ApplicationRequest] :application_request Application details to update. # @return [ApplicationResult] - describe 'update_an_application test' do - it 'should work' do - + describe "update_an_application test" do + it "should work" do application_id = @application_id_update_an_application_test_value application_request = @application_request_update_an_application_test_value - + result = @api_instance.update_an_application( application_id, { - :application_request => application_request, + application_request: application_request } ) - false - + expect(result).to be_a Freeclimb::ApplicationResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1663,22 +1518,20 @@ # @param [Hash] opts the optional parameters # @option opts [IncomingNumberRequest] :incoming_number_request Incoming Number details to update # @return [IncomingNumberResult] - describe 'update_an_incoming_number test' do - it 'should work' do - + describe "update_an_incoming_number test" do + it "should work" do phone_number_id = @phone_number_id_update_an_incoming_number_test_value incoming_number_request = @incoming_number_request_update_an_incoming_number_test_value - + result = @api_instance.update_an_incoming_number( phone_number_id, { - :incoming_number_request => incoming_number_request, + incoming_number_request: incoming_number_request } ) - false - + expect(result).to be_a Freeclimb::IncomingNumberResult - + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1688,11 +1541,10 @@ # @param filter_logs_request Filter logs request paramters # @param [Hash] opts the optional parameters # @return [LogList] - describe 'filter_logs_get_next_page test' do - it 'should work' do - + describe "filter_logs_get_next_page test" do + it "should work" do filter_logs_request = @filter_logs_request_filter_logs_test_value - + result = @api_instance.filter_logs( filter_logs_request, {} @@ -1708,12 +1560,9 @@ # Get list of SMS 10DLC Brands # @param [Hash] opts the optional parameters # @return [SMSTenDLCBrandsListResult] - describe 'get_ten_dlc_sms_brands_get_next_page test' do - it 'should work' do - - + describe "get_ten_dlc_sms_brands_get_next_page test" do + it "should work" do result = @api_instance.get_ten_dlc_sms_brands( - {} ) result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Brands?cursor=1" @@ -1728,15 +1577,13 @@ # @param [Hash] opts the optional parameters # @option opts [String] :brand_id The unique identifier for a brand # @return [SMSTenDLCCampaignsListResult] - describe 'get_ten_dlc_sms_campaigns_get_next_page test' do - it 'should work' do - + describe "get_ten_dlc_sms_campaigns_get_next_page test" do + it "should work" do brand_id = @brand_id_get_ten_dlc_sms_campaigns_test_value - + result = @api_instance.get_ten_dlc_sms_campaigns( - { - :brand_id => brand_id, + brand_id: brand_id } ) result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Campaigns?cursor=1" @@ -1751,15 +1598,13 @@ # @param [Hash] opts the optional parameters # @option opts [String] :brand_id The unique identifier for a brand # @return [SMSTenDLCPartnerCampaignsListResult] - describe 'get_ten_dlc_sms_partner_campaigns_get_next_page test' do - it 'should work' do - + describe "get_ten_dlc_sms_partner_campaigns_get_next_page test" do + it "should work" do brand_id = @brand_id_get_ten_dlc_sms_partner_campaigns_test_value - + result = @api_instance.get_ten_dlc_sms_partner_campaigns( - { - :brand_id => brand_id, + brand_id: brand_id } ) result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns?cursor=1" @@ -1773,12 +1618,9 @@ # Get list of TollFree Campaigns # @param [Hash] opts the optional parameters # @return [SMSTollFreeCampaignsListResult] - describe 'get_toll_free_sms_campaigns_get_next_page test' do - it 'should work' do - - + describe "get_toll_free_sms_campaigns_get_next_page test" do + it "should work" do result = @api_instance.get_toll_free_sms_campaigns( - {} ) result.next_page_uri = "/Accounts/{accountId}/Messages/TollFree/Campaigns?cursor=1" @@ -1793,15 +1635,13 @@ # @param [Hash] opts the optional parameters # @option opts [String] :_alias Return only the Queue resources with aliases that exactly match this name. # @return [QueueList] - describe 'list_active_queues_get_next_page test' do - it 'should work' do - + describe "list_active_queues_get_next_page test" do + it "should work" do _alias = @_alias_list_active_queues_test_value - + result = @api_instance.list_active_queues( - { - :_alias => _alias, + _alias: _alias } ) result.next_page_uri = "/Accounts/{accountId}/Queues?cursor=1" @@ -1815,12 +1655,9 @@ # List All Account Logs # @param [Hash] opts the optional parameters # @return [LogList] - describe 'list_all_account_logs_get_next_page test' do - it 'should work' do - - + describe "list_all_account_logs_get_next_page test" do + it "should work" do result = @api_instance.list_all_account_logs( - {} ) result.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1" @@ -1835,15 +1672,13 @@ # @param [Hash] opts the optional parameters # @option opts [String] :_alias Return only applications with aliases that exactly match this value. # @return [ApplicationList] - describe 'list_applications_get_next_page test' do - it 'should work' do - + describe "list_applications_get_next_page test" do + it "should work" do _alias = @_alias_list_applications_test_value - + result = @api_instance.list_applications( - { - :_alias => _alias, + _alias: _alias } ) result.next_page_uri = "/Accounts/{accountId}/Applications?cursor=1" @@ -1861,15 +1696,14 @@ # @option opts [String] :country Country of this phone number. # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @return [AvailableNumberList] - describe 'list_available_numbers_get_next_page test' do - it 'should work' do - + describe "list_available_numbers_get_next_page test" do + it "should work" do phone_number = @phone_number_list_available_numbers_test_value region = @region_list_available_numbers_test_value country = @country_list_available_numbers_test_value @@ -1880,11 +1714,10 @@ capabilities_toll_free = @capabilities_toll_free_list_available_numbers_test_value capabilities_ten_dlc = @capabilities_ten_dlc_list_available_numbers_test_value capabilities_short_code = @capabilities_short_code_list_available_numbers_test_value - + result = @api_instance.list_available_numbers( - { - :phone_number => phone_number, :region => region, :country => country, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code, + phone_number: phone_number, region: region, country: country, voice_enabled: voice_enabled, sms_enabled: sms_enabled, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code } ) result.next_page_uri = "/AvailablePhoneNumbers?cursor=1" @@ -1899,11 +1732,10 @@ # @param call_id String that uniquely identifies this call resource. # @param [Hash] opts the optional parameters # @return [LogList] - describe 'list_call_logs_get_next_page test' do - it 'should work' do - + describe "list_call_logs_get_next_page test" do + it "should work" do call_id = @call_id_list_call_logs_test_value - + result = @api_instance.list_call_logs( call_id, {} @@ -1921,16 +1753,15 @@ # @param [Hash] opts the optional parameters # @option opts [String] :date_created Only show recordings created on the specified date, in the form *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_call_recordings_get_next_page test' do - it 'should work' do - + describe "list_call_recordings_get_next_page test" do + it "should work" do call_id = @call_id_list_call_recordings_test_value date_created = @date_created_list_call_recordings_test_value - + result = @api_instance.list_call_recordings( call_id, { - :date_created => date_created, + date_created: date_created } ) result.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Recordings?cursor=1" @@ -1952,9 +1783,8 @@ # @option opts [String] :parent_call_id Only show Calls spawned by the call with this ID. # @option opts [Array] :application_id Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. # @return [CallList] - describe 'list_calls_get_next_page test' do - it 'should work' do - + describe "list_calls_get_next_page test" do + it "should work" do active = @active_list_calls_test_value to = @to_list_calls_test_value from = @from_list_calls_test_value @@ -1963,11 +1793,10 @@ end_time = @end_time_list_calls_test_value parent_call_id = @parent_call_id_list_calls_test_value application_id = @application_id_list_calls_test_value - + result = @api_instance.list_calls( - { - :active => active, :to => to, :from => from, :status => status, :start_time => start_time, :end_time => end_time, :parent_call_id => parent_call_id, :application_id => application_id, + active: active, to: to, from: from, status: status, start_time: start_time, end_time: end_time, parent_call_id: parent_call_id, application_id: application_id } ) result.next_page_uri = "/Accounts/{accountId}/Calls?cursor=1" @@ -1984,17 +1813,16 @@ # @option opts [String] :call_id Show only Recordings made during the Call with this ID. # @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_conference_recordings_get_next_page test' do - it 'should work' do - + describe "list_conference_recordings_get_next_page test" do + it "should work" do conference_id = @conference_id_list_conference_recordings_test_value call_id = @call_id_list_conference_recordings_test_value date_created = @date_created_list_conference_recordings_test_value - + result = @api_instance.list_conference_recordings( conference_id, { - :call_id => call_id, :date_created => date_created, + call_id: call_id, date_created: date_created } ) result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1" @@ -2012,18 +1840,16 @@ # @option opts [String] :date_created Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. # @option opts [String] :date_updated Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. # @return [ConferenceList] - describe 'list_conferences_get_next_page test' do - it 'should work' do - + describe "list_conferences_get_next_page test" do + it "should work" do status = @status_list_conferences_test_value _alias = @_alias_list_conferences_test_value date_created = @date_created_list_conferences_test_value date_updated = @date_updated_list_conferences_test_value - + result = @api_instance.list_conferences( - { - :status => status, :_alias => _alias, :date_created => date_created, :date_updated => date_updated, + status: status, _alias: _alias, date_created: date_created, date_updated: date_updated } ) result.next_page_uri = "/Accounts/{accountId}/Conferences?cursor=1" @@ -2045,17 +1871,16 @@ # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it - # @option opts [Boolean] :capabilities_voice - # @option opts [Boolean] :capabilities_sms - # @option opts [Boolean] :capabilities_toll_free - # @option opts [Boolean] :capabilities_ten_dlc - # @option opts [Boolean] :capabilities_short_code + # @option opts [Boolean] :capabilities_voice + # @option opts [Boolean] :capabilities_sms + # @option opts [Boolean] :capabilities_toll_free + # @option opts [Boolean] :capabilities_ten_dlc + # @option opts [Boolean] :capabilities_short_code # @option opts [String] :tfn_campaign_id Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. # @option opts [Boolean] :offnet Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. # @return [IncomingNumberList] - describe 'list_incoming_numbers_get_next_page test' do - it 'should work' do - + describe "list_incoming_numbers_get_next_page test" do + it "should work" do phone_number = @phone_number_list_incoming_numbers_test_value _alias = @_alias_list_incoming_numbers_test_value region = @region_list_incoming_numbers_test_value @@ -2072,11 +1897,10 @@ capabilities_short_code = @capabilities_short_code_list_incoming_numbers_test_value tfn_campaign_id = @tfn_campaign_id_list_incoming_numbers_test_value offnet = @offnet_list_incoming_numbers_test_value - + result = @api_instance.list_incoming_numbers( - { - :phone_number => phone_number, :_alias => _alias, :region => region, :country => country, :application_id => application_id, :has_application => has_application, :voice_enabled => voice_enabled, :sms_enabled => sms_enabled, :has_campaign => has_campaign, :capabilities_voice => capabilities_voice, :capabilities_sms => capabilities_sms, :capabilities_toll_free => capabilities_toll_free, :capabilities_ten_dlc => capabilities_ten_dlc, :capabilities_short_code => capabilities_short_code, :tfn_campaign_id => tfn_campaign_id, :offnet => offnet, + phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, voice_enabled: voice_enabled, sms_enabled: sms_enabled, has_campaign: has_campaign, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code, tfn_campaign_id: tfn_campaign_id, offnet: offnet } ) result.next_page_uri = "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1" @@ -2091,11 +1915,10 @@ # @param queue_id String that uniquely identifies the Queue that the Member belongs to. # @param [Hash] opts the optional parameters # @return [QueueMemberList] - describe 'list_members_get_next_page test' do - it 'should work' do - + describe "list_members_get_next_page test" do + it "should work" do queue_id = @queue_id_list_members_test_value - + result = @api_instance.list_members( queue_id, {} @@ -2115,18 +1938,17 @@ # @option opts [Boolean] :listen Only show Participants with the listen privilege. # @option opts [Boolean] :dtmf_pass_through Only show Participants with the dtmfPassThrough privilege. # @return [ConferenceParticipantList] - describe 'list_participants_get_next_page test' do - it 'should work' do - + describe "list_participants_get_next_page test" do + it "should work" do conference_id = @conference_id_list_participants_test_value talk = @talk_list_participants_test_value listen = @listen_list_participants_test_value dtmf_pass_through = @dtmf_pass_through_list_participants_test_value - + result = @api_instance.list_participants( conference_id, { - :talk => talk, :listen => listen, :dtmf_pass_through => dtmf_pass_through, + talk: talk, listen: listen, dtmf_pass_through: dtmf_pass_through } ) result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1" @@ -2143,17 +1965,15 @@ # @option opts [String] :conference_id Show only Recordings made during the conference with this ID. # @option opts [String] :date_created Only show Recordings created on this date, formatted as *YYYY-MM-DD*. # @return [RecordingList] - describe 'list_recordings_get_next_page test' do - it 'should work' do - + describe "list_recordings_get_next_page test" do + it "should work" do call_id = @call_id_list_recordings_test_value conference_id = @conference_id_list_recordings_test_value date_created = @date_created_list_recordings_test_value - + result = @api_instance.list_recordings( - { - :call_id => call_id, :conference_id => conference_id, :date_created => date_created, + call_id: call_id, conference_id: conference_id, date_created: date_created } ) result.next_page_uri = "/Accounts/{accountId}/Recordings?cursor=1" @@ -2175,9 +1995,8 @@ # @option opts [String] :brand_id Only show messages associated with this brand ID # @option opts [Boolean] :is10_dlc Only show messages that were sent as part of a 10DLC campaign. # @return [MessagesList] - describe 'list_sms_messages_get_next_page test' do - it 'should work' do - + describe "list_sms_messages_get_next_page test" do + it "should work" do to = @to_list_sms_messages_test_value from = @from_list_sms_messages_test_value begin_time = @begin_time_list_sms_messages_test_value @@ -2186,11 +2005,10 @@ campaign_id = @campaign_id_list_sms_messages_test_value brand_id = @brand_id_list_sms_messages_test_value is10_dlc = @is10_dlc_list_sms_messages_test_value - + result = @api_instance.list_sms_messages( - { - :to => to, :from => from, :begin_time => begin_time, :end_time => end_time, :direction => direction, :campaign_id => campaign_id, :brand_id => brand_id, :is10_dlc => is10_dlc, + to: to, from: from, begin_time: begin_time, end_time: end_time, direction: direction, campaign_id: campaign_id, brand_id: brand_id, is10_dlc: is10_dlc } ) result.next_page_uri = "/Accounts/{accountId}/Messages?cursor=1" @@ -2199,6 +2017,4 @@ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - end - diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 5d2df2e9..37867f83 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -1,125 +1,123 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 5.4.0 +# + +require "spec_helper" describe Freeclimb::ApiClient do - context 'initialization' do - context 'URL stuff' do - context 'host' do - it 'removes http from host' do - Freeclimb.configure { |c| c.host = 'http://example.com' } - expect(Freeclimb::Configuration.default.host).to eq('example.com') + context "initialization" do + context "URL stuff" do + context "host" do + it "removes http from host" do + Freeclimb.configure { |c| c.host = "http://example.com" } + expect(Freeclimb::Configuration.default.host).to eq("example.com") end - it 'removes https from host' do - Freeclimb.configure { |c| c.host = 'https://wookiee.com' } - expect(Freeclimb::ApiClient.default.config.host).to eq('wookiee.com') + it "removes https from host" do + Freeclimb.configure { |c| c.host = "https://wookiee.com" } + expect(Freeclimb::ApiClient.default.config.host).to eq("wookiee.com") end - it 'removes trailing path from host' do - Freeclimb.configure { |c| c.host = 'hobo.com/v4' } - expect(Freeclimb::Configuration.default.host).to eq('hobo.com') + it "removes trailing path from host" do + Freeclimb.configure { |c| c.host = "hobo.com/v4" } + expect(Freeclimb::Configuration.default.host).to eq("hobo.com") end end - context 'base_path' do + context "base_path" do it "prepends a slash to base_path" do - Freeclimb.configure { |c| c.base_path = 'v4/dog' } - expect(Freeclimb::Configuration.default.base_path).to eq('/v4/dog') + Freeclimb.configure { |c| c.base_path = "v4/dog" } + expect(Freeclimb::Configuration.default.base_path).to eq("/v4/dog") end it "doesn't prepend a slash if one is already there" do - Freeclimb.configure { |c| c.base_path = '/v4/dog' } - expect(Freeclimb::Configuration.default.base_path).to eq('/v4/dog') + Freeclimb.configure { |c| c.base_path = "/v4/dog" } + expect(Freeclimb::Configuration.default.base_path).to eq("/v4/dog") end it "ends up as a blank string if nil" do Freeclimb.configure { |c| c.base_path = nil } - expect(Freeclimb::Configuration.default.base_path).to eq('') + expect(Freeclimb::Configuration.default.base_path).to eq("") end end end end - describe 'params_encoding in #build_request' do + describe "params_encoding in #build_request" do let(:config) { Freeclimb::Configuration.new } let(:api_client) { Freeclimb::ApiClient.new(config) } - it 'defaults to nil' do + it "defaults to nil" do expect(Freeclimb::Configuration.default.params_encoding).to eq(nil) expect(config.params_encoding).to eq(nil) - request = api_client.build_request(:get, '/test') + request = api_client.build_request(:get, "/test") expect(request.options[:params_encoding]).to eq(nil) end - it 'can be customized' do + it "can be customized" do config.params_encoding = :multi - request = api_client.build_request(:get, '/test') + request = api_client.build_request(:get, "/test") expect(request.options[:params_encoding]).to eq(:multi) end end - describe 'timeout in #build_request' do + describe "timeout in #build_request" do let(:config) { Freeclimb::Configuration.new } let(:api_client) { Freeclimb::ApiClient.new(config) } - it 'defaults to 0' do + it "defaults to 0" do expect(Freeclimb::Configuration.default.timeout).to eq(0) expect(config.timeout).to eq(0) - request = api_client.build_request(:get, '/test') + request = api_client.build_request(:get, "/test") expect(request.options[:timeout]).to eq(0) end - it 'can be customized' do + it "can be customized" do config.timeout = 100 - request = api_client.build_request(:get, '/test') + request = api_client.build_request(:get, "/test") expect(request.options[:timeout]).to eq(100) end end - describe '#deserialize' do + describe "#deserialize" do it "handles Array" do api_client = Freeclimb::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[12, 34]') - data = api_client.deserialize(response, 'Array') + headers = {"Content-Type" => "application/json"} + response = double("response", headers: headers, body: "[12, 34]") + data = api_client.deserialize(response, "Array") expect(data).to be_instance_of(Array) expect(data).to eq([12, 34]) end - it 'handles Array>' do + it "handles Array>" do api_client = Freeclimb::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[[12, 34], [56]]') - data = api_client.deserialize(response, 'Array>') + headers = {"Content-Type" => "application/json"} + response = double("response", headers: headers, body: "[[12, 34], [56]]") + data = api_client.deserialize(response, "Array>") expect(data).to be_instance_of(Array) expect(data).to eq([[12, 34], [56]]) end - it 'handles Hash' do + it "handles Hash" do api_client = Freeclimb::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '{"message": "Hello"}') - data = api_client.deserialize(response, 'Hash') + headers = {"Content-Type" => "application/json"} + response = double("response", headers: headers, body: '{"message": "Hello"}') + data = api_client.deserialize(response, "Hash") expect(data).to be_instance_of(Hash) - expect(data).to eq(:message => 'Hello') + expect(data).to eq(message: "Hello") end end describe "#object_to_hash" do - it 'ignores nils and includes empty arrays' do + it "ignores nils and includes empty arrays" do # uncomment below to test object_to_hash for model # api_client = Freeclimb::ApiClient.new # _model = Freeclimb::ModelName.new @@ -131,96 +129,96 @@ end end - describe '#build_collection_param' do - let(:param) { ['aa', 'bb', 'cc'] } + describe "#build_collection_param" do + let(:param) { ["aa", "bb", "cc"] } let(:api_client) { Freeclimb::ApiClient.new } - it 'works for csv' do - expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') + it "works for csv" do + expect(api_client.build_collection_param(param, :csv)).to eq("aa,bb,cc") end - it 'works for ssv' do - expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc') + it "works for ssv" do + expect(api_client.build_collection_param(param, :ssv)).to eq("aa bb cc") end - it 'works for tsv' do + it "works for tsv" do expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc") end - it 'works for pipes' do - expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc') + it "works for pipes" do + expect(api_client.build_collection_param(param, :pipes)).to eq("aa|bb|cc") end - it 'works for multi' do - expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc']) + it "works for multi" do + expect(api_client.build_collection_param(param, :multi)).to eq(["aa", "bb", "cc"]) end - it 'fails for invalid collection format' do - expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID') + it "fails for invalid collection format" do + expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, "unknown collection format: :INVALID") end end - describe '#json_mime?' do + describe "#json_mime?" do let(:api_client) { Freeclimb::ApiClient.new } - it 'works' do + it "works" do expect(api_client.json_mime?(nil)).to eq false - expect(api_client.json_mime?('')).to eq false + expect(api_client.json_mime?("")).to eq false - expect(api_client.json_mime?('application/json')).to eq true - expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true - expect(api_client.json_mime?('APPLICATION/JSON')).to eq true + expect(api_client.json_mime?("application/json")).to eq true + expect(api_client.json_mime?("application/json; charset=UTF8")).to eq true + expect(api_client.json_mime?("APPLICATION/JSON")).to eq true - expect(api_client.json_mime?('application/xml')).to eq false - expect(api_client.json_mime?('text/plain')).to eq false - expect(api_client.json_mime?('application/jsonp')).to eq false + expect(api_client.json_mime?("application/xml")).to eq false + expect(api_client.json_mime?("text/plain")).to eq false + expect(api_client.json_mime?("application/jsonp")).to eq false end end - describe '#select_header_accept' do + describe "#select_header_accept" do let(:api_client) { Freeclimb::ApiClient.new } - it 'works' do + it "works" do expect(api_client.select_header_accept(nil)).to be_nil expect(api_client.select_header_accept([])).to be_nil - expect(api_client.select_header_accept(['application/json'])).to eq('application/json') - expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') + expect(api_client.select_header_accept(["application/json"])).to eq("application/json") + expect(api_client.select_header_accept(["application/xml", "application/json; charset=UTF8"])).to eq("application/json; charset=UTF8") + expect(api_client.select_header_accept(["APPLICATION/JSON", "text/html"])).to eq("APPLICATION/JSON") - expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml') + expect(api_client.select_header_accept(["application/xml"])).to eq("application/xml") + expect(api_client.select_header_accept(["text/html", "application/xml"])).to eq("text/html,application/xml") end end - describe '#select_header_content_type' do + describe "#select_header_content_type" do let(:api_client) { Freeclimb::ApiClient.new } - it 'works' do + it "works" do expect(api_client.select_header_content_type(nil)).to be_nil expect(api_client.select_header_content_type([])).to be_nil - expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') - expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain') + expect(api_client.select_header_content_type(["application/json"])).to eq("application/json") + expect(api_client.select_header_content_type(["application/xml", "application/json; charset=UTF8"])).to eq("application/json; charset=UTF8") + expect(api_client.select_header_content_type(["APPLICATION/JSON", "text/html"])).to eq("APPLICATION/JSON") + expect(api_client.select_header_content_type(["application/xml"])).to eq("application/xml") + expect(api_client.select_header_content_type(["text/plain", "application/xml"])).to eq("text/plain") end end - describe '#sanitize_filename' do + describe "#sanitize_filename" do let(:api_client) { Freeclimb::ApiClient.new } - it 'works' do - expect(api_client.sanitize_filename('sun')).to eq('sun') - expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif') + it "works" do + expect(api_client.sanitize_filename("sun")).to eq("sun") + expect(api_client.sanitize_filename("sun.gif")).to eq("sun.gif") + expect(api_client.sanitize_filename("../sun.gif")).to eq("sun.gif") + expect(api_client.sanitize_filename("/var/tmp/sun.gif")).to eq("sun.gif") + expect(api_client.sanitize_filename("./sun.gif")).to eq("sun.gif") + expect(api_client.sanitize_filename('..\sun.gif')).to eq("sun.gif") + expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq("sun.gif") + expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq("sun.gif") + expect(api_client.sanitize_filename('.\sun.gif')).to eq("sun.gif") end end end diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index faafa1b7..1e4e01f1 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -1,23 +1,21 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 5.4.0 +# + +require "spec_helper" describe Freeclimb::Configuration do let(:config) { Freeclimb::Configuration.default } before(:each) do # uncomment below to setup host and base_path - require 'uri' + require "uri" uri = URI.parse("https://www.freeclimb.com/apiserver") Freeclimb.configure do |c| c.scheme = uri.scheme @@ -26,14 +24,14 @@ end end - describe '#base_url' do - it 'should have the default value' do + describe "#base_url" do + it "should have the default value" do # uncomment below to test default value of the base path expect(config.base_url).to eq("https://www.freeclimb.com/apiserver") end - it 'should remove trailing slashes' do - [nil, '', '/', '//'].each do |base_path| + it "should remove trailing slashes" do + [nil, "", "/", "//"].each do |base_path| config.base_path = base_path # uncomment below to test trailing slashes expect(config.base_url).to eq("https://www.freeclimb.com") diff --git a/spec/models/account_request_spec.rb b/spec/models/account_request_spec.rb index 52c475fc..e6cde18d 100644 --- a/spec/models/account_request_spec.rb +++ b/spec/models/account_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AccountRequest @@ -21,211 +19,129 @@ describe Freeclimb::AccountRequest do let(:instance) { Freeclimb::AccountRequest.new } - describe 'test an instance of AccountRequest' do - it 'should create an instance of AccountRequest' do + describe "test an instance of AccountRequest" do + it "should create an instance of AccountRequest" do expect(instance).to be_instance_of(Freeclimb::AccountRequest) end end - + describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "label"' do - it 'should work' do - + it "should work" do instance.label = "TEST_STRING" - expect(instance.label).to eq("TEST_STRING") - - - + expect(instance.label).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::AccountRequest.new( + _alias: "TS", + + label: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AccountRequest' do - expect { instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::AccountRequest" do + expect { + Freeclimb::AccountRequest.new( + _alias: "TS", + + label: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AccountRequest.new( + _alias: "TS", + + label: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - + _alias: "TS", + + label: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::AccountRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::AccountRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - + it "checks if objects are equal" do instance_1 = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - + _alias: "TS", + + label: "TS" ) instance_2 = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - + _alias: "TS", + + label: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - + _alias: "TS", + + label: "TS" ) instance_2 = Freeclimb::AccountRequest.new( - - _alias: "ST", - - - - - label: "ST", - - - + _alias: "ST", + + label: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - - ) + _alias: "TS", + + label: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) instance_2 = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -234,89 +150,49 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - - label: "TS", - - - + _alias: "TS", + + label: "TS" ) - it 'deserializes the data of _alias' do + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of label' do + + it "deserializes the data of label" do expect(instance._deserialize("String", instance.label)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) instance_2 = Freeclimb::AccountRequest.new( - _alias: "TS", - - - - - label: "TS", - - - + + label: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -324,20 +200,15 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AccountRequest.new( - - _alias: "TS", - - - - label: "TS", - - ) - it 'returns _alias in the form of hash' do + _alias: "TS", + + label: "TS" + ) + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns label in the form of hash' do + it "returns label in the form of hash" do expect(instance._to_hash(instance.label)).to eq(instance.label) end end - end diff --git a/spec/models/account_result_spec.rb b/spec/models/account_result_spec.rb index caa10b46..7ed1b81d 100644 --- a/spec/models/account_result_spec.rb +++ b/spec/models/account_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AccountResult @@ -21,814 +19,409 @@ describe Freeclimb::AccountResult do let(:instance) { Freeclimb::AccountResult.new } - describe 'test an instance of AccountResult' do - it 'should create an instance of AccountResult' do + describe "test an instance of AccountResult" do + it "should create an instance of AccountResult" do expect(instance).to be_instance_of(Freeclimb::AccountResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "api_key"' do - it 'should work' do - + it "should work" do instance.api_key = "TEST_STRING" - expect(instance.api_key).to eq("TEST_STRING") - - - + expect(instance.api_key).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "label"' do - it 'should work' do - + it "should work" do instance.label = "TEST_STRING" - expect(instance.label).to eq("TEST_STRING") - - - + expect(instance.label).to eq("TEST_STRING") end end - describe 'test attribute "type"' do - it 'assigns value TRIAL' do + it "assigns value TRIAL" do instance.type = Freeclimb::AccountType::TRIAL - expect(instance.type).to eq(Freeclimb::AccountType::TRIAL) + expect(instance.type).to eq(Freeclimb::AccountType::TRIAL) end - it 'assigns value FULL' do + it "assigns value FULL" do instance.type = Freeclimb::AccountType::FULL - expect(instance.type).to eq(Freeclimb::AccountType::FULL) + expect(instance.type).to eq(Freeclimb::AccountType::FULL) end end describe 'test attribute "status"' do - it 'assigns value CLOSED' do + it "assigns value CLOSED" do instance.status = Freeclimb::AccountStatus::CLOSED - expect(instance.status).to eq(Freeclimb::AccountStatus::CLOSED) + expect(instance.status).to eq(Freeclimb::AccountStatus::CLOSED) end - it 'assigns value SUSPENDED' do + it "assigns value SUSPENDED" do instance.status = Freeclimb::AccountStatus::SUSPENDED - expect(instance.status).to eq(Freeclimb::AccountStatus::SUSPENDED) + expect(instance.status).to eq(Freeclimb::AccountStatus::SUSPENDED) end - it 'assigns value ACTIVE' do + it "assigns value ACTIVE" do instance.status = Freeclimb::AccountStatus::ACTIVE - expect(instance.status).to eq(Freeclimb::AccountStatus::ACTIVE) + expect(instance.status).to eq(Freeclimb::AccountStatus::ACTIVE) end end describe 'test attribute "subresource_uris"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.subresource_uris = testObject expect(instance.subresource_uris).to eq(testObject) - - + instance.subresource_uris = Object.new expect(instance.subresource_uris).to be_instance_of(Object) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AccountResult' do - expect { instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AccountResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::AccountResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - - ) - expect(instance.valid?).to eq(true) - end + status: Freeclimb::AccountStatus::CLOSED, - skip 'checks if properties are invalid' do - instance = Freeclimb::AccountResult.new( - - ) - expect(instance.valid?).to eq(false) + subresource_uris: Object.new + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - obj_Object = Object.new() - - instance_1 = Freeclimb::AccountResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::AccountResult" do + expect { + Freeclimb::AccountResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - subresource_uris: obj_Object, - - - ) - instance_2 = Freeclimb::AccountResult.new( - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AccountResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - subresource_uris: obj_Object, - - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AccountResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AccountResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Object = Object.new + + instance_1 = Freeclimb::AccountResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: obj_Object + ) + instance_2 = Freeclimb::AccountResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: obj_Object ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - subresource_uris: Object.new(), - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: Object.new, + + subresource_uris: Object.new ) instance_2 = Freeclimb::AccountResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - account_id: "ST", - - - - - api_key: "ST", - - - - - _alias: "ST", - - - - - label: "ST", - - - - - - - type: nil, - - - - - status: nil, - - - - subresource_uris: Object.new(), - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + account_id: "ST", + + api_key: "ST", + + _alias: "ST", + + label: "ST", + + type: nil, + + status: nil, + + subresource_uris: Object.new ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: Object.new + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) instance_2 = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -837,360 +430,169 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - api_key: "TS", - - - - - _alias: "TS", - - - - - label: "TS", - - - - - type: Freeclimb::AccountType::TRIAL, - - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED, + + subresource_uris: Object.new ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of api_key' do + + it "deserializes the data of api_key" do expect(instance._deserialize("String", instance.api_key)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of label' do + + it "deserializes the data of label" do expect(instance._deserialize("String", instance.label)).to be_a_kind_of(String) end - - - - - - - - - it 'deserializes the data of subresource_uris' do + + it "deserializes the data of subresource_uris" do expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - obj = Object.new() - + it "creates equal hash for two equal objects" do + obj = Object.new + instance_1 = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) instance_2 = Freeclimb::AccountResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + api_key: "TS", - - - - + _alias: "TS", - - - - + label: "TS", - - - - + type: Freeclimb::AccountType::TRIAL, - - - - + status: Freeclimb::AccountStatus::CLOSED, - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1198,80 +600,58 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AccountResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - account_id: "TS", - - - - api_key: "TS", - - - - _alias: "TS", - - - - label: "TS", - - - - type: Freeclimb::AccountType::TRIAL, - - - - status: Freeclimb::AccountStatus::CLOSED, - - - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + api_key: "TS", + + _alias: "TS", + + label: "TS", + + type: Freeclimb::AccountType::TRIAL, + + status: Freeclimb::AccountStatus::CLOSED + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns api_key in the form of hash' do + it "returns api_key in the form of hash" do expect(instance._to_hash(instance.api_key)).to eq(instance.api_key) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns label in the form of hash' do + it "returns label in the form of hash" do expect(instance._to_hash(instance.label)).to eq(instance.label) end - it 'returns type in the form of hash' do + it "returns type in the form of hash" do expect(instance._to_hash(instance.type)).to eq(instance.type) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns subresource_uris in the form of hash' do + it "returns subresource_uris in the form of hash" do expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris) end end - end diff --git a/spec/models/account_status_spec.rb b/spec/models/account_status_spec.rb index bb40df55..d7a2f70f 100644 --- a/spec/models/account_status_spec.rb +++ b/spec/models/account_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AccountStatus @@ -21,22 +19,22 @@ describe Freeclimb::AccountStatus do let(:instance) { Freeclimb::AccountStatus.new } - describe 'test an instance of AccountStatus' do - it 'should create an instance of AccountStatus' do + describe "test an instance of AccountStatus" do + it "should create an instance of AccountStatus" do expect(instance).to be_instance_of(Freeclimb::AccountStatus) end end - + describe 'test attribute "CLOSED"' do - it 'should work' do + it "should work" do expect { Freeclimb::AccountStatus::CLOSED = "closed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AccountStatus::CLOSED - calculatedValue = Freeclimb::AccountStatus::build_from_hash("closed") + calculatedValue = Freeclimb::AccountStatus.build_from_hash("closed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "closed" calculatedValue = Freeclimb::AccountStatus::CLOSED expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "SUSPENDED"' do - it 'should work' do + it "should work" do expect { Freeclimb::AccountStatus::SUSPENDED = "suspended" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AccountStatus::SUSPENDED - calculatedValue = Freeclimb::AccountStatus::build_from_hash("suspended") + calculatedValue = Freeclimb::AccountStatus.build_from_hash("suspended") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "suspended" calculatedValue = Freeclimb::AccountStatus::SUSPENDED expect(expectedValue).to eq(calculatedValue) @@ -60,19 +58,18 @@ end describe 'test attribute "ACTIVE"' do - it 'should work' do + it "should work" do expect { Freeclimb::AccountStatus::ACTIVE = "active" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AccountStatus::ACTIVE - calculatedValue = Freeclimb::AccountStatus::build_from_hash("active") + calculatedValue = Freeclimb::AccountStatus.build_from_hash("active") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "active" calculatedValue = Freeclimb::AccountStatus::ACTIVE expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/account_type_spec.rb b/spec/models/account_type_spec.rb index 722a06d2..5abca925 100644 --- a/spec/models/account_type_spec.rb +++ b/spec/models/account_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AccountType @@ -21,22 +19,22 @@ describe Freeclimb::AccountType do let(:instance) { Freeclimb::AccountType.new } - describe 'test an instance of AccountType' do - it 'should create an instance of AccountType' do + describe "test an instance of AccountType" do + it "should create an instance of AccountType" do expect(instance).to be_instance_of(Freeclimb::AccountType) end end - + describe 'test attribute "TRIAL"' do - it 'should work' do + it "should work" do expect { Freeclimb::AccountType::TRIAL = "trial" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AccountType::TRIAL - calculatedValue = Freeclimb::AccountType::build_from_hash("trial") + calculatedValue = Freeclimb::AccountType.build_from_hash("trial") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "trial" calculatedValue = Freeclimb::AccountType::TRIAL expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "FULL"' do - it 'should work' do + it "should work" do expect { Freeclimb::AccountType::FULL = "full" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AccountType::FULL - calculatedValue = Freeclimb::AccountType::build_from_hash("full") + calculatedValue = Freeclimb::AccountType.build_from_hash("full") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "full" calculatedValue = Freeclimb::AccountType::FULL expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/add_to_conference_notification_webhook_spec.rb b/spec/models/add_to_conference_notification_webhook_spec.rb index 49422bbc..2ef1af8c 100644 --- a/spec/models/add_to_conference_notification_webhook_spec.rb +++ b/spec/models/add_to_conference_notification_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AddToConferenceNotificationWebhook @@ -21,980 +19,500 @@ describe Freeclimb::AddToConferenceNotificationWebhook do let(:instance) { Freeclimb::AddToConferenceNotificationWebhook.new } - describe 'test an instance of AddToConferenceNotificationWebhook' do - it 'should create an instance of AddToConferenceNotificationWebhook' do + describe "test an instance of AddToConferenceNotificationWebhook" do + it "should create an instance of AddToConferenceNotificationWebhook" do expect(instance).to be_instance_of(Freeclimb::AddToConferenceNotificationWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of AddToConferenceNotificationWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of AddToConferenceNotificationWebhook" do payload = '{ "requestType": "addToConferenceNotification" }' expect(Freeclimb::AddToConferenceNotificationWebhook.deserialize(payload)).to be_instance_of(Freeclimb::AddToConferenceNotificationWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::ConferenceStatus::EMPTY - expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) end - it 'assigns value POPULATED' do + it "assigns value POPULATED" do instance.status = Freeclimb::ConferenceStatus::POPULATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS - expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::ConferenceStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_sec"' do - it 'should work' do - - + it "should work" do instance.recording_duration_sec = 1 expect(instance.recording_duration_sec).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AddToConferenceNotificationWebhook' do - expect { instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AddToConferenceNotificationWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::AddToConferenceNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + recording_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - ) - expect(instance.valid?).to eq(false) + recording_duration_sec: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::AddToConferenceNotificationWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::AddToConferenceNotificationWebhook" do + expect { + Freeclimb::AddToConferenceNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - + recording_duration_sec: 1, - - - - ) - instance_2 = Freeclimb::AddToConferenceNotificationWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AddToConferenceNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - - + recording_duration_sec: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AddToConferenceNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AddToConferenceNotificationWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::AddToConferenceNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + instance_2 = Freeclimb::AddToConferenceNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 2, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 2 ) instance_2 = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - status: nil, - - - recording_url: "ST", - - - - - recording_id: "ST", - - - - recording_duration_sec: 1, - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + status: nil, + + recording_url: "ST", + + recording_id: "ST", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -1003,416 +521,191 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_sec' do + + it "deserializes the data of recording_duration_sec" do expect(instance._deserialize("Integer", instance.recording_duration_sec)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::AddToConferenceNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1420,96 +713,70 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AddToConferenceNotificationWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - recording_url: "TS", - - - - recording_id: "TS", - - - recording_duration_sec: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_duration_sec in the form of hash' do + it "returns recording_duration_sec in the form of hash" do expect(instance._to_hash(instance.recording_duration_sec)).to eq(instance.recording_duration_sec) end end - end diff --git a/spec/models/add_to_conference_spec.rb b/spec/models/add_to_conference_spec.rb index ce36a1f8..a7fc1b8b 100644 --- a/spec/models/add_to_conference_spec.rb +++ b/spec/models/add_to_conference_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AddToConference @@ -21,687 +19,361 @@ describe Freeclimb::AddToConference do let(:instance) { Freeclimb::AddToConference.new } - describe 'test an instance of AddToConference' do - it 'should create an instance of AddToConference' do + describe "test an instance of AddToConference" do + it "should create an instance of AddToConference" do expect(instance).to be_instance_of(Freeclimb::AddToConference) end end - + describe 'test attribute "allow_call_control"' do - it 'should work' do + it "should work" do instance.allow_call_control = false - expect(instance.allow_call_control).to eq(false) - - - + expect(instance.allow_call_control).to eq(false) end end describe 'test attribute "call_control_sequence"' do - it 'should work' do - + it "should work" do instance.call_control_sequence = "TEST_STRING" - expect(instance.call_control_sequence).to eq("TEST_STRING") - - - + expect(instance.call_control_sequence).to eq("TEST_STRING") end end describe 'test attribute "call_control_url"' do - it 'should work' do - + it "should work" do instance.call_control_url = "TEST_STRING" - expect(instance.call_control_url).to eq("TEST_STRING") - - - + expect(instance.call_control_url).to eq("TEST_STRING") end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "leave_conference_url"' do - it 'should work' do - + it "should work" do instance.leave_conference_url = "TEST_STRING" - expect(instance.leave_conference_url).to eq("TEST_STRING") - - - + expect(instance.leave_conference_url).to eq("TEST_STRING") end end describe 'test attribute "listen"' do - it 'should work' do + it "should work" do instance.listen = false - expect(instance.listen).to eq(false) - - - + expect(instance.listen).to eq(false) end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test attribute "start_conf_on_enter"' do - it 'should work' do + it "should work" do instance.start_conf_on_enter = false - expect(instance.start_conf_on_enter).to eq(false) - - - + expect(instance.start_conf_on_enter).to eq(false) end end describe 'test attribute "talk"' do - it 'should work' do + it "should work" do instance.talk = false - expect(instance.talk).to eq(false) - - - + expect(instance.talk).to eq(false) end end describe 'test attribute "dtmf_pass_through"' do - it 'should work' do + it "should work" do instance.dtmf_pass_through = false - expect(instance.dtmf_pass_through).to eq(false) - - - + expect(instance.dtmf_pass_through).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AddToConference' do - expect { instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AddToConference.new( + it "properly initializes with values" do + expect { + Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - - ) - expect(instance.valid?).to eq(true) - end + talk: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::AddToConference.new( - - ) - expect(instance.valid?).to eq(false) + dtmf_pass_through: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::AddToConference.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::AddToConference" do + expect { + Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - + dtmf_pass_through: true, - - - - ) - instance_2 = Freeclimb::AddToConference.new( + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - + dtmf_pass_through: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AddToConference.new( + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AddToConference.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::AddToConference.new( + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true + ) + instance_2 = Freeclimb::AddToConference.new( + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true ) instance_2 = Freeclimb::AddToConference.new( - allow_call_control: false, - - - - - call_control_sequence: "ST", - - - - - call_control_url: "ST", - - - - - conference_id: "ST", - - - - - leave_conference_url: "ST", - - - - listen: false, - - - - - notification_url: "ST", - - - - start_conf_on_enter: false, - - - - talk: false, - - - - dtmf_pass_through: false, - - - + allow_call_control: false, + + call_control_sequence: "ST", + + call_control_url: "ST", + + conference_id: "ST", + + leave_conference_url: "ST", + + listen: false, + + notification_url: "ST", + + start_conf_on_enter: false, + + talk: false, + + dtmf_pass_through: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - - ) + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) instance_2 = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -710,312 +382,160 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - - call_control_sequence: "TS", - - - - - call_control_url: "TS", - - - - - conference_id: "TS", - - - - - leave_conference_url: "TS", - - - - listen: true, - - - - - notification_url: "TS", - - - - start_conf_on_enter: true, - - - - talk: true, - - - - dtmf_pass_through: true, - - - + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true ) - - - it 'deserializes the data of allow_call_control' do + + it "deserializes the data of allow_call_control" do expect(instance._deserialize("Boolean", instance.allow_call_control)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of call_control_sequence' do + it "deserializes the data of call_control_sequence" do expect(instance._deserialize("String", instance.call_control_sequence)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_control_url' do + + it "deserializes the data of call_control_url" do expect(instance._deserialize("String", instance.call_control_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of leave_conference_url' do + + it "deserializes the data of leave_conference_url" do expect(instance._deserialize("String", instance.leave_conference_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of listen' do + + it "deserializes the data of listen" do expect(instance._deserialize("Boolean", instance.listen)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of notification_url' do + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of start_conf_on_enter' do + + it "deserializes the data of start_conf_on_enter" do expect(instance._deserialize("Boolean", instance.start_conf_on_enter)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of talk' do + + it "deserializes the data of talk" do expect(instance._deserialize("Boolean", instance.talk)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of dtmf_pass_through' do + + it "deserializes the data of dtmf_pass_through" do expect(instance._deserialize("Boolean", instance.dtmf_pass_through)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) instance_2 = Freeclimb::AddToConference.new( allow_call_control: true, - - - - + call_control_sequence: "TS", - - - - + call_control_url: "TS", - - - - + conference_id: "TS", - - - - + leave_conference_url: "TS", - - - + listen: true, - - - - + notification_url: "TS", - - - + start_conf_on_enter: true, - - - + talk: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1023,71 +543,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AddToConference.new( - allow_call_control: true, - - - - call_control_sequence: "TS", - - - - call_control_url: "TS", - - - - conference_id: "TS", - - - - leave_conference_url: "TS", - - - listen: true, - - - - notification_url: "TS", - - - start_conf_on_enter: true, - - - talk: true, - - - dtmf_pass_through: true, - - ) - it 'returns allow_call_control in the form of hash' do + allow_call_control: true, + + call_control_sequence: "TS", + + call_control_url: "TS", + + conference_id: "TS", + + leave_conference_url: "TS", + + listen: true, + + notification_url: "TS", + + start_conf_on_enter: true, + + talk: true, + + dtmf_pass_through: true + ) + it "returns allow_call_control in the form of hash" do expect(instance._to_hash(instance.allow_call_control)).to eq(instance.allow_call_control) end - it 'returns call_control_sequence in the form of hash' do + it "returns call_control_sequence in the form of hash" do expect(instance._to_hash(instance.call_control_sequence)).to eq(instance.call_control_sequence) end - it 'returns call_control_url in the form of hash' do + it "returns call_control_url in the form of hash" do expect(instance._to_hash(instance.call_control_url)).to eq(instance.call_control_url) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns leave_conference_url in the form of hash' do + it "returns leave_conference_url in the form of hash" do expect(instance._to_hash(instance.leave_conference_url)).to eq(instance.leave_conference_url) end - it 'returns listen in the form of hash' do + it "returns listen in the form of hash" do expect(instance._to_hash(instance.listen)).to eq(instance.listen) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end - it 'returns start_conf_on_enter in the form of hash' do + it "returns start_conf_on_enter in the form of hash" do expect(instance._to_hash(instance.start_conf_on_enter)).to eq(instance.start_conf_on_enter) end - it 'returns talk in the form of hash' do + it "returns talk in the form of hash" do expect(instance._to_hash(instance.talk)).to eq(instance.talk) end - it 'returns dtmf_pass_through in the form of hash' do + it "returns dtmf_pass_through in the form of hash" do expect(instance._to_hash(instance.dtmf_pass_through)).to eq(instance.dtmf_pass_through) end end - end diff --git a/spec/models/add_to_queue_notification_webhook_spec.rb b/spec/models/add_to_queue_notification_webhook_spec.rb index c449223e..a4fea432 100644 --- a/spec/models/add_to_queue_notification_webhook_spec.rb +++ b/spec/models/add_to_queue_notification_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AddToQueueNotificationWebhook @@ -21,714 +19,373 @@ describe Freeclimb::AddToQueueNotificationWebhook do let(:instance) { Freeclimb::AddToQueueNotificationWebhook.new } - describe 'test an instance of AddToQueueNotificationWebhook' do - it 'should create an instance of AddToQueueNotificationWebhook' do + describe "test an instance of AddToQueueNotificationWebhook" do + it "should create an instance of AddToQueueNotificationWebhook" do expect(instance).to be_instance_of(Freeclimb::AddToQueueNotificationWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of AddToQueueNotificationWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of AddToQueueNotificationWebhook" do payload = '{ "requestType": "addToQueueNotification" }' expect(Freeclimb::AddToQueueNotificationWebhook.deserialize(payload)).to be_instance_of(Freeclimb::AddToQueueNotificationWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AddToQueueNotificationWebhook' do - expect { instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AddToQueueNotificationWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::AddToQueueNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + conference_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::AddToQueueNotificationWebhook.new( - - ) - expect(instance.valid?).to eq(false) + queue_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::AddToQueueNotificationWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::AddToQueueNotificationWebhook" do + expect { + Freeclimb::AddToQueueNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - ) - instance_2 = Freeclimb::AddToQueueNotificationWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AddToQueueNotificationWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AddToQueueNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AddToQueueNotificationWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::AddToQueueNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + instance_2 = Freeclimb::AddToQueueNotificationWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) instance_2 = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -737,300 +394,139 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::AddToQueueNotificationWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1038,69 +534,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AddToQueueNotificationWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end end - end diff --git a/spec/models/answered_by_spec.rb b/spec/models/answered_by_spec.rb index ab4450e4..0eb5a312 100644 --- a/spec/models/answered_by_spec.rb +++ b/spec/models/answered_by_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AnsweredBy @@ -21,22 +19,22 @@ describe Freeclimb::AnsweredBy do let(:instance) { Freeclimb::AnsweredBy.new } - describe 'test an instance of AnsweredBy' do - it 'should create an instance of AnsweredBy' do + describe "test an instance of AnsweredBy" do + it "should create an instance of AnsweredBy" do expect(instance).to be_instance_of(Freeclimb::AnsweredBy) end end - + describe 'test attribute "HUMAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::AnsweredBy::HUMAN = "human" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AnsweredBy::HUMAN - calculatedValue = Freeclimb::AnsweredBy::build_from_hash("human") + calculatedValue = Freeclimb::AnsweredBy.build_from_hash("human") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "human" calculatedValue = Freeclimb::AnsweredBy::HUMAN expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "MACHINE"' do - it 'should work' do + it "should work" do expect { Freeclimb::AnsweredBy::MACHINE = "machine" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::AnsweredBy::MACHINE - calculatedValue = Freeclimb::AnsweredBy::build_from_hash("machine") + calculatedValue = Freeclimb::AnsweredBy.build_from_hash("machine") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "machine" calculatedValue = Freeclimb::AnsweredBy::MACHINE expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/application_list_spec.rb b/spec/models/application_list_spec.rb index a33b9dc2..aab757fc 100644 --- a/spec/models/application_list_spec.rb +++ b/spec/models/application_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ApplicationList @@ -21,541 +19,303 @@ describe Freeclimb::ApplicationList do let(:instance) { Freeclimb::ApplicationList.new } - describe 'test an instance of ApplicationList' do - it 'should create an instance of ApplicationList' do + describe "test an instance of ApplicationList" do + it "should create an instance of ApplicationList" do expect(instance).to be_instance_of(Freeclimb::ApplicationList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "applications"' do - it 'should work' do - + it "should work" do instance.applications = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.applications).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.applications).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ApplicationList' do - expect { instance = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ApplicationList.new( + it "properly initializes with values" do + expect { + Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ApplicationList.new( - - ) - expect(instance.valid?).to eq(false) + applications: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::ApplicationList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::ApplicationList" do + expect { + Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + applications: [], - - ) - instance_2 = Freeclimb::ApplicationList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + applications: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ApplicationList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ApplicationList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ApplicationList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] + ) + instance_2 = Freeclimb::ApplicationList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ApplicationList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - applications: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + applications: [] ) instance_2 = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - applications: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + applications: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) instance_2 = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ApplicationList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - applications: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of applications' do + + it "deserializes the data of applications" do expect(instance._deserialize("Array", instance.applications)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) instance_2 = Freeclimb::ApplicationList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - applications: Array.new(), - - - + + applications: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ApplicationList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - applications: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + applications: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns applications in the form of hash' do + it "returns applications in the form of hash" do expect(instance._to_hash(instance.applications)).to eq(instance.applications) end end - end diff --git a/spec/models/application_request_spec.rb b/spec/models/application_request_spec.rb index 08e51964..bc738107 100644 --- a/spec/models/application_request_spec.rb +++ b/spec/models/application_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ApplicationRequest @@ -21,546 +19,274 @@ describe Freeclimb::ApplicationRequest do let(:instance) { Freeclimb::ApplicationRequest.new } - describe 'test an instance of ApplicationRequest' do - it 'should create an instance of ApplicationRequest' do + describe "test an instance of ApplicationRequest" do + it "should create an instance of ApplicationRequest" do expect(instance).to be_instance_of(Freeclimb::ApplicationRequest) end end - + describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "voice_url"' do - it 'should work' do - + it "should work" do instance.voice_url = "TEST_STRING" - expect(instance.voice_url).to eq("TEST_STRING") - - - + expect(instance.voice_url).to eq("TEST_STRING") end end describe 'test attribute "voice_fallback_url"' do - it 'should work' do - + it "should work" do instance.voice_fallback_url = "TEST_STRING" - expect(instance.voice_fallback_url).to eq("TEST_STRING") - - - + expect(instance.voice_fallback_url).to eq("TEST_STRING") end end describe 'test attribute "call_connect_url"' do - it 'should work' do - + it "should work" do instance.call_connect_url = "TEST_STRING" - expect(instance.call_connect_url).to eq("TEST_STRING") - - - + expect(instance.call_connect_url).to eq("TEST_STRING") end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test attribute "sms_url"' do - it 'should work' do - + it "should work" do instance.sms_url = "TEST_STRING" - expect(instance.sms_url).to eq("TEST_STRING") - - - + expect(instance.sms_url).to eq("TEST_STRING") end end describe 'test attribute "sms_fallback_url"' do - it 'should work' do - + it "should work" do instance.sms_fallback_url = "TEST_STRING" - expect(instance.sms_fallback_url).to eq("TEST_STRING") - - - + expect(instance.sms_fallback_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ApplicationRequest' do - expect { instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ApplicationRequest.new( - + it "properly initializes with values" do + expect { + Freeclimb::ApplicationRequest.new( _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + sms_url: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ApplicationRequest.new( - - ) - expect(instance.valid?).to eq(false) + sms_fallback_url: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - instance_1 = Freeclimb::ApplicationRequest.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ApplicationRequest" do + expect { + Freeclimb::ApplicationRequest.new( _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - + sms_fallback_url: "TS", - - - - ) - instance_2 = Freeclimb::ApplicationRequest.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ApplicationRequest.new( _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - + sms_fallback_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ApplicationRequest.new( + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ApplicationRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ApplicationRequest.new( + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + instance_2 = Freeclimb::ApplicationRequest.new( + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationRequest.new( - - _alias: "ST", - - - - - voice_url: "ST", - - - - - voice_fallback_url: "ST", - - - - - call_connect_url: "ST", - - - - - status_callback_url: "ST", - - - - - sms_url: "ST", - - - - - sms_fallback_url: "ST", - - - + _alias: "ST", + + voice_url: "ST", + + voice_fallback_url: "ST", + + call_connect_url: "ST", + + status_callback_url: "ST", + + sms_url: "ST", + + sms_fallback_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - ) + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -569,244 +295,119 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) - it 'deserializes the data of _alias' do + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of voice_url' do + + it "deserializes the data of voice_url" do expect(instance._deserialize("String", instance.voice_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of voice_fallback_url' do + + it "deserializes the data of voice_fallback_url" do expect(instance._deserialize("String", instance.voice_fallback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_connect_url' do + + it "deserializes the data of call_connect_url" do expect(instance._deserialize("String", instance.call_connect_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of status_callback_url' do + + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of sms_url' do + + it "deserializes the data of sms_url" do expect(instance._deserialize("String", instance.sms_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of sms_fallback_url' do + + it "deserializes the data of sms_fallback_url" do expect(instance._deserialize("String", instance.sms_fallback_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationRequest.new( - _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -814,55 +415,40 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ApplicationRequest.new( - - _alias: "TS", - - - - voice_url: "TS", - - - - voice_fallback_url: "TS", - - - - call_connect_url: "TS", - - - - status_callback_url: "TS", - - - - sms_url: "TS", - - - - sms_fallback_url: "TS", - - ) - it 'returns _alias in the form of hash' do + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns voice_url in the form of hash' do + it "returns voice_url in the form of hash" do expect(instance._to_hash(instance.voice_url)).to eq(instance.voice_url) end - it 'returns voice_fallback_url in the form of hash' do + it "returns voice_fallback_url in the form of hash" do expect(instance._to_hash(instance.voice_fallback_url)).to eq(instance.voice_fallback_url) end - it 'returns call_connect_url in the form of hash' do + it "returns call_connect_url in the form of hash" do expect(instance._to_hash(instance.call_connect_url)).to eq(instance.call_connect_url) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end - it 'returns sms_url in the form of hash' do + it "returns sms_url in the form of hash" do expect(instance._to_hash(instance.sms_url)).to eq(instance.sms_url) end - it 'returns sms_fallback_url in the form of hash' do + it "returns sms_fallback_url in the form of hash" do expect(instance._to_hash(instance.sms_fallback_url)).to eq(instance.sms_fallback_url) end end - end diff --git a/spec/models/application_result_spec.rb b/spec/models/application_result_spec.rb index d877a2b3..b107843a 100644 --- a/spec/models/application_result_spec.rb +++ b/spec/models/application_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ApplicationResult @@ -21,938 +19,448 @@ describe Freeclimb::ApplicationResult do let(:instance) { Freeclimb::ApplicationResult.new } - describe 'test an instance of ApplicationResult' do - it 'should create an instance of ApplicationResult' do + describe "test an instance of ApplicationResult" do + it "should create an instance of ApplicationResult" do expect(instance).to be_instance_of(Freeclimb::ApplicationResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "voice_url"' do - it 'should work' do - + it "should work" do instance.voice_url = "TEST_STRING" - expect(instance.voice_url).to eq("TEST_STRING") - - - + expect(instance.voice_url).to eq("TEST_STRING") end end describe 'test attribute "voice_fallback_url"' do - it 'should work' do - + it "should work" do instance.voice_fallback_url = "TEST_STRING" - expect(instance.voice_fallback_url).to eq("TEST_STRING") - - - + expect(instance.voice_fallback_url).to eq("TEST_STRING") end end describe 'test attribute "call_connect_url"' do - it 'should work' do - + it "should work" do instance.call_connect_url = "TEST_STRING" - expect(instance.call_connect_url).to eq("TEST_STRING") - - - + expect(instance.call_connect_url).to eq("TEST_STRING") end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test attribute "sms_url"' do - it 'should work' do - + it "should work" do instance.sms_url = "TEST_STRING" - expect(instance.sms_url).to eq("TEST_STRING") - - - + expect(instance.sms_url).to eq("TEST_STRING") end end describe 'test attribute "sms_fallback_url"' do - it 'should work' do - + it "should work" do instance.sms_fallback_url = "TEST_STRING" - expect(instance.sms_fallback_url).to eq("TEST_STRING") - - - + expect(instance.sms_fallback_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ApplicationResult' do - expect { instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ApplicationResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::ApplicationResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + sms_url: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ApplicationResult.new( - - ) - expect(instance.valid?).to eq(false) + sms_fallback_url: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::ApplicationResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ApplicationResult" do + expect { + Freeclimb::ApplicationResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - + sms_fallback_url: "TS", - - - - ) - instance_2 = Freeclimb::ApplicationResult.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ApplicationResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - + sms_fallback_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ApplicationResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ApplicationResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ApplicationResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + instance_2 = Freeclimb::ApplicationResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - account_id: "ST", - - - - - application_id: "ST", - - - - - _alias: "ST", - - - - - voice_url: "ST", - - - - - voice_fallback_url: "ST", - - - - - call_connect_url: "ST", - - - - - status_callback_url: "ST", - - - - - sms_url: "ST", - - - - - sms_fallback_url: "ST", - - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + account_id: "ST", + + application_id: "ST", + + _alias: "ST", + + voice_url: "ST", + + voice_fallback_url: "ST", + + call_connect_url: "ST", + + status_callback_url: "ST", + + sms_url: "ST", + + sms_fallback_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -961,425 +469,203 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - _alias: "TS", - - - - - voice_url: "TS", - - - - - voice_fallback_url: "TS", - - - - - call_connect_url: "TS", - - - - - status_callback_url: "TS", - - - - - sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of voice_url' do + + it "deserializes the data of voice_url" do expect(instance._deserialize("String", instance.voice_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of voice_fallback_url' do + + it "deserializes the data of voice_fallback_url" do expect(instance._deserialize("String", instance.voice_fallback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_connect_url' do + + it "deserializes the data of call_connect_url" do expect(instance._deserialize("String", instance.call_connect_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of status_callback_url' do + + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of sms_url' do + + it "deserializes the data of sms_url" do expect(instance._deserialize("String", instance.sms_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of sms_fallback_url' do + + it "deserializes the data of sms_fallback_url" do expect(instance._deserialize("String", instance.sms_fallback_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) instance_2 = Freeclimb::ApplicationResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + _alias: "TS", - - - - + voice_url: "TS", - - - - + voice_fallback_url: "TS", - - - - + call_connect_url: "TS", - - - - + status_callback_url: "TS", - - - - + sms_url: "TS", - - - - - sms_fallback_url: "TS", - - - + + sms_fallback_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1387,96 +673,70 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ApplicationResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - account_id: "TS", - - - - application_id: "TS", - - - - _alias: "TS", - - - - voice_url: "TS", - - - - voice_fallback_url: "TS", - - - - call_connect_url: "TS", - - - - status_callback_url: "TS", - - - - sms_url: "TS", - - - - sms_fallback_url: "TS", - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + application_id: "TS", + + _alias: "TS", + + voice_url: "TS", + + voice_fallback_url: "TS", + + call_connect_url: "TS", + + status_callback_url: "TS", + + sms_url: "TS", + + sms_fallback_url: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns voice_url in the form of hash' do + it "returns voice_url in the form of hash" do expect(instance._to_hash(instance.voice_url)).to eq(instance.voice_url) end - it 'returns voice_fallback_url in the form of hash' do + it "returns voice_fallback_url in the form of hash" do expect(instance._to_hash(instance.voice_fallback_url)).to eq(instance.voice_fallback_url) end - it 'returns call_connect_url in the form of hash' do + it "returns call_connect_url in the form of hash" do expect(instance._to_hash(instance.call_connect_url)).to eq(instance.call_connect_url) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end - it 'returns sms_url in the form of hash' do + it "returns sms_url in the form of hash" do expect(instance._to_hash(instance.sms_url)).to eq(instance.sms_url) end - it 'returns sms_fallback_url in the form of hash' do + it "returns sms_fallback_url in the form of hash" do expect(instance._to_hash(instance.sms_fallback_url)).to eq(instance.sms_fallback_url) end end - end diff --git a/spec/models/available_number_list_spec.rb b/spec/models/available_number_list_spec.rb index 0f94713a..cff82a4c 100644 --- a/spec/models/available_number_list_spec.rb +++ b/spec/models/available_number_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AvailableNumberList @@ -21,541 +19,303 @@ describe Freeclimb::AvailableNumberList do let(:instance) { Freeclimb::AvailableNumberList.new } - describe 'test an instance of AvailableNumberList' do - it 'should create an instance of AvailableNumberList' do + describe "test an instance of AvailableNumberList" do + it "should create an instance of AvailableNumberList" do expect(instance).to be_instance_of(Freeclimb::AvailableNumberList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "available_phone_numbers"' do - it 'should work' do - + it "should work" do instance.available_phone_numbers = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.available_phone_numbers).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.available_phone_numbers).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumberList' do - expect { instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AvailableNumberList.new( + it "properly initializes with values" do + expect { + Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::AvailableNumberList.new( - - ) - expect(instance.valid?).to eq(false) + available_phone_numbers: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::AvailableNumberList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumberList" do + expect { + Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + available_phone_numbers: [], - - ) - instance_2 = Freeclimb::AvailableNumberList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + available_phone_numbers: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AvailableNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AvailableNumberList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::AvailableNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] + ) + instance_2 = Freeclimb::AvailableNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AvailableNumberList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - available_phone_numbers: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + available_phone_numbers: [] ) instance_2 = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - available_phone_numbers: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + available_phone_numbers: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) instance_2 = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of available_phone_numbers' do + + it "deserializes the data of available_phone_numbers" do expect(instance._deserialize("Array", instance.available_phone_numbers)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) instance_2 = Freeclimb::AvailableNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - available_phone_numbers: Array.new(), - - - + + available_phone_numbers: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AvailableNumberList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - available_phone_numbers: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + available_phone_numbers: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns available_phone_numbers in the form of hash' do + it "returns available_phone_numbers in the form of hash" do expect(instance._to_hash(instance.available_phone_numbers)).to eq(instance.available_phone_numbers) end end - end diff --git a/spec/models/available_number_spec.rb b/spec/models/available_number_spec.rb index 70c42e4a..b5404bc2 100644 --- a/spec/models/available_number_spec.rb +++ b/spec/models/available_number_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::AvailableNumber @@ -21,524 +19,276 @@ describe Freeclimb::AvailableNumber do let(:instance) { Freeclimb::AvailableNumber.new } - describe 'test an instance of AvailableNumber' do - it 'should create an instance of AvailableNumber' do + describe "test an instance of AvailableNumber" do + it "should create an instance of AvailableNumber" do expect(instance).to be_instance_of(Freeclimb::AvailableNumber) end end - + describe 'test attribute "capabilities"' do - it 'should work' do - - - + it "should work" do instance.capabilities = Capabilities.new expect(instance.capabilities).to be_instance_of(Capabilities) - end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test attribute "phone_number"' do - it 'should work' do - + it "should work" do instance.phone_number = "TEST_STRING" - expect(instance.phone_number).to eq("TEST_STRING") - - - + expect(instance.phone_number).to eq("TEST_STRING") end end describe 'test attribute "voice_enabled"' do - it 'should work' do + it "should work" do instance.voice_enabled = false - expect(instance.voice_enabled).to eq(false) - - - + expect(instance.voice_enabled).to eq(false) end end describe 'test attribute "sms_enabled"' do - it 'should work' do + it "should work" do instance.sms_enabled = false - expect(instance.sms_enabled).to eq(false) - - - + expect(instance.sms_enabled).to eq(false) end end describe 'test attribute "region"' do - it 'should work' do - + it "should work" do instance.region = "TEST_STRING" - expect(instance.region).to eq("TEST_STRING") - - - + expect(instance.region).to eq("TEST_STRING") end end describe 'test attribute "country"' do - it 'should work' do - + it "should work" do instance.country = "TEST_STRING" - expect(instance.country).to eq("TEST_STRING") - - - + expect(instance.country).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumber' do - expect { instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new, - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new, - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - + it "properly initializes with values" do + expect { + Freeclimb::AvailableNumber.new( + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + region: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::AvailableNumber.new( - - ) - expect(instance.valid?).to eq(false) - end - - end + country: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumber" do + expect { + Freeclimb::AvailableNumber.new( + capabilities: Capabilities.new, - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - obj_Capabilities = Capabilities.new() - - - - - - - - instance_1 = Freeclimb::AvailableNumber.new( - - - capabilities: obj_Capabilities, - - - campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - + country: "TS", - - - - ) - instance_2 = Freeclimb::AvailableNumber.new( - - - capabilities: obj_Capabilities, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::AvailableNumber.new( + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - + country: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::AvailableNumber.new( + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::AvailableNumber.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Capabilities = Capabilities.new + + instance_1 = Freeclimb::AvailableNumber.new( + capabilities: obj_Capabilities, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" + ) + instance_2 = Freeclimb::AvailableNumber.new( + capabilities: obj_Capabilities, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::AvailableNumber.new( - - - capabilities: Capabilities.new(), - - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" ) instance_2 = Freeclimb::AvailableNumber.new( - - - capabilities: Capabilities.new(), - - - - campaign_id: "ST", - - - - - phone_number: "ST", - - - - voice_enabled: false, - - - - sms_enabled: false, - - - - - region: "ST", - - - - - country: "ST", - - - + capabilities: Capabilities.new, + + campaign_id: "ST", + + phone_number: "ST", + + voice_enabled: false, + + sms_enabled: false, + + region: "ST", + + country: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - - ) + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) instance_2 = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -547,237 +297,121 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AvailableNumber.new( - - - - capabilities: Capabilities.new(), - - - campaign_id: "TS", - - - - - phone_number: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - - region: "TS", - - - - - country: "TS", - - - + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" ) - - - it 'deserializes the data of capabilities' do + + it "deserializes the data of capabilities" do expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(Capabilities) end - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone_number' do + + it "deserializes the data of phone_number" do expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of voice_enabled' do + + it "deserializes the data of voice_enabled" do expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of sms_enabled' do + + it "deserializes the data of sms_enabled" do expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of region' do + it "deserializes the data of region" do expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String) end - - - it 'deserializes the data of country' do + + it "deserializes the data of country" do expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::AvailableNumber.new( - - - capabilities: Capabilities.new, - - + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::AvailableNumber.new( - - - capabilities: Capabilities.new, - - + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - obj = Capabilities.new() - - - - - - - + it "creates equal hash for two equal objects" do + obj = Capabilities.new + instance_1 = Freeclimb::AvailableNumber.new( - - - capabilities: obj, - - + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) instance_2 = Freeclimb::AvailableNumber.new( - - - capabilities: obj, - - + campaign_id: "TS", - - - - + phone_number: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - + region: "TS", - - - - - country: "TS", - - - + + country: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -785,51 +419,38 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AvailableNumber.new( - - - - campaign_id: "TS", - - - - phone_number: "TS", - - - voice_enabled: true, - - - sms_enabled: true, - - - - region: "TS", - - - - country: "TS", - - ) - it 'returns capabilities in the form of hash' do + campaign_id: "TS", + + phone_number: "TS", + + voice_enabled: true, + + sms_enabled: true, + + region: "TS", + + country: "TS" + ) + it "returns capabilities in the form of hash" do expect(instance._to_hash(instance.capabilities)).to eq(instance.capabilities) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns phone_number in the form of hash' do + it "returns phone_number in the form of hash" do expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number) end - it 'returns voice_enabled in the form of hash' do + it "returns voice_enabled in the form of hash" do expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled) end - it 'returns sms_enabled in the form of hash' do + it "returns sms_enabled in the form of hash" do expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled) end - it 'returns region in the form of hash' do + it "returns region in the form of hash" do expect(instance._to_hash(instance.region)).to eq(instance.region) end - it 'returns country in the form of hash' do + it "returns country in the form of hash" do expect(instance._to_hash(instance.country)).to eq(instance.country) end end - end diff --git a/spec/models/barge_in_reason_spec.rb b/spec/models/barge_in_reason_spec.rb index bce8a408..d448f052 100644 --- a/spec/models/barge_in_reason_spec.rb +++ b/spec/models/barge_in_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::BargeInReason @@ -21,22 +19,22 @@ describe Freeclimb::BargeInReason do let(:instance) { Freeclimb::BargeInReason.new } - describe 'test an instance of BargeInReason' do - it 'should create an instance of BargeInReason' do + describe "test an instance of BargeInReason" do + it "should create an instance of BargeInReason" do expect(instance).to be_instance_of(Freeclimb::BargeInReason) end end - + describe 'test attribute "NO_BARGE_IN"' do - it 'should work' do + it "should work" do expect { Freeclimb::BargeInReason::NO_BARGE_IN = "noBargeIn" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::BargeInReason::NO_BARGE_IN - calculatedValue = Freeclimb::BargeInReason::build_from_hash("noBargeIn") + calculatedValue = Freeclimb::BargeInReason.build_from_hash("noBargeIn") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noBargeIn" calculatedValue = Freeclimb::BargeInReason::NO_BARGE_IN expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "BARGE_IN_BY_DTMF"' do - it 'should work' do + it "should work" do expect { Freeclimb::BargeInReason::BARGE_IN_BY_DTMF = "bargeInByDTMF" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::BargeInReason::BARGE_IN_BY_DTMF - calculatedValue = Freeclimb::BargeInReason::build_from_hash("bargeInByDTMF") + calculatedValue = Freeclimb::BargeInReason.build_from_hash("bargeInByDTMF") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "bargeInByDTMF" calculatedValue = Freeclimb::BargeInReason::BARGE_IN_BY_DTMF expect(expectedValue).to eq(calculatedValue) @@ -60,19 +58,18 @@ end describe 'test attribute "BARGE_IN_BY_ENERGY"' do - it 'should work' do + it "should work" do expect { Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY = "bargeInByEnergy" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY - calculatedValue = Freeclimb::BargeInReason::build_from_hash("bargeInByEnergy") + calculatedValue = Freeclimb::BargeInReason.build_from_hash("bargeInByEnergy") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "bargeInByEnergy" calculatedValue = Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/buy_incoming_number_request_spec.rb b/spec/models/buy_incoming_number_request_spec.rb index d2b12b1a..493bc0e6 100644 --- a/spec/models/buy_incoming_number_request_spec.rb +++ b/spec/models/buy_incoming_number_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::BuyIncomingNumberRequest @@ -21,278 +19,158 @@ describe Freeclimb::BuyIncomingNumberRequest do let(:instance) { Freeclimb::BuyIncomingNumberRequest.new } - describe 'test an instance of BuyIncomingNumberRequest' do - it 'should create an instance of BuyIncomingNumberRequest' do + describe "test an instance of BuyIncomingNumberRequest" do + it "should create an instance of BuyIncomingNumberRequest" do expect(instance).to be_instance_of(Freeclimb::BuyIncomingNumberRequest) end end - + describe 'test attribute "phone_number"' do - it 'should work' do - + it "should work" do instance.phone_number = "TEST_STRING" - expect(instance.phone_number).to eq("TEST_STRING") - - - + expect(instance.phone_number).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::BuyIncomingNumberRequest.new( + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::BuyIncomingNumberRequest' do - expect { instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::BuyIncomingNumberRequest" do + expect { + Freeclimb::BuyIncomingNumberRequest.new( + phone_number: "TS", + + _alias: "TS", + + application_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::BuyIncomingNumberRequest.new( + phone_number: "TS", + + _alias: "TS", + + application_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::BuyIncomingNumberRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::BuyIncomingNumberRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" ) instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" ) instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "ST", - - - - - _alias: "ST", - - - - - application_id: "ST", - - - + phone_number: "ST", + + _alias: "ST", + + application_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - - ) + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -301,120 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - - _alias: "TS", - - - - - application_id: "TS", - - - + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" ) - it 'deserializes the data of phone_number' do + it "deserializes the data of phone_number" do expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - - - - + _alias: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -422,27 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::BuyIncomingNumberRequest.new( - - phone_number: "TS", - - - - _alias: "TS", - - - - application_id: "TS", - - ) - it 'returns phone_number in the form of hash' do + phone_number: "TS", + + _alias: "TS", + + application_id: "TS" + ) + it "returns phone_number in the form of hash" do expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end end - end diff --git a/spec/models/call_control_webhook_spec.rb b/spec/models/call_control_webhook_spec.rb index 3d906150..2ae1ed04 100644 --- a/spec/models/call_control_webhook_spec.rb +++ b/spec/models/call_control_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallControlWebhook @@ -21,418 +19,222 @@ describe Freeclimb::CallControlWebhook do let(:instance) { Freeclimb::CallControlWebhook.new } - describe 'test an instance of CallControlWebhook' do - it 'should create an instance of CallControlWebhook' do + describe "test an instance of CallControlWebhook" do + it "should create an instance of CallControlWebhook" do expect(instance).to be_instance_of(Freeclimb::CallControlWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of CallControlWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of CallControlWebhook" do payload = '{ "requestType": "callControl" }' expect(Freeclimb::CallControlWebhook.deserialize(payload)).to be_instance_of(Freeclimb::CallControlWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "digits"' do - it 'should work' do - + it "should work" do instance.digits = "TEST_STRING" - expect(instance.digits).to eq("TEST_STRING") - - - + expect(instance.digits).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CallControlWebhook' do - expect { instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::CallControlWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::CallControlWebhook" do + expect { + Freeclimb::CallControlWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CallControlWebhook.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CallControlWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + digits: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CallControlWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::CallControlWebhook.new - skip 'checks if properties are invalid' do - instance = Freeclimb::CallControlWebhook.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" ) instance_2 = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" ) instance_2 = Freeclimb::CallControlWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - conference_id: "ST", - - - - - digits: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + conference_id: "ST", + + digits: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) instance_2 = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -441,182 +243,91 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - digits: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of digits' do + + it "deserializes the data of digits" do expect(instance._deserialize("String", instance.digits)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) instance_2 = Freeclimb::CallControlWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - - digits: "TS", - - - + + digits: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -624,41 +335,30 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CallControlWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - conference_id: "TS", - - - - digits: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + conference_id: "TS", + + digits: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns digits in the form of hash' do + it "returns digits in the form of hash" do expect(instance._to_hash(instance.digits)).to eq(instance.digits) end end - end diff --git a/spec/models/call_direction_spec.rb b/spec/models/call_direction_spec.rb index 03f0dc70..cd922236 100644 --- a/spec/models/call_direction_spec.rb +++ b/spec/models/call_direction_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallDirection @@ -21,22 +19,22 @@ describe Freeclimb::CallDirection do let(:instance) { Freeclimb::CallDirection.new } - describe 'test an instance of CallDirection' do - it 'should create an instance of CallDirection' do + describe "test an instance of CallDirection" do + it "should create an instance of CallDirection" do expect(instance).to be_instance_of(Freeclimb::CallDirection) end end - + describe 'test attribute "INBOUND"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallDirection::INBOUND = "inbound" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallDirection::INBOUND - calculatedValue = Freeclimb::CallDirection::build_from_hash("inbound") + calculatedValue = Freeclimb::CallDirection.build_from_hash("inbound") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "inbound" calculatedValue = Freeclimb::CallDirection::INBOUND expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "OUTBOUND_API"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallDirection::OUTBOUND_API = "outboundAPI" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallDirection::OUTBOUND_API - calculatedValue = Freeclimb::CallDirection::build_from_hash("outboundAPI") + calculatedValue = Freeclimb::CallDirection.build_from_hash("outboundAPI") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outboundAPI" calculatedValue = Freeclimb::CallDirection::OUTBOUND_API expect(expectedValue).to eq(calculatedValue) @@ -60,19 +58,18 @@ end describe 'test attribute "OUTBOUND_DIAL"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallDirection::OUTBOUND_DIAL = "outboundDial" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallDirection::OUTBOUND_DIAL - calculatedValue = Freeclimb::CallDirection::build_from_hash("outboundDial") + calculatedValue = Freeclimb::CallDirection.build_from_hash("outboundDial") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outboundDial" calculatedValue = Freeclimb::CallDirection::OUTBOUND_DIAL expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/call_ended_reason_spec.rb b/spec/models/call_ended_reason_spec.rb index 03685847..ac080371 100644 --- a/spec/models/call_ended_reason_spec.rb +++ b/spec/models/call_ended_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallEndedReason @@ -21,22 +19,22 @@ describe Freeclimb::CallEndedReason do let(:instance) { Freeclimb::CallEndedReason.new } - describe 'test an instance of CallEndedReason' do - it 'should create an instance of CallEndedReason' do + describe "test an instance of CallEndedReason" do + it "should create an instance of CallEndedReason" do expect(instance).to be_instance_of(Freeclimb::CallEndedReason) end end - + describe 'test attribute "BUSY"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::BUSY = "busy" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::BUSY - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("busy") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("busy") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "busy" calculatedValue = Freeclimb::CallEndedReason::BUSY expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "FAILED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::FAILED = "failed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::FAILED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("failed") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("failed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "failed" calculatedValue = Freeclimb::CallEndedReason::FAILED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "NO_ANSWER"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::NO_ANSWER = "noAnswer" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::NO_ANSWER - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("noAnswer") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("noAnswer") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noAnswer" calculatedValue = Freeclimb::CallEndedReason::NO_ANSWER expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "CALL_CANCELED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::CALL_CANCELED = "callCanceled" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::CALL_CANCELED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("callCanceled") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("callCanceled") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "callCanceled" calculatedValue = Freeclimb::CallEndedReason::CALL_CANCELED expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "FAR_END_HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::FAR_END_HANGUP = "farEndHangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::FAR_END_HANGUP - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("farEndHangup") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("farEndHangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "farEndHangup" calculatedValue = Freeclimb::CallEndedReason::FAR_END_HANGUP expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "APP_HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::APP_HANGUP = "appHangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::APP_HANGUP - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("appHangup") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("appHangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "appHangup" calculatedValue = Freeclimb::CallEndedReason::APP_HANGUP expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "APP_REJECT"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::APP_REJECT = "appReject" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::APP_REJECT - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("appReject") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("appReject") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "appReject" calculatedValue = Freeclimb::CallEndedReason::APP_REJECT expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "APP_NO_PERCL"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::APP_NO_PERCL = "appNoPercl" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::APP_NO_PERCL - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("appNoPercl") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("appNoPercl") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "appNoPercl" calculatedValue = Freeclimb::CallEndedReason::APP_NO_PERCL expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "APP_INVALID_PERCL"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::APP_INVALID_PERCL = "appInvalidPercl" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::APP_INVALID_PERCL - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("appInvalidPercl") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("appInvalidPercl") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "appInvalidPercl" calculatedValue = Freeclimb::CallEndedReason::APP_INVALID_PERCL expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "CONFERENCE_TERMINATED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::CONFERENCE_TERMINATED = "conferenceTerminated" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::CONFERENCE_TERMINATED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("conferenceTerminated") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("conferenceTerminated") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "conferenceTerminated" calculatedValue = Freeclimb::CallEndedReason::CONFERENCE_TERMINATED expect(expectedValue).to eq(calculatedValue) @@ -188,15 +186,15 @@ end describe 'test attribute "CONFERENCE_EMPTIED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::CONFERENCE_EMPTIED = "conferenceEmptied" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::CONFERENCE_EMPTIED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("conferenceEmptied") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("conferenceEmptied") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "conferenceEmptied" calculatedValue = Freeclimb::CallEndedReason::CONFERENCE_EMPTIED expect(expectedValue).to eq(calculatedValue) @@ -204,15 +202,15 @@ end describe 'test attribute "REMOVED_FROM_CONFERENCE"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE = "removedFromConference" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("removedFromConference") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("removedFromConference") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "removedFromConference" calculatedValue = Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE expect(expectedValue).to eq(calculatedValue) @@ -220,15 +218,15 @@ end describe 'test attribute "MACHINE_DETECTED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::MACHINE_DETECTED = "machineDetected" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::MACHINE_DETECTED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("machineDetected") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("machineDetected") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "machineDetected" calculatedValue = Freeclimb::CallEndedReason::MACHINE_DETECTED expect(expectedValue).to eq(calculatedValue) @@ -236,15 +234,15 @@ end describe 'test attribute "WEBHOOK_FAILED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::WEBHOOK_FAILED = "webhookFailed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::WEBHOOK_FAILED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("webhookFailed") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("webhookFailed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "webhookFailed" calculatedValue = Freeclimb::CallEndedReason::WEBHOOK_FAILED expect(expectedValue).to eq(calculatedValue) @@ -252,15 +250,15 @@ end describe 'test attribute "WEBHOOK_INVALID_RESPONSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE = "webhookInvalidResponse" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("webhookInvalidResponse") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("webhookInvalidResponse") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "webhookInvalidResponse" calculatedValue = Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE expect(expectedValue).to eq(calculatedValue) @@ -268,15 +266,15 @@ end describe 'test attribute "VOICE_DISABLED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::VOICE_DISABLED = "voiceDisabled" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::VOICE_DISABLED - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("voiceDisabled") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("voiceDisabled") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "voiceDisabled" calculatedValue = Freeclimb::CallEndedReason::VOICE_DISABLED expect(expectedValue).to eq(calculatedValue) @@ -284,15 +282,15 @@ end describe 'test attribute "CONFIG_ERROR_NO_APPLICATION"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION = "configErrorNoApplication" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("configErrorNoApplication") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("configErrorNoApplication") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "configErrorNoApplication" calculatedValue = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION expect(expectedValue).to eq(calculatedValue) @@ -300,15 +298,15 @@ end describe 'test attribute "CONFIG_ERROR_NO_VOICE_URL"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL = "configErrorNoVoiceUrl" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("configErrorNoVoiceUrl") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("configErrorNoVoiceUrl") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "configErrorNoVoiceUrl" calculatedValue = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL expect(expectedValue).to eq(calculatedValue) @@ -316,15 +314,15 @@ end describe 'test attribute "MAX_REDIRECTS_ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR = "maxRedirectsError" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("maxRedirectsError") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("maxRedirectsError") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "maxRedirectsError" calculatedValue = Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR expect(expectedValue).to eq(calculatedValue) @@ -332,15 +330,15 @@ end describe 'test attribute "PERCL_PROCESSING_ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR = "perclProcessingError" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("perclProcessingError") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("perclProcessingError") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "perclProcessingError" calculatedValue = Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR expect(expectedValue).to eq(calculatedValue) @@ -348,15 +346,15 @@ end describe 'test attribute "INTERNAL_ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::INTERNAL_ERROR = "internalError" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::INTERNAL_ERROR - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("internalError") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("internalError") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "internalError" calculatedValue = Freeclimb::CallEndedReason::INTERNAL_ERROR expect(expectedValue).to eq(calculatedValue) @@ -364,15 +362,15 @@ end describe 'test attribute "GRPC_HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::GRPC_HANGUP = "grpcHangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::GRPC_HANGUP - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("grpcHangup") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("grpcHangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "grpcHangup" calculatedValue = Freeclimb::CallEndedReason::GRPC_HANGUP expect(expectedValue).to eq(calculatedValue) @@ -380,19 +378,18 @@ end describe 'test attribute "MAX_DURATION"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallEndedReason::MAX_DURATION = "maxDuration" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallEndedReason::MAX_DURATION - calculatedValue = Freeclimb::CallEndedReason::build_from_hash("maxDuration") + calculatedValue = Freeclimb::CallEndedReason.build_from_hash("maxDuration") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "maxDuration" calculatedValue = Freeclimb::CallEndedReason::MAX_DURATION expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/call_list_spec.rb b/spec/models/call_list_spec.rb index 841ce9b3..016a0d28 100644 --- a/spec/models/call_list_spec.rb +++ b/spec/models/call_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallList @@ -21,541 +19,303 @@ describe Freeclimb::CallList do let(:instance) { Freeclimb::CallList.new } - describe 'test an instance of CallList' do - it 'should create an instance of CallList' do + describe "test an instance of CallList" do + it "should create an instance of CallList" do expect(instance).to be_instance_of(Freeclimb::CallList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "calls"' do - it 'should work' do - + it "should work" do instance.calls = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.calls).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.calls).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CallList' do - expect { instance = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CallList.new( + it "properly initializes with values" do + expect { + Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::CallList.new( - - ) - expect(instance.valid?).to eq(false) + calls: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::CallList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::CallList" do + expect { + Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + calls: [], - - ) - instance_2 = Freeclimb::CallList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + calls: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CallList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CallList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::CallList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] + ) + instance_2 = Freeclimb::CallList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CallList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - calls: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + calls: [] ) instance_2 = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - calls: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + calls: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) instance_2 = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CallList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - calls: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of calls' do + + it "deserializes the data of calls" do expect(instance._deserialize("Array", instance.calls)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) instance_2 = Freeclimb::CallList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - calls: Array.new(), - - - + + calls: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CallList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - calls: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + calls: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns calls in the form of hash' do + it "returns calls in the form of hash" do expect(instance._to_hash(instance.calls)).to eq(instance.calls) end end - end diff --git a/spec/models/call_result_spec.rb b/spec/models/call_result_spec.rb index 3d723da4..c6ac7fb0 100644 --- a/spec/models/call_result_spec.rb +++ b/spec/models/call_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallResult @@ -21,2049 +19,990 @@ describe Freeclimb::CallResult do let(:instance) { Freeclimb::CallResult.new } - describe 'test an instance of CallResult' do - it 'should create an instance of CallResult' do + describe "test an instance of CallResult" do + it "should create an instance of CallResult" do expect(instance).to be_instance_of(Freeclimb::CallResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "phone_number_id"' do - it 'should work' do - + it "should work" do instance.phone_number_id = "TEST_STRING" - expect(instance.phone_number_id).to eq("TEST_STRING") - - - + expect(instance.phone_number_id).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "start_time"' do - it 'should work' do - + it "should work" do instance.start_time = "TEST_STRING" - expect(instance.start_time).to eq("TEST_STRING") - - - + expect(instance.start_time).to eq("TEST_STRING") end end describe 'test attribute "connect_time"' do - it 'should work' do - + it "should work" do instance.connect_time = "TEST_STRING" - expect(instance.connect_time).to eq("TEST_STRING") - - - + expect(instance.connect_time).to eq("TEST_STRING") end end describe 'test attribute "end_time"' do - it 'should work' do - + it "should work" do instance.end_time = "TEST_STRING" - expect(instance.end_time).to eq("TEST_STRING") - - - + expect(instance.end_time).to eq("TEST_STRING") end end describe 'test attribute "duration"' do - it 'should work' do - - + it "should work" do instance.duration = 1 expect(instance.duration).to eq(1) - - - end end describe 'test attribute "connect_duration"' do - it 'should work' do - - + it "should work" do instance.connect_duration = 1 expect(instance.connect_duration).to eq(1) - - - end end - describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "answered_by"' do - it 'assigns value HUMAN' do + it "assigns value HUMAN" do instance.answered_by = Freeclimb::AnsweredBy::HUMAN - expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::HUMAN) + expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::HUMAN) end - it 'assigns value MACHINE' do + it "assigns value MACHINE" do instance.answered_by = Freeclimb::AnsweredBy::MACHINE - expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::MACHINE) + expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::MACHINE) end end describe 'test attribute "subresource_uris"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.subresource_uris = testObject expect(instance.subresource_uris).to eq(testObject) - - + instance.subresource_uris = Object.new expect(instance.subresource_uris).to be_instance_of(Object) - end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CallResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - call_id: "TS", - - - - - parent_call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - phone_number_id: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - start_time: "TS", - - - - - connect_time: "TS", - - - - - end_time: "TS", - - - - duration: 1, - - - - connect_duration: 1, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CallResult' do - expect { instance = Freeclimb::CallResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - call_id: "TS", - - - - - parent_call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - phone_number_id: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - start_time: "TS", - - - - - connect_time: "TS", - - - - - end_time: "TS", - - - - duration: 1, - - - - connect_duration: 1, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new, - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CallResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - call_id: "TS", - - - - - parent_call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - phone_number_id: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - start_time: "TS", - - - - - connect_time: "TS", - - - - - end_time: "TS", - - - - duration: 1, - - - - connect_duration: 1, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new, - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CallResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + subresource_uris: Object.new, - skip 'checks if properties are invalid' do - instance = Freeclimb::CallResult.new( - - ) - expect(instance.valid?).to eq(false) + application_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - - - obj_Object = Object.new() - - - instance_1 = Freeclimb::CallResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::CallResult" do + expect { + Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - subresource_uris: obj_Object, - - - + + subresource_uris: Object.new, + application_id: "TS", - - - - ) - instance_2 = Freeclimb::CallResult.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - - - + duration: 1, - - - + connect_duration: 1, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - subresource_uris: obj_Object, - - - - application_id: "TS", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::CallResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - call_id: "TS", - - - - - parent_call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - phone_number_id: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - start_time: "TS", - - - - - connect_time: "TS", - - - - - end_time: "TS", - - - - duration: 2, - - - - connect_duration: 2, - - - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - subresource_uris: Object.new(), - - subresource_uris: Object.new(), - - + + subresource_uris: Object.new, + application_id: "TS", - - - - ) - instance_2 = Freeclimb::CallResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - call_id: "ST", - - - - - parent_call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - phone_number_id: "ST", - - - - - - - call_status: nil, - - - start_time: "ST", - - - - - connect_time: "ST", - - - - - end_time: "ST", - - - - duration: 1, - - - - connect_duration: 1, - - - - - - - direction: nil, - - - - - answered_by: nil, - - - - subresource_uris: Object.new(), - - - - application_id: "ST", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::CallResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - call_id: "TS", - - - - - parent_call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - phone_number_id: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - start_time: "TS", - - - - - connect_time: "TS", - - - - - end_time: "TS", - - - - duration: 1, - - - - connect_duration: 1, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::CallResult.new( - + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - + + subresource_uris: Object.new, + + application_id: "TS" ) - instance_2 = Freeclimb::CallResult.new( - + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CallResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Object = Object.new + + instance_1 = Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + subresource_uris: obj_Object, - describe 'test method "_deserialize"' do - instance = Freeclimb::CallResult.new( - + application_id: "TS" + ) + instance_2 = Freeclimb::CallResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - - subresource_uris: Object.new(), - - - application_id: "TS", - - - + + subresource_uris: obj_Object, + + application_id: "TS" + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::CallResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 2, + + connect_duration: 2, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + subresource_uris: Object.new, + + subresource_uris: Object.new, + + application_id: "TS" + ) + instance_2 = Freeclimb::CallResult.new( + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + call_id: "ST", + + parent_call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + phone_number_id: "ST", + + call_status: nil, + + start_time: "ST", + + connect_time: "ST", + + end_time: "ST", + + duration: 1, + + connect_duration: 1, + + direction: nil, + + answered_by: nil, + + subresource_uris: Object.new, + + application_id: "ST" + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::CallResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 1, + + connect_duration: 1, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + subresource_uris: Object.new, + + application_id: "TS" + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::CallResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 1, + + connect_duration: 1, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + subresource_uris: Object.new, + + application_id: "TS" + ) + instance_2 = Freeclimb::CallResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 1, + + connect_duration: 1, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + subresource_uris: Object.new, + + application_id: "TS" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::CallResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 1, + + connect_duration: 1, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + subresource_uris: Object.new, + + application_id: "TS" ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone_number_id' do + + it "deserializes the data of phone_number_id" do expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of start_time' do + + it "deserializes the data of start_time" do expect(instance._deserialize("String", instance.start_time)).to be_a_kind_of(String) end - - - it 'deserializes the data of connect_time' do + + it "deserializes the data of connect_time" do expect(instance._deserialize("String", instance.connect_time)).to be_a_kind_of(String) end - - - it 'deserializes the data of end_time' do + + it "deserializes the data of end_time" do expect(instance._deserialize("String", instance.end_time)).to be_a_kind_of(String) end - - - it 'deserializes the data of duration' do + + it "deserializes the data of duration" do expect(instance._deserialize("Integer", instance.duration)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of connect_duration' do + + it "deserializes the data of connect_duration" do expect(instance._deserialize("Integer", instance.connect_duration)).to be_a_kind_of(Integer) end - - - - - - - - - it 'deserializes the data of subresource_uris' do + + it "deserializes the data of subresource_uris" do expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object) end - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CallResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - + subresource_uris: Object.new, - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CallResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - + subresource_uris: Object.new, - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - - - obj = Object.new() - - + it "creates equal hash for two equal objects" do + obj = Object.new + instance_1 = Freeclimb::CallResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - + subresource_uris: obj, - - - application_id: "TS", - - - + + application_id: "TS" ) instance_2 = Freeclimb::CallResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + call_id: "TS", - - - - + parent_call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + phone_number_id: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + start_time: "TS", - - - - + connect_time: "TS", - - - - + end_time: "TS", - - - + duration: 1, - - - + connect_duration: 1, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - + subresource_uris: obj, - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -2071,141 +1010,103 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CallResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - call_id: "TS", - - - - parent_call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - phone_number_id: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - start_time: "TS", - - - - connect_time: "TS", - - - - end_time: "TS", - - - duration: 1, - - - connect_duration: 1, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - answered_by: Freeclimb::AnsweredBy::HUMAN, - - - - - - application_id: "TS", - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + call_id: "TS", + + parent_call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + start_time: "TS", + + connect_time: "TS", + + end_time: "TS", + + duration: 1, + + connect_duration: 1, + + direction: Freeclimb::CallDirection::INBOUND, + + answered_by: Freeclimb::AnsweredBy::HUMAN, + + application_id: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns phone_number_id in the form of hash' do + it "returns phone_number_id in the form of hash" do expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns start_time in the form of hash' do + it "returns start_time in the form of hash" do expect(instance._to_hash(instance.start_time)).to eq(instance.start_time) end - it 'returns connect_time in the form of hash' do + it "returns connect_time in the form of hash" do expect(instance._to_hash(instance.connect_time)).to eq(instance.connect_time) end - it 'returns end_time in the form of hash' do + it "returns end_time in the form of hash" do expect(instance._to_hash(instance.end_time)).to eq(instance.end_time) end - it 'returns duration in the form of hash' do + it "returns duration in the form of hash" do expect(instance._to_hash(instance.duration)).to eq(instance.duration) end - it 'returns connect_duration in the form of hash' do + it "returns connect_duration in the form of hash" do expect(instance._to_hash(instance.connect_duration)).to eq(instance.connect_duration) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns answered_by in the form of hash' do + it "returns answered_by in the form of hash" do expect(instance._to_hash(instance.answered_by)).to eq(instance.answered_by) end - it 'returns subresource_uris in the form of hash' do + it "returns subresource_uris in the form of hash" do expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end end - end diff --git a/spec/models/call_status_spec.rb b/spec/models/call_status_spec.rb index ac620fc8..46acdaa9 100644 --- a/spec/models/call_status_spec.rb +++ b/spec/models/call_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallStatus @@ -21,22 +19,22 @@ describe Freeclimb::CallStatus do let(:instance) { Freeclimb::CallStatus.new } - describe 'test an instance of CallStatus' do - it 'should create an instance of CallStatus' do + describe "test an instance of CallStatus" do + it "should create an instance of CallStatus" do expect(instance).to be_instance_of(Freeclimb::CallStatus) end end - + describe 'test attribute "QUEUED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::QUEUED = "queued" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::QUEUED - calculatedValue = Freeclimb::CallStatus::build_from_hash("queued") + calculatedValue = Freeclimb::CallStatus.build_from_hash("queued") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "queued" calculatedValue = Freeclimb::CallStatus::QUEUED expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "RINGING"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::RINGING = "ringing" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::RINGING - calculatedValue = Freeclimb::CallStatus::build_from_hash("ringing") + calculatedValue = Freeclimb::CallStatus.build_from_hash("ringing") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ringing" calculatedValue = Freeclimb::CallStatus::RINGING expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "IN_PROGRESS"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::IN_PROGRESS = "inProgress" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::IN_PROGRESS - calculatedValue = Freeclimb::CallStatus::build_from_hash("inProgress") + calculatedValue = Freeclimb::CallStatus.build_from_hash("inProgress") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "inProgress" calculatedValue = Freeclimb::CallStatus::IN_PROGRESS expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "CANCELED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::CANCELED = "canceled" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::CANCELED - calculatedValue = Freeclimb::CallStatus::build_from_hash("canceled") + calculatedValue = Freeclimb::CallStatus.build_from_hash("canceled") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "canceled" calculatedValue = Freeclimb::CallStatus::CANCELED expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "COMPLETED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::COMPLETED = "completed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::COMPLETED - calculatedValue = Freeclimb::CallStatus::build_from_hash("completed") + calculatedValue = Freeclimb::CallStatus.build_from_hash("completed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "completed" calculatedValue = Freeclimb::CallStatus::COMPLETED expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "FAILED"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::FAILED = "failed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::FAILED - calculatedValue = Freeclimb::CallStatus::build_from_hash("failed") + calculatedValue = Freeclimb::CallStatus.build_from_hash("failed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "failed" calculatedValue = Freeclimb::CallStatus::FAILED expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "BUSY"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::BUSY = "busy" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::BUSY - calculatedValue = Freeclimb::CallStatus::build_from_hash("busy") + calculatedValue = Freeclimb::CallStatus.build_from_hash("busy") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "busy" calculatedValue = Freeclimb::CallStatus::BUSY expect(expectedValue).to eq(calculatedValue) @@ -140,19 +138,18 @@ end describe 'test attribute "NO_ANSWER"' do - it 'should work' do + it "should work" do expect { Freeclimb::CallStatus::NO_ANSWER = "noAnswer" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CallStatus::NO_ANSWER - calculatedValue = Freeclimb::CallStatus::build_from_hash("noAnswer") + calculatedValue = Freeclimb::CallStatus.build_from_hash("noAnswer") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noAnswer" calculatedValue = Freeclimb::CallStatus::NO_ANSWER expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/call_status_webhook_spec.rb b/spec/models/call_status_webhook_spec.rb index 517da12d..273cdde5 100644 --- a/spec/models/call_status_webhook_spec.rb +++ b/spec/models/call_status_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CallStatusWebhook @@ -21,865 +19,490 @@ describe Freeclimb::CallStatusWebhook do let(:instance) { Freeclimb::CallStatusWebhook.new } - describe 'test an instance of CallStatusWebhook' do - it 'should create an instance of CallStatusWebhook' do + describe "test an instance of CallStatusWebhook" do + it "should create an instance of CallStatusWebhook" do expect(instance).to be_instance_of(Freeclimb::CallStatusWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of CallStatusWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of CallStatusWebhook" do payload = '{ "requestType": "callStatus" }' expect(Freeclimb::CallStatusWebhook.deserialize(payload)).to be_instance_of(Freeclimb::CallStatusWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "call_ended_reason"' do - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_ended_reason = Freeclimb::CallEndedReason::BUSY - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::BUSY) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::BUSY) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_ended_reason = Freeclimb::CallEndedReason::FAILED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAILED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAILED) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_ended_reason = Freeclimb::CallEndedReason::NO_ANSWER - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::NO_ANSWER) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::NO_ANSWER) end - it 'assigns value CALL_CANCELED' do + it "assigns value CALL_CANCELED" do instance.call_ended_reason = Freeclimb::CallEndedReason::CALL_CANCELED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CALL_CANCELED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CALL_CANCELED) end - it 'assigns value FAR_END_HANGUP' do + it "assigns value FAR_END_HANGUP" do instance.call_ended_reason = Freeclimb::CallEndedReason::FAR_END_HANGUP - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAR_END_HANGUP) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAR_END_HANGUP) end - it 'assigns value APP_HANGUP' do + it "assigns value APP_HANGUP" do instance.call_ended_reason = Freeclimb::CallEndedReason::APP_HANGUP - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_HANGUP) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_HANGUP) end - it 'assigns value APP_REJECT' do + it "assigns value APP_REJECT" do instance.call_ended_reason = Freeclimb::CallEndedReason::APP_REJECT - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_REJECT) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_REJECT) end - it 'assigns value APP_NO_PERCL' do + it "assigns value APP_NO_PERCL" do instance.call_ended_reason = Freeclimb::CallEndedReason::APP_NO_PERCL - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_NO_PERCL) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_NO_PERCL) end - it 'assigns value APP_INVALID_PERCL' do + it "assigns value APP_INVALID_PERCL" do instance.call_ended_reason = Freeclimb::CallEndedReason::APP_INVALID_PERCL - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_INVALID_PERCL) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_INVALID_PERCL) end - it 'assigns value CONFERENCE_TERMINATED' do + it "assigns value CONFERENCE_TERMINATED" do instance.call_ended_reason = Freeclimb::CallEndedReason::CONFERENCE_TERMINATED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_TERMINATED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_TERMINATED) end - it 'assigns value CONFERENCE_EMPTIED' do + it "assigns value CONFERENCE_EMPTIED" do instance.call_ended_reason = Freeclimb::CallEndedReason::CONFERENCE_EMPTIED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_EMPTIED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_EMPTIED) end - it 'assigns value REMOVED_FROM_CONFERENCE' do + it "assigns value REMOVED_FROM_CONFERENCE" do instance.call_ended_reason = Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE) end - it 'assigns value MACHINE_DETECTED' do + it "assigns value MACHINE_DETECTED" do instance.call_ended_reason = Freeclimb::CallEndedReason::MACHINE_DETECTED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MACHINE_DETECTED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MACHINE_DETECTED) end - it 'assigns value WEBHOOK_FAILED' do + it "assigns value WEBHOOK_FAILED" do instance.call_ended_reason = Freeclimb::CallEndedReason::WEBHOOK_FAILED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_FAILED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_FAILED) end - it 'assigns value WEBHOOK_INVALID_RESPONSE' do + it "assigns value WEBHOOK_INVALID_RESPONSE" do instance.call_ended_reason = Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE) end - it 'assigns value VOICE_DISABLED' do + it "assigns value VOICE_DISABLED" do instance.call_ended_reason = Freeclimb::CallEndedReason::VOICE_DISABLED - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::VOICE_DISABLED) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::VOICE_DISABLED) end - it 'assigns value CONFIG_ERROR_NO_APPLICATION' do + it "assigns value CONFIG_ERROR_NO_APPLICATION" do instance.call_ended_reason = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION) end - it 'assigns value CONFIG_ERROR_NO_VOICE_URL' do + it "assigns value CONFIG_ERROR_NO_VOICE_URL" do instance.call_ended_reason = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL) end - it 'assigns value MAX_REDIRECTS_ERROR' do + it "assigns value MAX_REDIRECTS_ERROR" do instance.call_ended_reason = Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR) end - it 'assigns value PERCL_PROCESSING_ERROR' do + it "assigns value PERCL_PROCESSING_ERROR" do instance.call_ended_reason = Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR) end - it 'assigns value INTERNAL_ERROR' do + it "assigns value INTERNAL_ERROR" do instance.call_ended_reason = Freeclimb::CallEndedReason::INTERNAL_ERROR - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::INTERNAL_ERROR) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::INTERNAL_ERROR) end - it 'assigns value GRPC_HANGUP' do + it "assigns value GRPC_HANGUP" do instance.call_ended_reason = Freeclimb::CallEndedReason::GRPC_HANGUP - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::GRPC_HANGUP) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::GRPC_HANGUP) end - it 'assigns value MAX_DURATION' do + it "assigns value MAX_DURATION" do instance.call_ended_reason = Freeclimb::CallEndedReason::MAX_DURATION - expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_DURATION) + expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_DURATION) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CallStatusWebhook' do - expect { instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CallStatusWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::CallStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + conference_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::CallStatusWebhook.new( - - ) - expect(instance.valid?).to eq(false) + queue_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::CallStatusWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::CallStatusWebhook" do + expect { + Freeclimb::CallStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - ) - instance_2 = Freeclimb::CallStatusWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CallStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CallStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CallStatusWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::CallStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + instance_2 = Freeclimb::CallStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) instance_2 = Freeclimb::CallStatusWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - call_ended_reason: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + call_ended_reason: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -888,328 +511,149 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::CallStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1217,76 +661,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CallStatusWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - call_ended_reason: Freeclimb::CallEndedReason::BUSY, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + call_ended_reason: Freeclimb::CallEndedReason::BUSY, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns call_ended_reason in the form of hash' do + it "returns call_ended_reason in the form of hash" do expect(instance._to_hash(instance.call_ended_reason)).to eq(instance.call_ended_reason) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end end - end diff --git a/spec/models/capabilities_spec.rb b/spec/models/capabilities_spec.rb index e85f89b7..0318421b 100644 --- a/spec/models/capabilities_spec.rb +++ b/spec/models/capabilities_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Capabilities @@ -21,352 +19,216 @@ describe Freeclimb::Capabilities do let(:instance) { Freeclimb::Capabilities.new } - describe 'test an instance of Capabilities' do - it 'should create an instance of Capabilities' do + describe "test an instance of Capabilities" do + it "should create an instance of Capabilities" do expect(instance).to be_instance_of(Freeclimb::Capabilities) end end - + describe 'test attribute "voice"' do - it 'should work' do + it "should work" do instance.voice = false - expect(instance.voice).to eq(false) - - - + expect(instance.voice).to eq(false) end end describe 'test attribute "sms"' do - it 'should work' do + it "should work" do instance.sms = false - expect(instance.sms).to eq(false) - - - + expect(instance.sms).to eq(false) end end describe 'test attribute "toll_free"' do - it 'should work' do + it "should work" do instance.toll_free = false - expect(instance.toll_free).to eq(false) - - - + expect(instance.toll_free).to eq(false) end end describe 'test attribute "ten_dlc"' do - it 'should work' do + it "should work" do instance.ten_dlc = false - expect(instance.ten_dlc).to eq(false) - - - + expect(instance.ten_dlc).to eq(false) end end describe 'test attribute "short_code"' do - it 'should work' do + it "should work" do instance.short_code = false - expect(instance.short_code).to eq(false) - - - + expect(instance.short_code).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Capabilities' do - expect { instance = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Capabilities.new( + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Capabilities" do + expect { + Freeclimb::Capabilities.new( + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::Capabilities.new( + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - + short_code: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::Capabilities.new( + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Capabilities.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Capabilities.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true ) instance_2 = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true ) instance_2 = Freeclimb::Capabilities.new( - voice: false, - - - - sms: false, - - - - toll_free: false, - - - - ten_dlc: false, - - - - short_code: false, - - - + voice: false, + + sms: false, + + toll_free: false, + + ten_dlc: false, + + short_code: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - - ) + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) instance_2 = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -375,157 +237,92 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Capabilities.new( - voice: true, - - - - sms: true, - - - - toll_free: true, - - - - ten_dlc: true, - - - - short_code: true, - - - + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true ) - - - it 'deserializes the data of voice' do + + it "deserializes the data of voice" do expect(instance._deserialize("Boolean", instance.voice)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of sms' do + + it "deserializes the data of sms" do expect(instance._deserialize("Boolean", instance.sms)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of toll_free' do + + it "deserializes the data of toll_free" do expect(instance._deserialize("Boolean", instance.toll_free)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of ten_dlc' do + + it "deserializes the data of ten_dlc" do expect(instance._deserialize("Boolean", instance.ten_dlc)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of short_code' do + + it "deserializes the data of short_code" do expect(instance._deserialize("Boolean", instance.short_code)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) instance_2 = Freeclimb::Capabilities.new( voice: true, - - - + sms: true, - - - + toll_free: true, - - - + ten_dlc: true, - - - - short_code: true, - - - + + short_code: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -533,36 +330,30 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Capabilities.new( - voice: true, - - - sms: true, - - - toll_free: true, - - - ten_dlc: true, - - - short_code: true, - - ) - it 'returns voice in the form of hash' do + voice: true, + + sms: true, + + toll_free: true, + + ten_dlc: true, + + short_code: true + ) + it "returns voice in the form of hash" do expect(instance._to_hash(instance.voice)).to eq(instance.voice) end - it 'returns sms in the form of hash' do + it "returns sms in the form of hash" do expect(instance._to_hash(instance.sms)).to eq(instance.sms) end - it 'returns toll_free in the form of hash' do + it "returns toll_free in the form of hash" do expect(instance._to_hash(instance.toll_free)).to eq(instance.toll_free) end - it 'returns ten_dlc in the form of hash' do + it "returns ten_dlc in the form of hash" do expect(instance._to_hash(instance.ten_dlc)).to eq(instance.ten_dlc) end - it 'returns short_code in the form of hash' do + it "returns short_code in the form of hash" do expect(instance._to_hash(instance.short_code)).to eq(instance.short_code) end end - end diff --git a/spec/models/completion_request_spec.rb b/spec/models/completion_request_spec.rb index c9ca0529..95fca8a1 100644 --- a/spec/models/completion_request_spec.rb +++ b/spec/models/completion_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CompletionRequest @@ -21,143 +19,103 @@ describe Freeclimb::CompletionRequest do let(:instance) { Freeclimb::CompletionRequest.new } - describe 'test an instance of CompletionRequest' do - it 'should create an instance of CompletionRequest' do + describe "test an instance of CompletionRequest" do + it "should create an instance of CompletionRequest" do expect(instance).to be_instance_of(Freeclimb::CompletionRequest) end end - + describe 'test attribute "query"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.query = "T" * 2000 - expect(instance.query).to eq("T" * 2000) + expect(instance.query).to eq("T" * 2000) end - it 'should not assign a value over maxLength' do - expect { instance.query = "T" * (2000 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.query = "T" * (2000 + 1) }.to raise_error(ArgumentError) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CompletionRequest' do - expect { instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::CompletionRequest.new( + query: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::CompletionRequest" do + expect { + Freeclimb::CompletionRequest.new( + query: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CompletionRequest.new( + query: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::CompletionRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::CompletionRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) instance_2 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) instance_2 = Freeclimb::CompletionRequest.new( - - query: "ST", - - - + query: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - - ) + query: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) instance_2 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -166,58 +124,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) - it 'deserializes the data of query' do + it "deserializes the data of query" do expect(instance._deserialize("String", instance.query)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) instance_2 = Freeclimb::CompletionRequest.new( - - query: "TS", - - - + query: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -225,13 +160,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CompletionRequest.new( - - query: "TS", - - ) - it 'returns query in the form of hash' do + query: "TS" + ) + it "returns query in the form of hash" do expect(instance._to_hash(instance.query)).to eq(instance.query) end end - end diff --git a/spec/models/completion_result_spec.rb b/spec/models/completion_result_spec.rb index 3e5fb559..eb53ccfa 100644 --- a/spec/models/completion_result_spec.rb +++ b/spec/models/completion_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CompletionResult @@ -21,211 +19,132 @@ describe Freeclimb::CompletionResult do let(:instance) { Freeclimb::CompletionResult.new } - describe 'test an instance of CompletionResult' do - it 'should create an instance of CompletionResult' do + describe "test an instance of CompletionResult" do + it "should create an instance of CompletionResult" do expect(instance).to be_instance_of(Freeclimb::CompletionResult) end end - + describe 'test attribute "response"' do - it 'should work' do - + it "should work" do instance.response = "TEST_STRING" - expect(instance.response).to eq("TEST_STRING") - - - + expect(instance.response).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value SUCCESS' do + it "assigns value SUCCESS" do instance.status = Freeclimb::CompletionResultStatus::SUCCESS - expect(instance.status).to eq(Freeclimb::CompletionResultStatus::SUCCESS) + expect(instance.status).to eq(Freeclimb::CompletionResultStatus::SUCCESS) end - it 'assigns value NO_CONTEXT' do + it "assigns value NO_CONTEXT" do instance.status = Freeclimb::CompletionResultStatus::NO_CONTEXT - expect(instance.status).to eq(Freeclimb::CompletionResultStatus::NO_CONTEXT) + expect(instance.status).to eq(Freeclimb::CompletionResultStatus::NO_CONTEXT) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::CompletionResult.new( + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CompletionResult' do - expect { instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::CompletionResult" do + expect { + Freeclimb::CompletionResult.new( + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CompletionResult.new( + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::CompletionResult.new - skip 'checks if properties are invalid' do - instance = Freeclimb::CompletionResult.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - + it "checks if objects are equal" do instance_1 = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS ) instance_2 = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS ) instance_2 = Freeclimb::CompletionResult.new( - - response: "ST", - - - - - - - status: nil, - + response: "ST", + + status: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - - ) + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) instance_2 = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -234,86 +153,45 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS ) - it 'deserializes the data of response' do + it "deserializes the data of response" do expect(instance._deserialize("String", instance.response)).to be_a_kind_of(String) end - - - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) instance_2 = Freeclimb::CompletionResult.new( - response: "TS", - - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - - + + status: Freeclimb::CompletionResultStatus::SUCCESS ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -321,20 +199,15 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CompletionResult.new( - - response: "TS", - - - - status: Freeclimb::CompletionResultStatus::SUCCESS, - - ) - it 'returns response in the form of hash' do + response: "TS", + + status: Freeclimb::CompletionResultStatus::SUCCESS + ) + it "returns response in the form of hash" do expect(instance._to_hash(instance.response)).to eq(instance.response) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end end - end diff --git a/spec/models/completion_result_status_spec.rb b/spec/models/completion_result_status_spec.rb index 4e156a00..8d5faf88 100644 --- a/spec/models/completion_result_status_spec.rb +++ b/spec/models/completion_result_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CompletionResultStatus @@ -21,22 +19,22 @@ describe Freeclimb::CompletionResultStatus do let(:instance) { Freeclimb::CompletionResultStatus.new } - describe 'test an instance of CompletionResultStatus' do - it 'should create an instance of CompletionResultStatus' do + describe "test an instance of CompletionResultStatus" do + it "should create an instance of CompletionResultStatus" do expect(instance).to be_instance_of(Freeclimb::CompletionResultStatus) end end - + describe 'test attribute "SUCCESS"' do - it 'should work' do + it "should work" do expect { Freeclimb::CompletionResultStatus::SUCCESS = "success" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CompletionResultStatus::SUCCESS - calculatedValue = Freeclimb::CompletionResultStatus::build_from_hash("success") + calculatedValue = Freeclimb::CompletionResultStatus.build_from_hash("success") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "success" calculatedValue = Freeclimb::CompletionResultStatus::SUCCESS expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "NO_CONTEXT"' do - it 'should work' do + it "should work" do expect { Freeclimb::CompletionResultStatus::NO_CONTEXT = "no_context" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::CompletionResultStatus::NO_CONTEXT - calculatedValue = Freeclimb::CompletionResultStatus::build_from_hash("no_context") + calculatedValue = Freeclimb::CompletionResultStatus.build_from_hash("no_context") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "no_context" calculatedValue = Freeclimb::CompletionResultStatus::NO_CONTEXT expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/conference_list_spec.rb b/spec/models/conference_list_spec.rb index 6947741c..59471ce6 100644 --- a/spec/models/conference_list_spec.rb +++ b/spec/models/conference_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceList @@ -21,541 +19,303 @@ describe Freeclimb::ConferenceList do let(:instance) { Freeclimb::ConferenceList.new } - describe 'test an instance of ConferenceList' do - it 'should create an instance of ConferenceList' do + describe "test an instance of ConferenceList" do + it "should create an instance of ConferenceList" do expect(instance).to be_instance_of(Freeclimb::ConferenceList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "conferences"' do - it 'should work' do - + it "should work" do instance.conferences = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.conferences).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.conferences).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceList' do - expect { instance = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceList.new( + it "properly initializes with values" do + expect { + Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceList.new( - - ) - expect(instance.valid?).to eq(false) + conferences: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::ConferenceList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceList" do + expect { + Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + conferences: [], - - ) - instance_2 = Freeclimb::ConferenceList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + conferences: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ConferenceList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] + ) + instance_2 = Freeclimb::ConferenceList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - conferences: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + conferences: [] ) instance_2 = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - conferences: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + conferences: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) instance_2 = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - conferences: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of conferences' do + + it "deserializes the data of conferences" do expect(instance._deserialize("Array", instance.conferences)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) instance_2 = Freeclimb::ConferenceList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - conferences: Array.new(), - - - + + conferences: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - conferences: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + conferences: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns conferences in the form of hash' do + it "returns conferences in the form of hash" do expect(instance._to_hash(instance.conferences)).to eq(instance.conferences) end end - end diff --git a/spec/models/conference_participant_list_spec.rb b/spec/models/conference_participant_list_spec.rb index 4ae7230d..26d88c81 100644 --- a/spec/models/conference_participant_list_spec.rb +++ b/spec/models/conference_participant_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceParticipantList @@ -21,541 +19,303 @@ describe Freeclimb::ConferenceParticipantList do let(:instance) { Freeclimb::ConferenceParticipantList.new } - describe 'test an instance of ConferenceParticipantList' do - it 'should create an instance of ConferenceParticipantList' do + describe "test an instance of ConferenceParticipantList" do + it "should create an instance of ConferenceParticipantList" do expect(instance).to be_instance_of(Freeclimb::ConferenceParticipantList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "participants"' do - it 'should work' do - + it "should work" do instance.participants = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.participants).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.participants).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceParticipantList' do - expect { instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceParticipantList.new( + it "properly initializes with values" do + expect { + Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceParticipantList.new( - - ) - expect(instance.valid?).to eq(false) + participants: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::ConferenceParticipantList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceParticipantList" do + expect { + Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + participants: [], - - ) - instance_2 = Freeclimb::ConferenceParticipantList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + participants: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceParticipantList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceParticipantList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ConferenceParticipantList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] + ) + instance_2 = Freeclimb::ConferenceParticipantList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceParticipantList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - participants: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + participants: [] ) instance_2 = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - participants: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + participants: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) instance_2 = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - participants: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of participants' do + + it "deserializes the data of participants" do expect(instance._deserialize("Array", instance.participants)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) instance_2 = Freeclimb::ConferenceParticipantList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - participants: Array.new(), - - - + + participants: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - participants: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + participants: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns participants in the form of hash' do + it "returns participants in the form of hash" do expect(instance._to_hash(instance.participants)).to eq(instance.participants) end end - end diff --git a/spec/models/conference_participant_result_spec.rb b/spec/models/conference_participant_result_spec.rb index 52f3d5b9..25a45eb8 100644 --- a/spec/models/conference_participant_result_spec.rb +++ b/spec/models/conference_participant_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceParticipantResult @@ -21,756 +19,390 @@ describe Freeclimb::ConferenceParticipantResult do let(:instance) { Freeclimb::ConferenceParticipantResult.new } - describe 'test an instance of ConferenceParticipantResult' do - it 'should create an instance of ConferenceParticipantResult' do + describe "test an instance of ConferenceParticipantResult" do + it "should create an instance of ConferenceParticipantResult" do expect(instance).to be_instance_of(Freeclimb::ConferenceParticipantResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "talk"' do - it 'should work' do + it "should work" do instance.talk = false - expect(instance.talk).to eq(false) - - - + expect(instance.talk).to eq(false) end end describe 'test attribute "listen"' do - it 'should work' do + it "should work" do instance.listen = false - expect(instance.listen).to eq(false) - - - + expect(instance.listen).to eq(false) end end describe 'test attribute "dtmf_pass_through"' do - it 'should work' do + it "should work" do instance.dtmf_pass_through = false - expect(instance.dtmf_pass_through).to eq(false) - - - + expect(instance.dtmf_pass_through).to eq(false) end end describe 'test attribute "start_conf_on_enter"' do - it 'should work' do + it "should work" do instance.start_conf_on_enter = false - expect(instance.start_conf_on_enter).to eq(false) - - - + expect(instance.start_conf_on_enter).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceParticipantResult' do - expect { instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceParticipantResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::ConferenceParticipantResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - - ) - expect(instance.valid?).to eq(true) - end + dtmf_pass_through: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceParticipantResult.new( - - ) - expect(instance.valid?).to eq(false) + start_conf_on_enter: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::ConferenceParticipantResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceParticipantResult" do + expect { + Freeclimb::ConferenceParticipantResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - + start_conf_on_enter: true, - - - - ) - instance_2 = Freeclimb::ConferenceParticipantResult.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceParticipantResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - + start_conf_on_enter: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceParticipantResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceParticipantResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ConferenceParticipantResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true + ) + instance_2 = Freeclimb::ConferenceParticipantResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true ) instance_2 = Freeclimb::ConferenceParticipantResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - account_id: "ST", - - - - - conference_id: "ST", - - - - - call_id: "ST", - - - - talk: false, - - - - listen: false, - - - - dtmf_pass_through: false, - - - - start_conf_on_enter: false, - - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + account_id: "ST", + + conference_id: "ST", + + call_id: "ST", + + talk: false, + + listen: false, + + dtmf_pass_through: false, + + start_conf_on_enter: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) instance_2 = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -779,343 +411,175 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - conference_id: "TS", - - - - - call_id: "TS", - - - - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of talk' do + + it "deserializes the data of talk" do expect(instance._deserialize("Boolean", instance.talk)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of listen' do + + it "deserializes the data of listen" do expect(instance._deserialize("Boolean", instance.listen)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of dtmf_pass_through' do + + it "deserializes the data of dtmf_pass_through" do expect(instance._deserialize("Boolean", instance.dtmf_pass_through)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of start_conf_on_enter' do + + it "deserializes the data of start_conf_on_enter" do expect(instance._deserialize("Boolean", instance.start_conf_on_enter)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) instance_2 = Freeclimb::ConferenceParticipantResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + conference_id: "TS", - - - - + call_id: "TS", - - - + talk: true, - - - + listen: true, - - - + dtmf_pass_through: true, - - - - start_conf_on_enter: true, - - - + + start_conf_on_enter: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1123,78 +587,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceParticipantResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - account_id: "TS", - - - - conference_id: "TS", - - - - call_id: "TS", - - - talk: true, - - - listen: true, - - - dtmf_pass_through: true, - - - start_conf_on_enter: true, - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + conference_id: "TS", + + call_id: "TS", + + talk: true, + + listen: true, + + dtmf_pass_through: true, + + start_conf_on_enter: true + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns talk in the form of hash' do + it "returns talk in the form of hash" do expect(instance._to_hash(instance.talk)).to eq(instance.talk) end - it 'returns listen in the form of hash' do + it "returns listen in the form of hash" do expect(instance._to_hash(instance.listen)).to eq(instance.listen) end - it 'returns dtmf_pass_through in the form of hash' do + it "returns dtmf_pass_through in the form of hash" do expect(instance._to_hash(instance.dtmf_pass_through)).to eq(instance.dtmf_pass_through) end - it 'returns start_conf_on_enter in the form of hash' do + it "returns start_conf_on_enter in the form of hash" do expect(instance._to_hash(instance.start_conf_on_enter)).to eq(instance.start_conf_on_enter) end end - end diff --git a/spec/models/conference_recording_status_webhook_spec.rb b/spec/models/conference_recording_status_webhook_spec.rb index b6837440..920cdd3c 100644 --- a/spec/models/conference_recording_status_webhook_spec.rb +++ b/spec/models/conference_recording_status_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceRecordingStatusWebhook @@ -21,980 +19,500 @@ describe Freeclimb::ConferenceRecordingStatusWebhook do let(:instance) { Freeclimb::ConferenceRecordingStatusWebhook.new } - describe 'test an instance of ConferenceRecordingStatusWebhook' do - it 'should create an instance of ConferenceRecordingStatusWebhook' do + describe "test an instance of ConferenceRecordingStatusWebhook" do + it "should create an instance of ConferenceRecordingStatusWebhook" do expect(instance).to be_instance_of(Freeclimb::ConferenceRecordingStatusWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of ConferenceRecordingStatusWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of ConferenceRecordingStatusWebhook" do payload = '{ "requestType": "conferenceRecordingStatus" }' expect(Freeclimb::ConferenceRecordingStatusWebhook.deserialize(payload)).to be_instance_of(Freeclimb::ConferenceRecordingStatusWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::ConferenceStatus::EMPTY - expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) end - it 'assigns value POPULATED' do + it "assigns value POPULATED" do instance.status = Freeclimb::ConferenceStatus::POPULATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS - expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::ConferenceStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_sec"' do - it 'should work' do - - + it "should work" do instance.recording_duration_sec = 1 expect(instance.recording_duration_sec).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceRecordingStatusWebhook' do - expect { instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::ConferenceRecordingStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + recording_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - ) - expect(instance.valid?).to eq(false) + recording_duration_sec: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::ConferenceRecordingStatusWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceRecordingStatusWebhook" do + expect { + Freeclimb::ConferenceRecordingStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - + recording_duration_sec: 1, - - - - ) - instance_2 = Freeclimb::ConferenceRecordingStatusWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceRecordingStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - - + recording_duration_sec: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceRecordingStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceRecordingStatusWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ConferenceRecordingStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + instance_2 = Freeclimb::ConferenceRecordingStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 2, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 2 ) instance_2 = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - status: nil, - - - recording_url: "ST", - - - - - recording_id: "ST", - - - - recording_duration_sec: 1, - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + status: nil, + + recording_url: "ST", + + recording_id: "ST", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -1003,416 +521,191 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_sec' do + + it "deserializes the data of recording_duration_sec" do expect(instance._deserialize("Integer", instance.recording_duration_sec)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::ConferenceRecordingStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1420,96 +713,70 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceRecordingStatusWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - recording_url: "TS", - - - - recording_id: "TS", - - - recording_duration_sec: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_duration_sec in the form of hash' do + it "returns recording_duration_sec in the form of hash" do expect(instance._to_hash(instance.recording_duration_sec)).to eq(instance.recording_duration_sec) end end - end diff --git a/spec/models/conference_result_spec.rb b/spec/models/conference_result_spec.rb index f61d31e0..3f778651 100644 --- a/spec/models/conference_result_spec.rb +++ b/spec/models/conference_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceResult @@ -21,1015 +19,507 @@ describe Freeclimb::ConferenceResult do let(:instance) { Freeclimb::ConferenceResult.new } - describe 'test an instance of ConferenceResult' do - it 'should create an instance of ConferenceResult' do + describe "test an instance of ConferenceResult" do + it "should create an instance of ConferenceResult" do expect(instance).to be_instance_of(Freeclimb::ConferenceResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end - describe 'test attribute "play_beep"' do - it 'assigns value ALWAYS' do + it "assigns value ALWAYS" do instance.play_beep = Freeclimb::PlayBeep::ALWAYS - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) end - it 'assigns value NEVER' do + it "assigns value NEVER" do instance.play_beep = Freeclimb::PlayBeep::NEVER - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) end - it 'assigns value ENTRY_ONLY' do + it "assigns value ENTRY_ONLY" do instance.play_beep = Freeclimb::PlayBeep::ENTRY_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) end - it 'assigns value EXIT_ONLY' do + it "assigns value EXIT_ONLY" do instance.play_beep = Freeclimb::PlayBeep::EXIT_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) end end describe 'test attribute "record"' do - it 'should work' do + it "should work" do instance.record = false - expect(instance.record).to eq(false) - - - + expect(instance.record).to eq(false) end end - describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::ConferenceStatus::EMPTY - expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) end - it 'assigns value POPULATED' do + it "assigns value POPULATED" do instance.status = Freeclimb::ConferenceStatus::POPULATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS - expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::ConferenceStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) end end describe 'test attribute "wait_url"' do - it 'should work' do - + it "should work" do instance.wait_url = "TEST_STRING" - expect(instance.wait_url).to eq("TEST_STRING") - - - + expect(instance.wait_url).to eq("TEST_STRING") end end describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test attribute "subresource_uris"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.subresource_uris = testObject expect(instance.subresource_uris).to eq(testObject) - - + instance.subresource_uris = Object.new expect(instance.subresource_uris).to be_instance_of(Object) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceResult' do - expect { instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::ConferenceResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - - ) - expect(instance.valid?).to eq(true) - end + status_callback_url: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceResult.new( - - ) - expect(instance.valid?).to eq(false) + subresource_uris: Object.new + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - obj_Object = Object.new() - - instance_1 = Freeclimb::ConferenceResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceResult" do + expect { + Freeclimb::ConferenceResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - + record: true, - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - subresource_uris: obj_Object, - - - ) - instance_2 = Freeclimb::ConferenceResult.new( - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - + record: true, - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - subresource_uris: obj_Object, - - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Object = Object.new + + instance_1 = Freeclimb::ConferenceResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: obj_Object + ) + instance_2 = Freeclimb::ConferenceResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: obj_Object ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - subresource_uris: Object.new(), - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: Object.new, + + subresource_uris: Object.new ) instance_2 = Freeclimb::ConferenceResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - conference_id: "ST", - - - - - account_id: "ST", - - - - - _alias: "ST", - - - - - - - play_beep: nil, - - record: false, - - - - - - - status: nil, - - - wait_url: "ST", - - - - - action_url: "ST", - - - - - status_callback_url: "ST", - - - - - - subresource_uris: Object.new(), - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + conference_id: "ST", + + account_id: "ST", + + _alias: "ST", + + play_beep: nil, + + record: false, + + status: nil, + + wait_url: "ST", + + action_url: "ST", + + status_callback_url: "ST", + + subresource_uris: Object.new ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: Object.new + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) instance_2 = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -1038,448 +528,211 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - conference_id: "TS", - - - - - account_id: "TS", - - - - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - wait_url: "TS", - - - - - action_url: "TS", - - - - - status_callback_url: "TS", - - - - - - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS", + + subresource_uris: Object.new ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of record' do + + it "deserializes the data of record" do expect(instance._deserialize("Boolean", instance.record)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of wait_url' do + + it "deserializes the data of wait_url" do expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of action_url' do + + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of status_callback_url' do + + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of subresource_uris' do + + it "deserializes the data of subresource_uris" do expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - obj = Object.new() - + it "creates equal hash for two equal objects" do + obj = Object.new + instance_1 = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) instance_2 = Freeclimb::ConferenceResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + conference_id: "TS", - - - - + account_id: "TS", - - - - + _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + wait_url: "TS", - - - - + action_url: "TS", - - - - + status_callback_url: "TS", - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1487,100 +740,73 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - conference_id: "TS", - - - - account_id: "TS", - - - - _alias: "TS", - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - record: true, - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - wait_url: "TS", - - - - action_url: "TS", - - - - status_callback_url: "TS", - - - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + conference_id: "TS", + + account_id: "TS", + + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status: Freeclimb::ConferenceStatus::EMPTY, + + wait_url: "TS", + + action_url: "TS", + + status_callback_url: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns record in the form of hash' do + it "returns record in the form of hash" do expect(instance._to_hash(instance.record)).to eq(instance.record) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns wait_url in the form of hash' do + it "returns wait_url in the form of hash" do expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url) end - it 'returns action_url in the form of hash' do + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end - it 'returns subresource_uris in the form of hash' do + it "returns subresource_uris in the form of hash" do expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris) end end - end diff --git a/spec/models/conference_status_spec.rb b/spec/models/conference_status_spec.rb index f6d60899..757029df 100644 --- a/spec/models/conference_status_spec.rb +++ b/spec/models/conference_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceStatus @@ -21,22 +19,22 @@ describe Freeclimb::ConferenceStatus do let(:instance) { Freeclimb::ConferenceStatus.new } - describe 'test an instance of ConferenceStatus' do - it 'should create an instance of ConferenceStatus' do + describe "test an instance of ConferenceStatus" do + it "should create an instance of ConferenceStatus" do expect(instance).to be_instance_of(Freeclimb::ConferenceStatus) end end - + describe 'test attribute "EMPTY"' do - it 'should work' do + it "should work" do expect { Freeclimb::ConferenceStatus::EMPTY = "empty" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::ConferenceStatus::EMPTY - calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("empty") + calculatedValue = Freeclimb::ConferenceStatus.build_from_hash("empty") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "empty" calculatedValue = Freeclimb::ConferenceStatus::EMPTY expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "POPULATED"' do - it 'should work' do + it "should work" do expect { Freeclimb::ConferenceStatus::POPULATED = "populated" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::ConferenceStatus::POPULATED - calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("populated") + calculatedValue = Freeclimb::ConferenceStatus.build_from_hash("populated") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "populated" calculatedValue = Freeclimb::ConferenceStatus::POPULATED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "IN_PROGRESS"' do - it 'should work' do + it "should work" do expect { Freeclimb::ConferenceStatus::IN_PROGRESS = "inProgress" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::ConferenceStatus::IN_PROGRESS - calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("inProgress") + calculatedValue = Freeclimb::ConferenceStatus.build_from_hash("inProgress") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "inProgress" calculatedValue = Freeclimb::ConferenceStatus::IN_PROGRESS expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "TERMINATED"' do - it 'should work' do + it "should work" do expect { Freeclimb::ConferenceStatus::TERMINATED = "terminated" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::ConferenceStatus::TERMINATED - calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("terminated") + calculatedValue = Freeclimb::ConferenceStatus.build_from_hash("terminated") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "terminated" calculatedValue = Freeclimb::ConferenceStatus::TERMINATED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/conference_status_webhook_spec.rb b/spec/models/conference_status_webhook_spec.rb index f062d068..7a4fb47e 100644 --- a/spec/models/conference_status_webhook_spec.rb +++ b/spec/models/conference_status_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::ConferenceStatusWebhook @@ -21,980 +19,500 @@ describe Freeclimb::ConferenceStatusWebhook do let(:instance) { Freeclimb::ConferenceStatusWebhook.new } - describe 'test an instance of ConferenceStatusWebhook' do - it 'should create an instance of ConferenceStatusWebhook' do + describe "test an instance of ConferenceStatusWebhook" do + it "should create an instance of ConferenceStatusWebhook" do expect(instance).to be_instance_of(Freeclimb::ConferenceStatusWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of ConferenceStatusWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of ConferenceStatusWebhook" do payload = '{ "requestType": "conferenceStatus" }' expect(Freeclimb::ConferenceStatusWebhook.deserialize(payload)).to be_instance_of(Freeclimb::ConferenceStatusWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::ConferenceStatus::EMPTY - expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) end - it 'assigns value POPULATED' do + it "assigns value POPULATED" do instance.status = Freeclimb::ConferenceStatus::POPULATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS - expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::ConferenceStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_sec"' do - it 'should work' do - - + it "should work" do instance.recording_duration_sec = 1 expect(instance.recording_duration_sec).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceStatusWebhook' do - expect { instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::ConferenceStatusWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::ConferenceStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + recording_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::ConferenceStatusWebhook.new( - - ) - expect(instance.valid?).to eq(false) + recording_duration_sec: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::ConferenceStatusWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::ConferenceStatusWebhook" do + expect { + Freeclimb::ConferenceStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - + recording_duration_sec: 1, - - - - ) - instance_2 = Freeclimb::ConferenceStatusWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ConferenceStatusWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - - + recording_duration_sec: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ConferenceStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ConferenceStatusWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::ConferenceStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + instance_2 = Freeclimb::ConferenceStatusWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 2, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 2 ) instance_2 = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - status: nil, - - - recording_url: "ST", - - - - - recording_id: "ST", - - - - recording_duration_sec: 1, - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + status: nil, + + recording_url: "ST", + + recording_id: "ST", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -1003,416 +521,191 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_sec' do + + it "deserializes the data of recording_duration_sec" do expect(instance._deserialize("Integer", instance.recording_duration_sec)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::ConferenceStatusWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1420,96 +713,70 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceStatusWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - recording_url: "TS", - - - - recording_id: "TS", - - - recording_duration_sec: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_duration_sec in the form of hash' do + it "returns recording_duration_sec in the form of hash" do expect(instance._to_hash(instance.recording_duration_sec)).to eq(instance.recording_duration_sec) end end - end diff --git a/spec/models/create_conference_request_spec.rb b/spec/models/create_conference_request_spec.rb index 5468a31d..d5be9127 100644 --- a/spec/models/create_conference_request_spec.rb +++ b/spec/models/create_conference_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CreateConferenceRequest @@ -21,408 +19,227 @@ describe Freeclimb::CreateConferenceRequest do let(:instance) { Freeclimb::CreateConferenceRequest.new } - describe 'test an instance of CreateConferenceRequest' do - it 'should create an instance of CreateConferenceRequest' do + describe "test an instance of CreateConferenceRequest" do + it "should create an instance of CreateConferenceRequest" do expect(instance).to be_instance_of(Freeclimb::CreateConferenceRequest) end end - + describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end - describe 'test attribute "play_beep"' do - it 'assigns value ALWAYS' do + it "assigns value ALWAYS" do instance.play_beep = Freeclimb::PlayBeep::ALWAYS - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) end - it 'assigns value NEVER' do + it "assigns value NEVER" do instance.play_beep = Freeclimb::PlayBeep::NEVER - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) end - it 'assigns value ENTRY_ONLY' do + it "assigns value ENTRY_ONLY" do instance.play_beep = Freeclimb::PlayBeep::ENTRY_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) end - it 'assigns value EXIT_ONLY' do + it "assigns value EXIT_ONLY" do instance.play_beep = Freeclimb::PlayBeep::EXIT_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) end end describe 'test attribute "record"' do - it 'should work' do + it "should work" do instance.record = false - expect(instance.record).to eq(false) - - - + expect(instance.record).to eq(false) end end describe 'test attribute "wait_url"' do - it 'should work' do - + it "should work" do instance.wait_url = "TEST_STRING" - expect(instance.wait_url).to eq("TEST_STRING") - - - + expect(instance.wait_url).to eq("TEST_STRING") end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CreateConferenceRequest' do - expect { instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::CreateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::CreateConferenceRequest" do + expect { + Freeclimb::CreateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CreateConferenceRequest.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CreateConferenceRequest.new( _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - + status_callback_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CreateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::CreateConferenceRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::CreateConferenceRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" ) instance_2 = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" ) instance_2 = Freeclimb::CreateConferenceRequest.new( - - _alias: "ST", - - - - - - - play_beep: nil, - - record: false, - - - - - wait_url: "ST", - - - - - status_callback_url: "ST", - - - + _alias: "ST", + + play_beep: nil, + + record: false, + + wait_url: "ST", + + status_callback_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - - ) + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) instance_2 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -431,174 +248,86 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - wait_url: "TS", - - - - - status_callback_url: "TS", - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" ) - it 'deserializes the data of _alias' do + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of record' do + + it "deserializes the data of record" do expect(instance._deserialize("Boolean", instance.record)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of wait_url' do + it "deserializes the data of wait_url" do expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of status_callback_url' do + + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) instance_2 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + wait_url: "TS", - - - - - status_callback_url: "TS", - - - + + status_callback_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -606,40 +335,30 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CreateConferenceRequest.new( - - _alias: "TS", - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - record: true, - - - - wait_url: "TS", - - - - status_callback_url: "TS", - - ) - it 'returns _alias in the form of hash' do + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + wait_url: "TS", + + status_callback_url: "TS" + ) + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns record in the form of hash' do + it "returns record in the form of hash" do expect(instance._to_hash(instance.record)).to eq(instance.record) end - it 'returns wait_url in the form of hash' do + it "returns wait_url in the form of hash" do expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end end - end diff --git a/spec/models/create_conference_spec.rb b/spec/models/create_conference_spec.rb index 42c69b6e..d532abc7 100644 --- a/spec/models/create_conference_spec.rb +++ b/spec/models/create_conference_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CreateConference @@ -21,463 +19,256 @@ describe Freeclimb::CreateConference do let(:instance) { Freeclimb::CreateConference.new } - describe 'test an instance of CreateConference' do - it 'should create an instance of CreateConference' do + describe "test an instance of CreateConference" do + it "should create an instance of CreateConference" do expect(instance).to be_instance_of(Freeclimb::CreateConference) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do + it "should work" do instance._alias = false - expect(instance._alias).to eq(false) - - - + expect(instance._alias).to eq(false) end end - describe 'test attribute "play_beep"' do - it 'assigns value ALWAYS' do + it "assigns value ALWAYS" do instance.play_beep = Freeclimb::PlayBeep::ALWAYS - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) end - it 'assigns value NEVER' do + it "assigns value NEVER" do instance.play_beep = Freeclimb::PlayBeep::NEVER - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) end - it 'assigns value ENTRY_ONLY' do + it "assigns value ENTRY_ONLY" do instance.play_beep = Freeclimb::PlayBeep::ENTRY_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) end - it 'assigns value EXIT_ONLY' do + it "assigns value EXIT_ONLY" do instance.play_beep = Freeclimb::PlayBeep::EXIT_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) end end describe 'test attribute "record"' do - it 'should work' do + it "should work" do instance.record = false - expect(instance.record).to eq(false) - - - + expect(instance.record).to eq(false) end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test attribute "wait_url"' do - it 'should work' do - + it "should work" do instance.wait_url = "TEST_STRING" - expect(instance.wait_url).to eq("TEST_STRING") - - - + expect(instance.wait_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CreateConference' do - expect { instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::CreateConference.new( + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" + ) + }.not_to raise_error end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CreateConference.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::CreateConference" do + expect { + Freeclimb::CreateConference.new( action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - + wait_url: "TS", - - - - ) - expect(instance.valid?).to eq(true) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CreateConference.new( + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS", + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end - skip 'checks if properties are invalid' do + describe 'test method "valid"' do + it "checks if properties are valid" do instance = Freeclimb::CreateConference.new( - + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CreateConference.new + expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" ) instance_2 = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" ) instance_2 = Freeclimb::CreateConference.new( - - action_url: "ST", - - - - _alias: false, - - - - - - - play_beep: nil, - - record: false, - - - - - status_callback_url: "ST", - - - - - wait_url: "ST", - - - + action_url: "ST", + + _alias: false, + + play_beep: nil, + + record: false, + + status_callback_url: "ST", + + wait_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - - ) + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) instance_2 = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -486,200 +277,100 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - - _alias: true, - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - record: true, - - - - - status_callback_url: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("Boolean", instance._alias)).to be_a_kind_of(TrueClass) end - - - - - it 'deserializes the data of record' do + + it "deserializes the data of record" do expect(instance._deserialize("Boolean", instance.record)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of status_callback_url' do + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of wait_url' do + + it "deserializes the data of wait_url" do expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) instance_2 = Freeclimb::CreateConference.new( - action_url: "TS", - - - + _alias: true, - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - + record: true, - - - - + status_callback_url: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -687,46 +378,35 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CreateConference.new( - - action_url: "TS", - - - _alias: true, - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - record: true, - - - - status_callback_url: "TS", - - - - wait_url: "TS", - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + _alias: true, + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + record: true, + + status_callback_url: "TS", + + wait_url: "TS" + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns record in the form of hash' do + it "returns record in the form of hash" do expect(instance._to_hash(instance.record)).to eq(instance.record) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end - it 'returns wait_url in the form of hash' do + it "returns wait_url in the form of hash" do expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url) end end - end diff --git a/spec/models/create_conference_webhook_spec.rb b/spec/models/create_conference_webhook_spec.rb index 44e62792..fa213f46 100644 --- a/spec/models/create_conference_webhook_spec.rb +++ b/spec/models/create_conference_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CreateConferenceWebhook @@ -21,980 +19,500 @@ describe Freeclimb::CreateConferenceWebhook do let(:instance) { Freeclimb::CreateConferenceWebhook.new } - describe 'test an instance of CreateConferenceWebhook' do - it 'should create an instance of CreateConferenceWebhook' do + describe "test an instance of CreateConferenceWebhook" do + it "should create an instance of CreateConferenceWebhook" do expect(instance).to be_instance_of(Freeclimb::CreateConferenceWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of CreateConferenceWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of CreateConferenceWebhook" do payload = '{ "requestType": "createConference" }' expect(Freeclimb::CreateConferenceWebhook.deserialize(payload)).to be_instance_of(Freeclimb::CreateConferenceWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::ConferenceStatus::EMPTY - expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY) end - it 'assigns value POPULATED' do + it "assigns value POPULATED" do instance.status = Freeclimb::ConferenceStatus::POPULATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS - expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::ConferenceStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED) end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_sec"' do - it 'should work' do - - + it "should work" do instance.recording_duration_sec = 1 expect(instance.recording_duration_sec).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CreateConferenceWebhook' do - expect { instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::CreateConferenceWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::CreateConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + recording_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::CreateConferenceWebhook.new( - - ) - expect(instance.valid?).to eq(false) + recording_duration_sec: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::CreateConferenceWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::CreateConferenceWebhook" do + expect { + Freeclimb::CreateConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - + recording_duration_sec: 1, - - - - ) - instance_2 = Freeclimb::CreateConferenceWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CreateConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - - + recording_duration_sec: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CreateConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CreateConferenceWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::CreateConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + instance_2 = Freeclimb::CreateConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 2, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 2 ) instance_2 = Freeclimb::CreateConferenceWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - status: nil, - - - recording_url: "ST", - - - - - recording_id: "ST", - - - - recording_duration_sec: 1, - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + status: nil, + + recording_url: "ST", + + recording_id: "ST", + + recording_duration_sec: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -1003,416 +521,191 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - - recording_url: "TS", - - - - - recording_id: "TS", - - - - recording_duration_sec: 1, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_sec' do + + it "deserializes the data of recording_duration_sec" do expect(instance._deserialize("Integer", instance.recording_duration_sec)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) instance_2 = Freeclimb::CreateConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + status: Freeclimb::ConferenceStatus::EMPTY, - - - - + recording_url: "TS", - - - - + recording_id: "TS", - - - - recording_duration_sec: 1, - - - + + recording_duration_sec: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1420,96 +713,70 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CreateConferenceWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - status: Freeclimb::ConferenceStatus::EMPTY, - - - - recording_url: "TS", - - - - recording_id: "TS", - - - recording_duration_sec: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + status: Freeclimb::ConferenceStatus::EMPTY, + + recording_url: "TS", + + recording_id: "TS", + + recording_duration_sec: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_duration_sec in the form of hash' do + it "returns recording_duration_sec in the form of hash" do expect(instance._to_hash(instance.recording_duration_sec)).to eq(instance.recording_duration_sec) end end - end diff --git a/spec/models/create_web_rtc_token_spec.rb b/spec/models/create_web_rtc_token_spec.rb index b23e34fb..817b2210 100644 --- a/spec/models/create_web_rtc_token_spec.rb +++ b/spec/models/create_web_rtc_token_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::CreateWebRTCToken @@ -21,269 +19,158 @@ describe Freeclimb::CreateWebRTCToken do let(:instance) { Freeclimb::CreateWebRTCToken.new } - describe 'test an instance of CreateWebRTCToken' do - it 'should create an instance of CreateWebRTCToken' do + describe "test an instance of CreateWebRTCToken" do + it "should create an instance of CreateWebRTCToken" do expect(instance).to be_instance_of(Freeclimb::CreateWebRTCToken) end end - + describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "uses"' do - it 'should work' do - + it "should work" do instance.uses = 1 - expect(instance.uses).to eq(1) - - - - - + expect(instance.uses).to eq(1) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::CreateWebRTCToken.new( + to: "TS", + + from: "TS", + + uses: 1 + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::CreateWebRTCToken' do - expect { instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::CreateWebRTCToken" do + expect { + Freeclimb::CreateWebRTCToken.new( + to: "TS", + + from: "TS", + + uses: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CreateWebRTCToken.new( + to: "TS", + + from: "TS", + + uses: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - + to: "TS", + + from: "TS", + + uses: 1 ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::CreateWebRTCToken.new - skip 'checks if properties are invalid' do - instance = Freeclimb::CreateWebRTCToken.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - + to: "TS", + + from: "TS", + + uses: 1 ) instance_2 = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - - - uses: 1, - + to: "TS", + + from: "TS", + + uses: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1 + 1, - - - + to: "TS", + + from: "TS", + + uses: 1 + 1 ) instance_2 = Freeclimb::CreateWebRTCToken.new( - - to: "ST", - - - - - from: "ST", - - - - uses: 1 + 2, - - - + to: "ST", + + from: "ST", + + uses: 1 + 2 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - - ) + to: "TS", + + from: "TS", + + uses: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) instance_2 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -292,115 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - - from: "TS", - - - - uses: 1, - - - + to: "TS", + + from: "TS", + + uses: 1 ) - it 'deserializes the data of to' do + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of uses' do + + it "deserializes the data of uses" do expect(instance._deserialize("Integer", instance.uses)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) instance_2 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - - - - + from: "TS", - - - - uses: 1, - - - + + uses: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -408,26 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CreateWebRTCToken.new( - - to: "TS", - - - - from: "TS", - - - uses: 1, - - ) - it 'returns to in the form of hash' do + to: "TS", + + from: "TS", + + uses: 1 + ) + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns uses in the form of hash' do + it "returns uses in the form of hash" do expect(instance._to_hash(instance.uses)).to eq(instance.uses) end end - end diff --git a/spec/models/dequeue_spec.rb b/spec/models/dequeue_spec.rb index 5b774140..153cdf5f 100644 --- a/spec/models/dequeue_spec.rb +++ b/spec/models/dequeue_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Dequeue @@ -21,10 +19,9 @@ describe Freeclimb::Dequeue do let(:instance) { Freeclimb::Dequeue.new } - describe 'test an instance of Dequeue' do - it 'should create an instance of Dequeue' do + describe "test an instance of Dequeue" do + it "should create an instance of Dequeue" do expect(instance).to be_instance_of(Freeclimb::Dequeue) end end - end diff --git a/spec/models/dequeue_webhook_spec.rb b/spec/models/dequeue_webhook_spec.rb index 471db6c0..f489b659 100644 --- a/spec/models/dequeue_webhook_spec.rb +++ b/spec/models/dequeue_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::DequeueWebhook @@ -21,838 +19,431 @@ describe Freeclimb::DequeueWebhook do let(:instance) { Freeclimb::DequeueWebhook.new } - describe 'test an instance of DequeueWebhook' do - it 'should create an instance of DequeueWebhook' do + describe "test an instance of DequeueWebhook" do + it "should create an instance of DequeueWebhook" do expect(instance).to be_instance_of(Freeclimb::DequeueWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of DequeueWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of DequeueWebhook" do payload = '{ "requestType": "dequeue" }' expect(Freeclimb::DequeueWebhook.deserialize(payload)).to be_instance_of(Freeclimb::DequeueWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "queue_result"' do - it 'should work' do - + it "should work" do instance.queue_result = "TEST_STRING" - expect(instance.queue_result).to eq("TEST_STRING") - - - + expect(instance.queue_result).to eq("TEST_STRING") end end describe 'test attribute "queue_time"' do - it 'should work' do - - + it "should work" do instance.queue_time = 1 expect(instance.queue_time).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::DequeueWebhook' do - expect { instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::DequeueWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::DequeueWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + queue_result: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::DequeueWebhook.new( - - ) - expect(instance.valid?).to eq(false) + queue_time: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::DequeueWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::DequeueWebhook" do + expect { + Freeclimb::DequeueWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - + queue_time: 1, - - - - ) - instance_2 = Freeclimb::DequeueWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::DequeueWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - - + queue_time: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::DequeueWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::DequeueWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::DequeueWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 + ) + instance_2 = Freeclimb::DequeueWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 2, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 2 ) instance_2 = Freeclimb::DequeueWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - queue_result: "ST", - - - - queue_time: 1, - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + queue_result: "ST", + + queue_time: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) instance_2 = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -861,357 +452,167 @@ describe 'test method "_deserialize"' do instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: "TS", - - - - queue_time: 1, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_result' do + + it "deserializes the data of queue_result" do expect(instance._deserialize("String", instance.queue_result)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_time' do + + it "deserializes the data of queue_time" do expect(instance._deserialize("Integer", instance.queue_time)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) instance_2 = Freeclimb::DequeueWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: "TS", - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1219,82 +620,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::DequeueWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - queue_result: "TS", - - - queue_time: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: "TS", + + queue_time: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns queue_result in the form of hash' do + it "returns queue_result in the form of hash" do expect(instance._to_hash(instance.queue_result)).to eq(instance.queue_result) end - it 'returns queue_time in the form of hash' do + it "returns queue_time in the form of hash" do expect(instance._to_hash(instance.queue_time)).to eq(instance.queue_time) end end - end diff --git a/spec/models/enqueue_spec.rb b/spec/models/enqueue_spec.rb index 3956c0c5..daa4c7e1 100644 --- a/spec/models/enqueue_spec.rb +++ b/spec/models/enqueue_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Enqueue @@ -21,345 +19,187 @@ describe Freeclimb::Enqueue do let(:instance) { Freeclimb::Enqueue.new } - describe 'test an instance of Enqueue' do - it 'should create an instance of Enqueue' do + describe "test an instance of Enqueue" do + it "should create an instance of Enqueue" do expect(instance).to be_instance_of(Freeclimb::Enqueue) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "wait_url"' do - it 'should work' do - + it "should work" do instance.wait_url = "TEST_STRING" - expect(instance.wait_url).to eq("TEST_STRING") - - - + expect(instance.wait_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Enqueue' do - expect { instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Enqueue.new( + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Enqueue" do + expect { + Freeclimb::Enqueue.new( + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::Enqueue.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Enqueue.new( action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - + wait_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::Enqueue.new( + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Enqueue.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Enqueue.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" ) instance_2 = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" ) instance_2 = Freeclimb::Enqueue.new( - - action_url: "ST", - - - - - notification_url: "ST", - - - - - queue_id: "ST", - - - - - wait_url: "ST", - - - + action_url: "ST", + + notification_url: "ST", + + queue_id: "ST", + + wait_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - - ) + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) instance_2 = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -368,151 +208,77 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - - notification_url: "TS", - - - - - queue_id: "TS", - - - - - wait_url: "TS", - - - + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of notification_url' do + + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of wait_url' do + + it "deserializes the data of wait_url" do expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) instance_2 = Freeclimb::Enqueue.new( - action_url: "TS", - - - - + notification_url: "TS", - - - - + queue_id: "TS", - - - - - wait_url: "TS", - - - + + wait_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -520,34 +286,25 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Enqueue.new( - - action_url: "TS", - - - - notification_url: "TS", - - - - queue_id: "TS", - - - - wait_url: "TS", - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + notification_url: "TS", + + queue_id: "TS", + + wait_url: "TS" + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns wait_url in the form of hash' do + it "returns wait_url in the form of hash" do expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url) end end - end diff --git a/spec/models/filter_logs_request_spec.rb b/spec/models/filter_logs_request_spec.rb index cc76fff7..b8f5cf37 100644 --- a/spec/models/filter_logs_request_spec.rb +++ b/spec/models/filter_logs_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::FilterLogsRequest @@ -21,144 +19,100 @@ describe Freeclimb::FilterLogsRequest do let(:instance) { Freeclimb::FilterLogsRequest.new } - describe 'test an instance of FilterLogsRequest' do - it 'should create an instance of FilterLogsRequest' do + describe "test an instance of FilterLogsRequest" do + it "should create an instance of FilterLogsRequest" do expect(instance).to be_instance_of(Freeclimb::FilterLogsRequest) end end - + describe 'test attribute "pql"' do - it 'should work' do - + it "should work" do instance.pql = "TEST_STRING" - expect(instance.pql).to eq("TEST_STRING") - - - + expect(instance.pql).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::FilterLogsRequest' do - expect { instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::FilterLogsRequest.new( + pql: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::FilterLogsRequest" do + expect { + Freeclimb::FilterLogsRequest.new( + pql: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::FilterLogsRequest.new( + pql: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::FilterLogsRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::FilterLogsRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) instance_2 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) instance_2 = Freeclimb::FilterLogsRequest.new( - - pql: "ST", - - - + pql: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - - ) + pql: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) instance_2 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) - it 'deserializes the data of pql' do + it "deserializes the data of pql" do expect(instance._deserialize("String", instance.pql)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) instance_2 = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - - + pql: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::FilterLogsRequest.new( - - pql: "TS", - - ) - it 'returns pql in the form of hash' do + pql: "TS" + ) + it "returns pql in the form of hash" do expect(instance._to_hash(instance.pql)).to eq(instance.pql) end end - end diff --git a/spec/models/get_digits_reason_spec.rb b/spec/models/get_digits_reason_spec.rb index 54b9fbe5..7286338f 100644 --- a/spec/models/get_digits_reason_spec.rb +++ b/spec/models/get_digits_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetDigitsReason @@ -21,22 +19,22 @@ describe Freeclimb::GetDigitsReason do let(:instance) { Freeclimb::GetDigitsReason.new } - describe 'test an instance of GetDigitsReason' do - it 'should create an instance of GetDigitsReason' do + describe "test an instance of GetDigitsReason" do + it "should create an instance of GetDigitsReason" do expect(instance).to be_instance_of(Freeclimb::GetDigitsReason) end end - + describe 'test attribute "FINISH_KEY"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetDigitsReason::FINISH_KEY = "finishKey" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetDigitsReason::FINISH_KEY - calculatedValue = Freeclimb::GetDigitsReason::build_from_hash("finishKey") + calculatedValue = Freeclimb::GetDigitsReason.build_from_hash("finishKey") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "finishKey" calculatedValue = Freeclimb::GetDigitsReason::FINISH_KEY expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "TIMEOUT"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetDigitsReason::TIMEOUT = "timeout" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetDigitsReason::TIMEOUT - calculatedValue = Freeclimb::GetDigitsReason::build_from_hash("timeout") + calculatedValue = Freeclimb::GetDigitsReason.build_from_hash("timeout") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "timeout" calculatedValue = Freeclimb::GetDigitsReason::TIMEOUT expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "MAX_DIGITS"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetDigitsReason::MAX_DIGITS = "maxDigits" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetDigitsReason::MAX_DIGITS - calculatedValue = Freeclimb::GetDigitsReason::build_from_hash("maxDigits") + calculatedValue = Freeclimb::GetDigitsReason.build_from_hash("maxDigits") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "maxDigits" calculatedValue = Freeclimb::GetDigitsReason::MAX_DIGITS expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "TONE"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetDigitsReason::TONE = "tone" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetDigitsReason::TONE - calculatedValue = Freeclimb::GetDigitsReason::build_from_hash("tone") + calculatedValue = Freeclimb::GetDigitsReason.build_from_hash("tone") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "tone" calculatedValue = Freeclimb::GetDigitsReason::TONE expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/get_digits_spec.rb b/spec/models/get_digits_spec.rb index 05302217..3b30f3b5 100644 --- a/spec/models/get_digits_spec.rb +++ b/spec/models/get_digits_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetDigits @@ -21,604 +19,332 @@ describe Freeclimb::GetDigits do let(:instance) { Freeclimb::GetDigits.new } - describe 'test an instance of GetDigits' do - it 'should create an instance of GetDigits' do + describe "test an instance of GetDigits" do + it "should create an instance of GetDigits" do expect(instance).to be_instance_of(Freeclimb::GetDigits) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "digit_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.digit_timeout_ms = 1 expect(instance.digit_timeout_ms).to eq(1) - - - end end describe 'test attribute "finish_on_key"' do - it 'should work' do - + it "should work" do instance.finish_on_key = "TEST_STRING" - expect(instance.finish_on_key).to eq("TEST_STRING") - - - + expect(instance.finish_on_key).to eq("TEST_STRING") end end describe 'test attribute "flush_buffer"' do - it 'should work' do + it "should work" do instance.flush_buffer = false - expect(instance.flush_buffer).to eq(false) - - - + expect(instance.flush_buffer).to eq(false) end end describe 'test attribute "initial_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.initial_timeout_ms = 1 expect(instance.initial_timeout_ms).to eq(1) - - - end end describe 'test attribute "max_digits"' do - it 'should work' do - - + it "should work" do instance.max_digits = 1 expect(instance.max_digits).to eq(1) - - - end end describe 'test attribute "min_digits"' do - it 'should work' do - - + it "should work" do instance.min_digits = 1 expect(instance.min_digits).to eq(1) - - - end end describe 'test attribute "prompts"' do - it 'should work' do - + it "should work" do instance.prompts = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::GetDigits' do - expect { instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::GetDigits.new( - + it "properly initializes with values" do + expect { + Freeclimb::GetDigits.new( action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - - ) - expect(instance.valid?).to eq(true) - end + prompts: [], - skip 'checks if properties are invalid' do - instance = Freeclimb::GetDigits.new( - - ) - expect(instance.valid?).to eq(false) + privacy_mode: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::GetDigits.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::GetDigits" do + expect { + Freeclimb::GetDigits.new( action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - - + prompts: [], - + privacy_mode: true, - - - - ) - instance_2 = Freeclimb::GetDigits.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::GetDigits.new( action_url: "TS", - - - - - + digit_timeout_ms: 1, - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - + prompts: [], - + privacy_mode: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::GetDigits.new( + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::GetDigits.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::GetDigits.new( + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true + ) + instance_2 = Freeclimb::GetDigits.new( + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 2, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 2, - - - - max_digits: 2, - - - - min_digits: 2, - - - - - - prompts: [], - - privacy_mode: true, - - - + action_url: "TS", + + digit_timeout_ms: 2, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 2, + + max_digits: 2, + + min_digits: 2, + + prompts: [], + + privacy_mode: true ) instance_2 = Freeclimb::GetDigits.new( - - action_url: "ST", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "ST", - - - - flush_buffer: false, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - - - prompts: nil, - - privacy_mode: false, - - - + action_url: "ST", + + digit_timeout_ms: 1, + + finish_on_key: "ST", + + flush_buffer: false, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: nil, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - - ) + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) instance_2 = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -627,271 +353,146 @@ describe 'test method "_deserialize"' do instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - - digit_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - flush_buffer: true, - - - - initial_timeout_ms: 1, - - - - max_digits: 1, - - - - min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of digit_timeout_ms' do + + it "deserializes the data of digit_timeout_ms" do expect(instance._deserialize("Integer", instance.digit_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of finish_on_key' do + + it "deserializes the data of finish_on_key" do expect(instance._deserialize("String", instance.finish_on_key)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of flush_buffer' do + + it "deserializes the data of flush_buffer" do expect(instance._deserialize("Boolean", instance.flush_buffer)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of initial_timeout_ms' do + it "deserializes the data of initial_timeout_ms" do expect(instance._deserialize("Integer", instance.initial_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of max_digits' do + + it "deserializes the data of max_digits" do expect(instance._deserialize("Integer", instance.max_digits)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of min_digits' do + + it "deserializes the data of min_digits" do expect(instance._deserialize("Integer", instance.min_digits)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of prompts' do + + it "deserializes the data of prompts" do expect(instance._deserialize("Array", instance.prompts)).to be_a_kind_of(Array) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) instance_2 = Freeclimb::GetDigits.new( - action_url: "TS", - - - + digit_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + flush_buffer: true, - - - + initial_timeout_ms: 1, - - - + max_digits: 1, - - - + min_digits: 1, - - - - prompts: Array.new(), - - - - privacy_mode: true, - - - + + prompts: [], + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -899,62 +500,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::GetDigits.new( - - action_url: "TS", - - - digit_timeout_ms: 1, - - - - finish_on_key: "TS", - - - flush_buffer: true, - - - initial_timeout_ms: 1, - - - max_digits: 1, - - - min_digits: 1, - - - prompts: Array.new(), - - - privacy_mode: true, - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + digit_timeout_ms: 1, + + finish_on_key: "TS", + + flush_buffer: true, + + initial_timeout_ms: 1, + + max_digits: 1, + + min_digits: 1, + + prompts: [], + + privacy_mode: true + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns digit_timeout_ms in the form of hash' do + it "returns digit_timeout_ms in the form of hash" do expect(instance._to_hash(instance.digit_timeout_ms)).to eq(instance.digit_timeout_ms) end - it 'returns finish_on_key in the form of hash' do + it "returns finish_on_key in the form of hash" do expect(instance._to_hash(instance.finish_on_key)).to eq(instance.finish_on_key) end - it 'returns flush_buffer in the form of hash' do + it "returns flush_buffer in the form of hash" do expect(instance._to_hash(instance.flush_buffer)).to eq(instance.flush_buffer) end - it 'returns initial_timeout_ms in the form of hash' do + it "returns initial_timeout_ms in the form of hash" do expect(instance._to_hash(instance.initial_timeout_ms)).to eq(instance.initial_timeout_ms) end - it 'returns max_digits in the form of hash' do + it "returns max_digits in the form of hash" do expect(instance._to_hash(instance.max_digits)).to eq(instance.max_digits) end - it 'returns min_digits in the form of hash' do + it "returns min_digits in the form of hash" do expect(instance._to_hash(instance.min_digits)).to eq(instance.min_digits) end - it 'returns prompts in the form of hash' do + it "returns prompts in the form of hash" do expect(instance._to_hash(instance.prompts)).to eq(instance.prompts) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/get_digits_webhook_spec.rb b/spec/models/get_digits_webhook_spec.rb index c4bcb3c7..89ee2cfc 100644 --- a/spec/models/get_digits_webhook_spec.rb +++ b/spec/models/get_digits_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetDigitsWebhook @@ -21,923 +19,471 @@ describe Freeclimb::GetDigitsWebhook do let(:instance) { Freeclimb::GetDigitsWebhook.new } - describe 'test an instance of GetDigitsWebhook' do - it 'should create an instance of GetDigitsWebhook' do + describe "test an instance of GetDigitsWebhook" do + it "should create an instance of GetDigitsWebhook" do expect(instance).to be_instance_of(Freeclimb::GetDigitsWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of GetDigitsWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of GetDigitsWebhook" do payload = '{ "requestType": "getDigits" }' expect(Freeclimb::GetDigitsWebhook.deserialize(payload)).to be_instance_of(Freeclimb::GetDigitsWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "digits"' do - it 'should work' do - + it "should work" do instance.digits = "TEST_STRING" - expect(instance.digits).to eq("TEST_STRING") - - - + expect(instance.digits).to eq("TEST_STRING") end end - describe 'test attribute "reason"' do - it 'assigns value FINISH_KEY' do + it "assigns value FINISH_KEY" do instance.reason = Freeclimb::GetDigitsReason::FINISH_KEY - expect(instance.reason).to eq(Freeclimb::GetDigitsReason::FINISH_KEY) + expect(instance.reason).to eq(Freeclimb::GetDigitsReason::FINISH_KEY) end - it 'assigns value TIMEOUT' do + it "assigns value TIMEOUT" do instance.reason = Freeclimb::GetDigitsReason::TIMEOUT - expect(instance.reason).to eq(Freeclimb::GetDigitsReason::TIMEOUT) + expect(instance.reason).to eq(Freeclimb::GetDigitsReason::TIMEOUT) end - it 'assigns value MAX_DIGITS' do + it "assigns value MAX_DIGITS" do instance.reason = Freeclimb::GetDigitsReason::MAX_DIGITS - expect(instance.reason).to eq(Freeclimb::GetDigitsReason::MAX_DIGITS) + expect(instance.reason).to eq(Freeclimb::GetDigitsReason::MAX_DIGITS) end - it 'assigns value TONE' do + it "assigns value TONE" do instance.reason = Freeclimb::GetDigitsReason::TONE - expect(instance.reason).to eq(Freeclimb::GetDigitsReason::TONE) + expect(instance.reason).to eq(Freeclimb::GetDigitsReason::TONE) end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::GetDigitsWebhook' do - expect { instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::GetDigitsWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::GetDigitsWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - skip 'checks if properties are invalid' do - instance = Freeclimb::GetDigitsWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - instance_1 = Freeclimb::GetDigitsWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::GetDigitsWebhook" do + expect { + Freeclimb::GetDigitsWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::GetDigitsWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::GetDigitsWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::GetDigitsWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::GetDigitsWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::GetDigitsWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::GetDigitsWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - parent_call_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" ) instance_2 = Freeclimb::GetDigitsWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - digits: "ST", - - - - - - - reason: nil, - - - parent_call_id: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + digits: "ST", + + reason: nil, + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -946,390 +492,177 @@ describe 'test method "_deserialize"' do instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - digits: "TS", - - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of digits' do + + it "deserializes the data of digits" do expect(instance._deserialize("String", instance.digits)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::GetDigitsWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + digits: "TS", - - - - + reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1337,90 +670,65 @@ describe 'test method "_to_hash"' do instance = Freeclimb::GetDigitsWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - digits: "TS", - - - - reason: Freeclimb::GetDigitsReason::FINISH_KEY, - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + digits: "TS", + + reason: Freeclimb::GetDigitsReason::FINISH_KEY, + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns digits in the form of hash' do + it "returns digits in the form of hash" do expect(instance._to_hash(instance.digits)).to eq(instance.digits) end - it 'returns reason in the form of hash' do + it "returns reason in the form of hash" do expect(instance._to_hash(instance.reason)).to eq(instance.reason) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/get_speech_reason_spec.rb b/spec/models/get_speech_reason_spec.rb index b73ad308..9f80fb9f 100644 --- a/spec/models/get_speech_reason_spec.rb +++ b/spec/models/get_speech_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetSpeechReason @@ -21,22 +19,22 @@ describe Freeclimb::GetSpeechReason do let(:instance) { Freeclimb::GetSpeechReason.new } - describe 'test an instance of GetSpeechReason' do - it 'should create an instance of GetSpeechReason' do + describe "test an instance of GetSpeechReason" do + it "should create an instance of GetSpeechReason" do expect(instance).to be_instance_of(Freeclimb::GetSpeechReason) end end - + describe 'test attribute "ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::ERROR = "error" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::ERROR - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("error") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("error") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "error" calculatedValue = Freeclimb::GetSpeechReason::ERROR expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::HANGUP = "hangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::HANGUP - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("hangup") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("hangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "hangup" calculatedValue = Freeclimb::GetSpeechReason::HANGUP expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "DIGIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::DIGIT = "digit" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::DIGIT - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("digit") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("digit") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "digit" calculatedValue = Freeclimb::GetSpeechReason::DIGIT expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "NO_INPUT"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::NO_INPUT = "noInput" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::NO_INPUT - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("noInput") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("noInput") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noInput" calculatedValue = Freeclimb::GetSpeechReason::NO_INPUT expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "NO_MATCH"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::NO_MATCH = "noMatch" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::NO_MATCH - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("noMatch") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("noMatch") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noMatch" calculatedValue = Freeclimb::GetSpeechReason::NO_MATCH expect(expectedValue).to eq(calculatedValue) @@ -108,19 +106,18 @@ end describe 'test attribute "RECOGNITION"' do - it 'should work' do + it "should work" do expect { Freeclimb::GetSpeechReason::RECOGNITION = "recognition" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GetSpeechReason::RECOGNITION - calculatedValue = Freeclimb::GetSpeechReason::build_from_hash("recognition") + calculatedValue = Freeclimb::GetSpeechReason.build_from_hash("recognition") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "recognition" calculatedValue = Freeclimb::GetSpeechReason::RECOGNITION expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/get_speech_spec.rb b/spec/models/get_speech_spec.rb index 0d948571..2095f558 100644 --- a/spec/models/get_speech_spec.rb +++ b/spec/models/get_speech_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetSpeech @@ -21,832 +19,411 @@ describe Freeclimb::GetSpeech do let(:instance) { Freeclimb::GetSpeech.new } - describe 'test an instance of GetSpeech' do - it 'should create an instance of GetSpeech' do + describe "test an instance of GetSpeech" do + it "should create an instance of GetSpeech" do expect(instance).to be_instance_of(Freeclimb::GetSpeech) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end - describe 'test attribute "grammar_type"' do - it 'assigns value URL' do + it "assigns value URL" do instance.grammar_type = Freeclimb::GrammarType::URL - expect(instance.grammar_type).to eq(Freeclimb::GrammarType::URL) + expect(instance.grammar_type).to eq(Freeclimb::GrammarType::URL) end - it 'assigns value BUILT_IN' do + it "assigns value BUILT_IN" do instance.grammar_type = Freeclimb::GrammarType::BUILT_IN - expect(instance.grammar_type).to eq(Freeclimb::GrammarType::BUILT_IN) + expect(instance.grammar_type).to eq(Freeclimb::GrammarType::BUILT_IN) end end describe 'test attribute "grammar_file"' do - it 'should work' do - + it "should work" do instance.grammar_file = "TEST_STRING" - expect(instance.grammar_file).to eq("TEST_STRING") - - - + expect(instance.grammar_file).to eq("TEST_STRING") end end describe 'test attribute "grammar_rule"' do - it 'should work' do - + it "should work" do instance.grammar_rule = "TEST_STRING" - expect(instance.grammar_rule).to eq("TEST_STRING") - - - + expect(instance.grammar_rule).to eq("TEST_STRING") end end describe 'test attribute "play_beep"' do - it 'should work' do + it "should work" do instance.play_beep = false - expect(instance.play_beep).to eq(false) - - - + expect(instance.play_beep).to eq(false) end end describe 'test attribute "prompts"' do - it 'should work' do - + it "should work" do instance.prompts = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test attribute "no_input_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.no_input_timeout_ms = 1 expect(instance.no_input_timeout_ms).to eq(1) - - - end end describe 'test attribute "recognition_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.recognition_timeout_ms = 1 expect(instance.recognition_timeout_ms).to eq(1) - - - end end describe 'test attribute "confidence_threshold"' do - it 'should work' do - - + it "should work" do instance.confidence_threshold = 1.0 expect(instance.confidence_threshold).to eq(1.0) - - - end end describe 'test attribute "sensitivity_level"' do - it 'should work' do - - + it "should work" do instance.sensitivity_level = 1.0 expect(instance.sensitivity_level).to eq(1.0) - - - end end describe 'test attribute "speech_complete_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.speech_complete_timeout_ms = 1 expect(instance.speech_complete_timeout_ms).to eq(1) - - - end end describe 'test attribute "speech_incomplete_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.speech_incomplete_timeout_ms = 1 expect(instance.speech_incomplete_timeout_ms).to eq(1) - - - end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - prompts: Array.new(), - - - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::GetSpeech' do - expect { instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - prompts: Array.new(), - - - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - prompts: Array.new(), - - - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::GetSpeech.new( - + it "properly initializes with values" do + expect { + Freeclimb::GetSpeech.new( action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - confidence_threshold: 1, - - - - sensitivity_level: 1, - - - + speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - - ) - expect(instance.valid?).to eq(true) - end + speech_incomplete_timeout_ms: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::GetSpeech.new( - - ) - expect(instance.valid?).to eq(false) + privacy_mode: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - instance_1 = Freeclimb::GetSpeech.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::GetSpeech" do + expect { + Freeclimb::GetSpeech.new( action_url: "TS", - - - - - - + grammar_type: Freeclimb::GrammarType::URL, - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - - + prompts: [], - + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - + privacy_mode: true, - - - - ) - instance_2 = Freeclimb::GetSpeech.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::GetSpeech.new( action_url: "TS", - - - - - - + grammar_type: Freeclimb::GrammarType::URL, - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - - + prompts: [], - - - + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - + privacy_mode: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::GetSpeech.new( + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + confidence_threshold: 1, + + sensitivity_level: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::GetSpeech.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::GetSpeech.new( + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true + ) + instance_2 = Freeclimb::GetSpeech.new( + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - - - prompts: [], - - no_input_timeout_ms: 2, - - - - recognition_timeout_ms: 2, - - - - - - - - - - speech_complete_timeout_ms: 2, - - - - speech_incomplete_timeout_ms: 2, - - - - privacy_mode: true, - - - + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 2, + + recognition_timeout_ms: 2, + + speech_complete_timeout_ms: 2, + + speech_incomplete_timeout_ms: 2, + + privacy_mode: true ) instance_2 = Freeclimb::GetSpeech.new( - - action_url: "ST", - - - - - - - grammar_type: nil, - - - grammar_file: "ST", - - - - - grammar_rule: "ST", - - - - play_beep: false, - - - - - - prompts: nil, - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: false, - - - + action_url: "ST", + + grammar_type: nil, + + grammar_file: "ST", + + grammar_rule: "ST", + + play_beep: false, + + prompts: nil, + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - prompts: Array.new(), - - - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - - ) + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -855,372 +432,178 @@ describe 'test method "_deserialize"' do instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - - grammar_file: "TS", - - - - - grammar_rule: "TS", - - - - play_beep: true, - - - - prompts: Array.new(), - - - - no_input_timeout_ms: 1, - - - - recognition_timeout_ms: 1, - - - - - - - - - - speech_complete_timeout_ms: 1, - - - - speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of grammar_file' do + + it "deserializes the data of grammar_file" do expect(instance._deserialize("String", instance.grammar_file)).to be_a_kind_of(String) end - - - it 'deserializes the data of grammar_rule' do + + it "deserializes the data of grammar_rule" do expect(instance._deserialize("String", instance.grammar_rule)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of play_beep' do + + it "deserializes the data of play_beep" do expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of prompts' do + it "deserializes the data of prompts" do expect(instance._deserialize("Array", instance.prompts)).to be_a_kind_of(Array) end - - - it 'deserializes the data of no_input_timeout_ms' do + + it "deserializes the data of no_input_timeout_ms" do expect(instance._deserialize("Integer", instance.no_input_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of recognition_timeout_ms' do + + it "deserializes the data of recognition_timeout_ms" do expect(instance._deserialize("Integer", instance.recognition_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of confidence_threshold' do + + it "deserializes the data of confidence_threshold" do expect(instance._deserialize("Float", instance.confidence_threshold)).to be_a_kind_of(Float) end - - - it 'deserializes the data of sensitivity_level' do + + it "deserializes the data of sensitivity_level" do expect(instance._deserialize("Float", instance.sensitivity_level)).to be_a_kind_of(Float) end - - - it 'deserializes the data of speech_complete_timeout_ms' do + + it "deserializes the data of speech_complete_timeout_ms" do expect(instance._deserialize("Integer", instance.speech_complete_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of speech_incomplete_timeout_ms' do + + it "deserializes the data of speech_incomplete_timeout_ms" do expect(instance._deserialize("Integer", instance.speech_incomplete_timeout_ms)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::GetSpeech.new( - action_url: "TS", - - - - + grammar_type: Freeclimb::GrammarType::URL, - - - - + grammar_file: "TS", - - - - + grammar_rule: "TS", - - - + play_beep: true, - - - - prompts: Array.new(), - - - + + prompts: [], + no_input_timeout_ms: 1, - - - + recognition_timeout_ms: 1, - - - - - - - - - + speech_complete_timeout_ms: 1, - - - + speech_incomplete_timeout_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1228,86 +611,66 @@ describe 'test method "_to_hash"' do instance = Freeclimb::GetSpeech.new( - - action_url: "TS", - - - - grammar_type: Freeclimb::GrammarType::URL, - - - - grammar_file: "TS", - - - - grammar_rule: "TS", - - - play_beep: true, - - - prompts: Array.new(), - - - no_input_timeout_ms: 1, - - - recognition_timeout_ms: 1, - - - - - - - speech_complete_timeout_ms: 1, - - - speech_incomplete_timeout_ms: 1, - - - privacy_mode: true, - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + grammar_type: Freeclimb::GrammarType::URL, + + grammar_file: "TS", + + grammar_rule: "TS", + + play_beep: true, + + prompts: [], + + no_input_timeout_ms: 1, + + recognition_timeout_ms: 1, + + speech_complete_timeout_ms: 1, + + speech_incomplete_timeout_ms: 1, + + privacy_mode: true + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns grammar_type in the form of hash' do + it "returns grammar_type in the form of hash" do expect(instance._to_hash(instance.grammar_type)).to eq(instance.grammar_type) end - it 'returns grammar_file in the form of hash' do + it "returns grammar_file in the form of hash" do expect(instance._to_hash(instance.grammar_file)).to eq(instance.grammar_file) end - it 'returns grammar_rule in the form of hash' do + it "returns grammar_rule in the form of hash" do expect(instance._to_hash(instance.grammar_rule)).to eq(instance.grammar_rule) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns prompts in the form of hash' do + it "returns prompts in the form of hash" do expect(instance._to_hash(instance.prompts)).to eq(instance.prompts) end - it 'returns no_input_timeout_ms in the form of hash' do + it "returns no_input_timeout_ms in the form of hash" do expect(instance._to_hash(instance.no_input_timeout_ms)).to eq(instance.no_input_timeout_ms) end - it 'returns recognition_timeout_ms in the form of hash' do + it "returns recognition_timeout_ms in the form of hash" do expect(instance._to_hash(instance.recognition_timeout_ms)).to eq(instance.recognition_timeout_ms) end - it 'returns confidence_threshold in the form of hash' do + it "returns confidence_threshold in the form of hash" do expect(instance._to_hash(instance.confidence_threshold)).to eq(instance.confidence_threshold) end - it 'returns sensitivity_level in the form of hash' do + it "returns sensitivity_level in the form of hash" do expect(instance._to_hash(instance.sensitivity_level)).to eq(instance.sensitivity_level) end - it 'returns speech_complete_timeout_ms in the form of hash' do + it "returns speech_complete_timeout_ms in the form of hash" do expect(instance._to_hash(instance.speech_complete_timeout_ms)).to eq(instance.speech_complete_timeout_ms) end - it 'returns speech_incomplete_timeout_ms in the form of hash' do + it "returns speech_incomplete_timeout_ms in the form of hash" do expect(instance._to_hash(instance.speech_incomplete_timeout_ms)).to eq(instance.speech_incomplete_timeout_ms) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/get_speech_webhook_spec.rb b/spec/models/get_speech_webhook_spec.rb index 217d7fbb..b8aa6b46 100644 --- a/spec/models/get_speech_webhook_spec.rb +++ b/spec/models/get_speech_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GetSpeechWebhook @@ -21,1783 +19,873 @@ describe Freeclimb::GetSpeechWebhook do let(:instance) { Freeclimb::GetSpeechWebhook.new } - describe 'test an instance of GetSpeechWebhook' do - it 'should create an instance of GetSpeechWebhook' do + describe "test an instance of GetSpeechWebhook" do + it "should create an instance of GetSpeechWebhook" do expect(instance).to be_instance_of(Freeclimb::GetSpeechWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of GetSpeechWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of GetSpeechWebhook" do payload = '{ "requestType": "getSpeech" }' expect(Freeclimb::GetSpeechWebhook.deserialize(payload)).to be_instance_of(Freeclimb::GetSpeechWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "reason"' do - it 'assigns value ERROR' do + it "assigns value ERROR" do instance.reason = Freeclimb::GetSpeechReason::ERROR - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::ERROR) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::ERROR) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.reason = Freeclimb::GetSpeechReason::HANGUP - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::HANGUP) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::HANGUP) end - it 'assigns value DIGIT' do + it "assigns value DIGIT" do instance.reason = Freeclimb::GetSpeechReason::DIGIT - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::DIGIT) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::DIGIT) end - it 'assigns value NO_INPUT' do + it "assigns value NO_INPUT" do instance.reason = Freeclimb::GetSpeechReason::NO_INPUT - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::NO_INPUT) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::NO_INPUT) end - it 'assigns value NO_MATCH' do + it "assigns value NO_MATCH" do instance.reason = Freeclimb::GetSpeechReason::NO_MATCH - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::NO_MATCH) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::NO_MATCH) end - it 'assigns value RECOGNITION' do + it "assigns value RECOGNITION" do instance.reason = Freeclimb::GetSpeechReason::RECOGNITION - expect(instance.reason).to eq(Freeclimb::GetSpeechReason::RECOGNITION) + expect(instance.reason).to eq(Freeclimb::GetSpeechReason::RECOGNITION) end end describe 'test attribute "recognition_result"' do - it 'should work' do - + it "should work" do instance.recognition_result = "TEST_STRING" - expect(instance.recognition_result).to eq("TEST_STRING") - - - + expect(instance.recognition_result).to eq("TEST_STRING") end end describe 'test attribute "confidence"' do - it 'should work' do - - + it "should work" do instance.confidence = 1 expect(instance.confidence).to eq(1) - - - end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test attribute "completion_reason"' do - it 'should work' do - + it "should work" do instance.completion_reason = "TEST_STRING" - expect(instance.completion_reason).to eq("TEST_STRING") - - - + expect(instance.completion_reason).to eq("TEST_STRING") end end describe 'test attribute "completion_cause"' do - it 'should work' do - + it "should work" do instance.completion_cause = "TEST_STRING" - expect(instance.completion_cause).to eq("TEST_STRING") - - - + expect(instance.completion_cause).to eq("TEST_STRING") end end describe 'test attribute "mrcp_code"' do - it 'should work' do - - + it "should work" do instance.mrcp_code = 1 expect(instance.mrcp_code).to eq(1) - - - end end describe 'test attribute "mrcp_diagnostic"' do - it 'should work' do - + it "should work" do instance.mrcp_diagnostic = "TEST_STRING" - expect(instance.mrcp_diagnostic).to eq("TEST_STRING") - - - + expect(instance.mrcp_diagnostic).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - - - recognition_result: "TS", - - - - confidence: 1, - - - - - parent_call_id: "TS", - - - - - completion_reason: "TS", - - - - - completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::GetSpeechWebhook' do - expect { instance = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - - - recognition_result: "TS", - - - - confidence: 1, - - - - - parent_call_id: "TS", - - - - - completion_reason: "TS", - - - - - completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - - - recognition_result: "TS", - - - - confidence: 1, - - - - - parent_call_id: "TS", - - - - - completion_reason: "TS", - - - - - completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::GetSpeechWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + mrcp_code: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::GetSpeechWebhook.new( - - ) - expect(instance.valid?).to eq(false) + mrcp_diagnostic: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - instance_1 = Freeclimb::GetSpeechWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::GetSpeechWebhook" do + expect { + Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - + mrcp_diagnostic: "TS", - - - - ) - instance_2 = Freeclimb::GetSpeechWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - + recognition_result: "TS", - - - - - + confidence: 1, - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - - - + mrcp_code: 1, - - - mrcp_diagnostic: "TS", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - recognition_result: "TS", - - - - confidence: 2, - - - - - parent_call_id: "TS", - - - - - completion_reason: "TS", - - - - - completion_cause: "TS", - - - - mrcp_code: 2, - - - - + mrcp_diagnostic: "TS", - - - - ) - instance_2 = Freeclimb::GetSpeechWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - reason: nil, - - - recognition_result: "ST", - - - - confidence: 1, - - - - - parent_call_id: "ST", - - - - - completion_reason: "ST", - - - - - completion_cause: "ST", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "ST", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - - - recognition_result: "TS", - - - - confidence: 1, - - - - - parent_call_id: "TS", - - - - - completion_reason: "TS", - - - - - completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::GetSpeechWebhook.new( - + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - + + mrcp_diagnostic: "TS" ) - instance_2 = Freeclimb::GetSpeechWebhook.new( - + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::GetSpeechWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - - mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + mrcp_code: 1, - describe 'test method "_deserialize"' do - instance = Freeclimb::GetSpeechWebhook.new( - + mrcp_diagnostic: "TS" + ) + instance_2 = Freeclimb::GetSpeechWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - - ) - it 'deserializes the data of request_type' do - expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) - end - - - it 'deserializes the data of call_id' do - expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) - end - - - it 'deserializes the data of account_id' do - expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) - end - - - it 'deserializes the data of from' do - expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) - end - - - it 'deserializes the data of to' do - expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) - end - - - - - - - it 'deserializes the data of conference_id' do - expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) + + mrcp_diagnostic: "TS" + ) + expect(instance_1.eql?(instance_2)).to eq(true) end - - - it 'deserializes the data of queue_id' do - expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) + + it "checks if objects are not equal" do + instance_1 = Freeclimb::GetSpeechWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 2, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 2, + + mrcp_diagnostic: "TS" + ) + instance_2 = Freeclimb::GetSpeechWebhook.new( + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + reason: nil, + + recognition_result: "ST", + + confidence: 1, + + parent_call_id: "ST", + + completion_reason: "ST", + + completion_cause: "ST", + + mrcp_code: 1, + + mrcp_diagnostic: "ST" + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::GetSpeechWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 1, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 1, + + mrcp_diagnostic: "TS" + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::GetSpeechWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 1, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 1, + + mrcp_diagnostic: "TS" + ) + instance_2 = Freeclimb::GetSpeechWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 1, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 1, + + mrcp_diagnostic: "TS" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::GetSpeechWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 1, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 1, + + mrcp_diagnostic: "TS" + ) + it "deserializes the data of request_type" do + expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of recognition_result' do + + it "deserializes the data of call_id" do + expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) + end + + it "deserializes the data of account_id" do + expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) + end + + it "deserializes the data of from" do + expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) + end + + it "deserializes the data of to" do + expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) + end + + it "deserializes the data of conference_id" do + expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) + end + + it "deserializes the data of queue_id" do + expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) + end + + it "deserializes the data of recognition_result" do expect(instance._deserialize("String", instance.recognition_result)).to be_a_kind_of(String) end - - - it 'deserializes the data of confidence' do + + it "deserializes the data of confidence" do expect(instance._deserialize("Integer", instance.confidence)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of completion_reason' do + + it "deserializes the data of completion_reason" do expect(instance._deserialize("String", instance.completion_reason)).to be_a_kind_of(String) end - - - it 'deserializes the data of completion_cause' do + + it "deserializes the data of completion_cause" do expect(instance._deserialize("String", instance.completion_cause)).to be_a_kind_of(String) end - - - it 'deserializes the data of mrcp_code' do + + it "deserializes the data of mrcp_code" do expect(instance._deserialize("Integer", instance.mrcp_code)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of mrcp_diagnostic' do + + it "deserializes the data of mrcp_diagnostic" do expect(instance._deserialize("String", instance.mrcp_diagnostic)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::GetSpeechWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - + + mrcp_diagnostic: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::GetSpeechWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - + + mrcp_diagnostic: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::GetSpeechWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - + + mrcp_diagnostic: "TS" ) instance_2 = Freeclimb::GetSpeechWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + reason: Freeclimb::GetSpeechReason::ERROR, - - - - + recognition_result: "TS", - - - + confidence: 1, - - - - + parent_call_id: "TS", - - - - + completion_reason: "TS", - - - - + completion_cause: "TS", - - - + mrcp_code: 1, - - - - - mrcp_diagnostic: "TS", - - - + + mrcp_diagnostic: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1805,123 +893,90 @@ describe 'test method "_to_hash"' do instance = Freeclimb::GetSpeechWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - reason: Freeclimb::GetSpeechReason::ERROR, - - - - recognition_result: "TS", - - - confidence: 1, - - - - parent_call_id: "TS", - - - - completion_reason: "TS", - - - - completion_cause: "TS", - - - mrcp_code: 1, - - - - mrcp_diagnostic: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + reason: Freeclimb::GetSpeechReason::ERROR, + + recognition_result: "TS", + + confidence: 1, + + parent_call_id: "TS", + + completion_reason: "TS", + + completion_cause: "TS", + + mrcp_code: 1, + + mrcp_diagnostic: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns reason in the form of hash' do + it "returns reason in the form of hash" do expect(instance._to_hash(instance.reason)).to eq(instance.reason) end - it 'returns recognition_result in the form of hash' do + it "returns recognition_result in the form of hash" do expect(instance._to_hash(instance.recognition_result)).to eq(instance.recognition_result) end - it 'returns confidence in the form of hash' do + it "returns confidence in the form of hash" do expect(instance._to_hash(instance.confidence)).to eq(instance.confidence) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end - it 'returns completion_reason in the form of hash' do + it "returns completion_reason in the form of hash" do expect(instance._to_hash(instance.completion_reason)).to eq(instance.completion_reason) end - it 'returns completion_cause in the form of hash' do + it "returns completion_cause in the form of hash" do expect(instance._to_hash(instance.completion_cause)).to eq(instance.completion_cause) end - it 'returns mrcp_code in the form of hash' do + it "returns mrcp_code in the form of hash" do expect(instance._to_hash(instance.mrcp_code)).to eq(instance.mrcp_code) end - it 'returns mrcp_diagnostic in the form of hash' do + it "returns mrcp_diagnostic in the form of hash" do expect(instance._to_hash(instance.mrcp_diagnostic)).to eq(instance.mrcp_diagnostic) end end - end diff --git a/spec/models/grammar_file_built_in_spec.rb b/spec/models/grammar_file_built_in_spec.rb index 12a4efeb..6858fa4d 100644 --- a/spec/models/grammar_file_built_in_spec.rb +++ b/spec/models/grammar_file_built_in_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GrammarFileBuiltIn @@ -21,22 +19,22 @@ describe Freeclimb::GrammarFileBuiltIn do let(:instance) { Freeclimb::GrammarFileBuiltIn.new } - describe 'test an instance of GrammarFileBuiltIn' do - it 'should create an instance of GrammarFileBuiltIn' do + describe "test an instance of GrammarFileBuiltIn" do + it "should create an instance of GrammarFileBuiltIn" do expect(instance).to be_instance_of(Freeclimb::GrammarFileBuiltIn) end end - + describe 'test attribute "ALPHNUM6"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::ALPHNUM6 = "ALPHNUM6" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::ALPHNUM6 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("ALPHNUM6") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("ALPHNUM6") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ALPHNUM6" calculatedValue = Freeclimb::GrammarFileBuiltIn::ALPHNUM6 expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "ANY_DIG"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::ANY_DIG = "ANY_DIG" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::ANY_DIG - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("ANY_DIG") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("ANY_DIG") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ANY_DIG" calculatedValue = Freeclimb::GrammarFileBuiltIn::ANY_DIG expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "DIG1"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG1 = "DIG1" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG1 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG1") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG1") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG1" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG1 expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "DIG2"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG2 = "DIG2" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG2 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG2") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG2") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG2" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG2 expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "DIG3"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG3 = "DIG3" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG3 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG3") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG3") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG3" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG3 expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "DIG4"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG4 = "DIG4" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG4 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG4") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG4") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG4" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG4 expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "DIG5"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG5 = "DIG5" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG5 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG5") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG5") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG5" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG5 expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "DIG6"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG6 = "DIG6" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG6 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG6") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG6") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG6" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG6 expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "DIG7"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG7 = "DIG7" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG7 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG7") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG7") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG7" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG7 expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "DIG8"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG8 = "DIG8" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG8 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG8") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG8") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG8" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG8 expect(expectedValue).to eq(calculatedValue) @@ -188,15 +186,15 @@ end describe 'test attribute "DIG9"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG9 = "DIG9" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG9 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG9") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG9") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG9" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG9 expect(expectedValue).to eq(calculatedValue) @@ -204,15 +202,15 @@ end describe 'test attribute "DIG10"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG10 = "DIG10" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG10 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG10") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG10") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG10" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG10 expect(expectedValue).to eq(calculatedValue) @@ -220,15 +218,15 @@ end describe 'test attribute "DIG11"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::DIG11 = "DIG11" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::DIG11 - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("DIG11") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("DIG11") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DIG11" calculatedValue = Freeclimb::GrammarFileBuiltIn::DIG11 expect(expectedValue).to eq(calculatedValue) @@ -236,15 +234,15 @@ end describe 'test attribute "UP_TO_20_DIGIT_SEQUENCE"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::UP_TO_20_DIGIT_SEQUENCE = "UP_TO_20_DIGIT_SEQUENCE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::UP_TO_20_DIGIT_SEQUENCE - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("UP_TO_20_DIGIT_SEQUENCE") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("UP_TO_20_DIGIT_SEQUENCE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "UP_TO_20_DIGIT_SEQUENCE" calculatedValue = Freeclimb::GrammarFileBuiltIn::UP_TO_20_DIGIT_SEQUENCE expect(expectedValue).to eq(calculatedValue) @@ -252,19 +250,18 @@ end describe 'test attribute "VERSAY_YESNO"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarFileBuiltIn::VERSAY_YESNO = "VERSAY_YESNO" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarFileBuiltIn::VERSAY_YESNO - calculatedValue = Freeclimb::GrammarFileBuiltIn::build_from_hash("VERSAY_YESNO") + calculatedValue = Freeclimb::GrammarFileBuiltIn.build_from_hash("VERSAY_YESNO") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "VERSAY_YESNO" calculatedValue = Freeclimb::GrammarFileBuiltIn::VERSAY_YESNO expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/grammar_type_spec.rb b/spec/models/grammar_type_spec.rb index 931d9469..07d187b8 100644 --- a/spec/models/grammar_type_spec.rb +++ b/spec/models/grammar_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::GrammarType @@ -21,22 +19,22 @@ describe Freeclimb::GrammarType do let(:instance) { Freeclimb::GrammarType.new } - describe 'test an instance of GrammarType' do - it 'should create an instance of GrammarType' do + describe "test an instance of GrammarType" do + it "should create an instance of GrammarType" do expect(instance).to be_instance_of(Freeclimb::GrammarType) end end - + describe 'test attribute "URL"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarType::URL = "URL" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarType::URL - calculatedValue = Freeclimb::GrammarType::build_from_hash("URL") + calculatedValue = Freeclimb::GrammarType.build_from_hash("URL") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "URL" calculatedValue = Freeclimb::GrammarType::URL expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "BUILT_IN"' do - it 'should work' do + it "should work" do expect { Freeclimb::GrammarType::BUILT_IN = "BUILTIN" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::GrammarType::BUILT_IN - calculatedValue = Freeclimb::GrammarType::build_from_hash("BUILTIN") + calculatedValue = Freeclimb::GrammarType.build_from_hash("BUILTIN") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "BUILTIN" calculatedValue = Freeclimb::GrammarType::BUILT_IN expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/hangup_spec.rb b/spec/models/hangup_spec.rb index 8942eb69..5f3a2d22 100644 --- a/spec/models/hangup_spec.rb +++ b/spec/models/hangup_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Hangup @@ -21,144 +19,100 @@ describe Freeclimb::Hangup do let(:instance) { Freeclimb::Hangup.new } - describe 'test an instance of Hangup' do - it 'should create an instance of Hangup' do + describe "test an instance of Hangup" do + it "should create an instance of Hangup" do expect(instance).to be_instance_of(Freeclimb::Hangup) end end - + describe 'test attribute "reason"' do - it 'should work' do - + it "should work" do instance.reason = "TEST_STRING" - expect(instance.reason).to eq("TEST_STRING") - - - + expect(instance.reason).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Hangup.new( - - reason: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Hangup' do - expect { instance = Freeclimb::Hangup.new( - - reason: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Hangup.new( - - reason: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Hangup.new( + reason: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::Hangup" do + expect { + Freeclimb::Hangup.new( + reason: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Hangup.new( + reason: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Hangup.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Hangup.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Hangup.new( - - reason: "ST", - - - + reason: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Hangup.new( - - reason: "TS", - - - - ) + reason: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) - it 'deserializes the data of reason' do + it "deserializes the data of reason" do expect(instance._deserialize("String", instance.reason)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Hangup.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Hangup.new( - - reason: "TS", - - ) - it 'returns reason in the form of hash' do + reason: "TS" + ) + it "returns reason in the form of hash" do expect(instance._to_hash(instance.reason)).to eq(instance.reason) end end - end diff --git a/spec/models/if_machine_spec.rb b/spec/models/if_machine_spec.rb index fd8b03be..7d4e417b 100644 --- a/spec/models/if_machine_spec.rb +++ b/spec/models/if_machine_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::IfMachine @@ -21,22 +19,22 @@ describe Freeclimb::IfMachine do let(:instance) { Freeclimb::IfMachine.new } - describe 'test an instance of IfMachine' do - it 'should create an instance of IfMachine' do + describe "test an instance of IfMachine" do + it "should create an instance of IfMachine" do expect(instance).to be_instance_of(Freeclimb::IfMachine) end end - + describe 'test attribute "REDIRECT"' do - it 'should work' do + it "should work" do expect { Freeclimb::IfMachine::REDIRECT = "redirect" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::IfMachine::REDIRECT - calculatedValue = Freeclimb::IfMachine::build_from_hash("redirect") + calculatedValue = Freeclimb::IfMachine.build_from_hash("redirect") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "redirect" calculatedValue = Freeclimb::IfMachine::REDIRECT expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::IfMachine::HANGUP = "hangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::IfMachine::HANGUP - calculatedValue = Freeclimb::IfMachine::build_from_hash("hangup") + calculatedValue = Freeclimb::IfMachine.build_from_hash("hangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "hangup" calculatedValue = Freeclimb::IfMachine::HANGUP expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/inbound_call_webhook_spec.rb b/spec/models/inbound_call_webhook_spec.rb index b2738924..c56839a2 100644 --- a/spec/models/inbound_call_webhook_spec.rb +++ b/spec/models/inbound_call_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::InboundCallWebhook @@ -21,781 +19,402 @@ describe Freeclimb::InboundCallWebhook do let(:instance) { Freeclimb::InboundCallWebhook.new } - describe 'test an instance of InboundCallWebhook' do - it 'should create an instance of InboundCallWebhook' do + describe "test an instance of InboundCallWebhook" do + it "should create an instance of InboundCallWebhook" do expect(instance).to be_instance_of(Freeclimb::InboundCallWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of InboundCallWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of InboundCallWebhook" do payload = '{ "requestType": "inboundCall" }' expect(Freeclimb::InboundCallWebhook.deserialize(payload)).to be_instance_of(Freeclimb::InboundCallWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::InboundCallWebhook' do - expect { instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::InboundCallWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::InboundCallWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + queue_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::InboundCallWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::InboundCallWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::InboundCallWebhook" do + expect { + Freeclimb::InboundCallWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::InboundCallWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::InboundCallWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::InboundCallWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::InboundCallWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::InboundCallWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::InboundCallWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) instance_2 = Freeclimb::InboundCallWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - parent_call_id: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -804,331 +423,153 @@ describe 'test method "_deserialize"' do instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::InboundCallWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1136,76 +577,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::InboundCallWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/incoming_number_list_spec.rb b/spec/models/incoming_number_list_spec.rb index 38dc9bbf..c5459302 100644 --- a/spec/models/incoming_number_list_spec.rb +++ b/spec/models/incoming_number_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::IncomingNumberList @@ -21,541 +19,303 @@ describe Freeclimb::IncomingNumberList do let(:instance) { Freeclimb::IncomingNumberList.new } - describe 'test an instance of IncomingNumberList' do - it 'should create an instance of IncomingNumberList' do + describe "test an instance of IncomingNumberList" do + it "should create an instance of IncomingNumberList" do expect(instance).to be_instance_of(Freeclimb::IncomingNumberList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "incoming_phone_numbers"' do - it 'should work' do - + it "should work" do instance.incoming_phone_numbers = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.incoming_phone_numbers).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.incoming_phone_numbers).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberList' do - expect { instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::IncomingNumberList.new( + it "properly initializes with values" do + expect { + Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberList.new( - - ) - expect(instance.valid?).to eq(false) + incoming_phone_numbers: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::IncomingNumberList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberList" do + expect { + Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + incoming_phone_numbers: [], - - ) - instance_2 = Freeclimb::IncomingNumberList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + incoming_phone_numbers: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::IncomingNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::IncomingNumberList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::IncomingNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] + ) + instance_2 = Freeclimb::IncomingNumberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::IncomingNumberList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - incoming_phone_numbers: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + incoming_phone_numbers: [] ) instance_2 = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - incoming_phone_numbers: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + incoming_phone_numbers: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) instance_2 = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of incoming_phone_numbers' do + + it "deserializes the data of incoming_phone_numbers" do expect(instance._deserialize("Array", instance.incoming_phone_numbers)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) instance_2 = Freeclimb::IncomingNumberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - incoming_phone_numbers: Array.new(), - - - + + incoming_phone_numbers: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::IncomingNumberList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - incoming_phone_numbers: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + incoming_phone_numbers: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns incoming_phone_numbers in the form of hash' do + it "returns incoming_phone_numbers in the form of hash" do expect(instance._to_hash(instance.incoming_phone_numbers)).to eq(instance.incoming_phone_numbers) end end - end diff --git a/spec/models/incoming_number_request_spec.rb b/spec/models/incoming_number_request_spec.rb index 5f5ce3af..95571426 100644 --- a/spec/models/incoming_number_request_spec.rb +++ b/spec/models/incoming_number_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::IncomingNumberRequest @@ -21,278 +19,158 @@ describe Freeclimb::IncomingNumberRequest do let(:instance) { Freeclimb::IncomingNumberRequest.new } - describe 'test an instance of IncomingNumberRequest' do - it 'should create an instance of IncomingNumberRequest' do + describe "test an instance of IncomingNumberRequest" do + it "should create an instance of IncomingNumberRequest" do expect(instance).to be_instance_of(Freeclimb::IncomingNumberRequest) end end - + describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::IncomingNumberRequest.new( + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberRequest' do - expect { instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberRequest" do + expect { + Freeclimb::IncomingNumberRequest.new( + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::IncomingNumberRequest.new( + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::IncomingNumberRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" ) instance_2 = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" ) instance_2 = Freeclimb::IncomingNumberRequest.new( - - application_id: "ST", - - - - - _alias: "ST", - - - - - campaign_id: "ST", - - - + application_id: "ST", + + _alias: "ST", + + campaign_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - - ) + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) instance_2 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -301,120 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - - _alias: "TS", - - - - - campaign_id: "TS", - - - + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" ) - it 'deserializes the data of application_id' do + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) instance_2 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - - - - + _alias: "TS", - - - - - campaign_id: "TS", - - - + + campaign_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -422,27 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::IncomingNumberRequest.new( - - application_id: "TS", - - - - _alias: "TS", - - - - campaign_id: "TS", - - ) - it 'returns application_id in the form of hash' do + application_id: "TS", + + _alias: "TS", + + campaign_id: "TS" + ) + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end end - end diff --git a/spec/models/incoming_number_result_spec.rb b/spec/models/incoming_number_result_spec.rb index 52d87079..d449084a 100644 --- a/spec/models/incoming_number_result_spec.rb +++ b/spec/models/incoming_number_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::IncomingNumberResult @@ -21,1716 +19,833 @@ describe Freeclimb::IncomingNumberResult do let(:instance) { Freeclimb::IncomingNumberResult.new } - describe 'test an instance of IncomingNumberResult' do - it 'should create an instance of IncomingNumberResult' do + describe "test an instance of IncomingNumberResult" do + it "should create an instance of IncomingNumberResult" do expect(instance).to be_instance_of(Freeclimb::IncomingNumberResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "capabilities"' do - it 'should work' do - - - + it "should work" do instance.capabilities = Capabilities.new expect(instance.capabilities).to be_instance_of(Capabilities) - end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test attribute "phone_number_id"' do - it 'should work' do - + it "should work" do instance.phone_number_id = "TEST_STRING" - expect(instance.phone_number_id).to eq("TEST_STRING") - - - + expect(instance.phone_number_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test attribute "phone_number"' do - it 'should work' do - + it "should work" do instance.phone_number = "TEST_STRING" - expect(instance.phone_number).to eq("TEST_STRING") - - - + expect(instance.phone_number).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "region"' do - it 'should work' do - + it "should work" do instance.region = "TEST_STRING" - expect(instance.region).to eq("TEST_STRING") - - - + expect(instance.region).to eq("TEST_STRING") end end describe 'test attribute "country"' do - it 'should work' do - + it "should work" do instance.country = "TEST_STRING" - expect(instance.country).to eq("TEST_STRING") - - - + expect(instance.country).to eq("TEST_STRING") end end describe 'test attribute "voice_enabled"' do - it 'should work' do + it "should work" do instance.voice_enabled = false - expect(instance.voice_enabled).to eq(false) - - - + expect(instance.voice_enabled).to eq(false) end end describe 'test attribute "sms_enabled"' do - it 'should work' do + it "should work" do instance.sms_enabled = false - expect(instance.sms_enabled).to eq(false) - - - + expect(instance.sms_enabled).to eq(false) end end describe 'test attribute "offnet"' do - it 'should work' do + it "should work" do instance.offnet = false - expect(instance.offnet).to eq(false) - - - + expect(instance.offnet).to eq(false) end end describe 'test attribute "tfn"' do - it 'should work' do - - - + it "should work" do instance.tfn = TFN.new expect(instance.tfn).to be_instance_of(TFN) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - - - capabilities: Capabilities.new(), - - - campaign_id: "TS", - - - - - phone_number_id: "TS", - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - phone_number: "TS", - - - - - _alias: "TS", - - - - - region: "TS", - - - - - country: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberResult' do - expect { instance = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - - - capabilities: Capabilities.new, - - - campaign_id: "TS", - - - - - phone_number_id: "TS", - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - phone_number: "TS", - - - - - _alias: "TS", - - - - - region: "TS", - - - - - country: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - - - capabilities: Capabilities.new, - - - campaign_id: "TS", - - - - - phone_number_id: "TS", - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - phone_number: "TS", - - - - - _alias: "TS", - - - - - region: "TS", - - - - - country: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::IncomingNumberResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::IncomingNumberResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - - capabilities: Capabilities.new(), - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new(), - - ) - expect(instance.valid?).to eq(true) - end + offnet: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberResult.new( - - ) - expect(instance.valid?).to eq(false) + tfn: TFN.new + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - obj_Capabilities = Capabilities.new() - - - - - - - - - - - - - - obj_TFN = TFN.new() - - instance_1 = Freeclimb::IncomingNumberResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberResult" do + expect { + Freeclimb::IncomingNumberResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - capabilities: obj_Capabilities, - - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - tfn: obj_TFN, - - - ) - instance_2 = Freeclimb::IncomingNumberResult.new( - + + tfn: TFN.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::IncomingNumberResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - - - capabilities: obj_Capabilities, - - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - tfn: obj_TFN, - - + + tfn: TFN.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::IncomingNumberResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true, + + tfn: TFN.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::IncomingNumberResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Capabilities = Capabilities.new + + obj_TFN = TFN.new + + instance_1 = Freeclimb::IncomingNumberResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + capabilities: obj_Capabilities, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true, + + tfn: obj_TFN + ) + instance_2 = Freeclimb::IncomingNumberResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + capabilities: obj_Capabilities, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true, + + tfn: obj_TFN ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - - capabilities: Capabilities.new(), - - - - campaign_id: "TS", - - - - - phone_number_id: "TS", - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - phone_number: "TS", - - - - - _alias: "TS", - - - - - region: "TS", - - - - - country: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - offnet: true, - - - - - - tfn: TFN.new(), - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true, + + tfn: TFN.new ) instance_2 = Freeclimb::IncomingNumberResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - - capabilities: Capabilities.new(), - - - - campaign_id: "ST", - - - - - phone_number_id: "ST", - - - - - account_id: "ST", - - - - - application_id: "ST", - - - - - phone_number: "ST", - - - - - _alias: "ST", - - - - - region: "ST", - - - - - country: "ST", - - - - voice_enabled: false, - - - - sms_enabled: false, - - - - offnet: false, - - - - - - tfn: TFN.new(), - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + capabilities: Capabilities.new, + + campaign_id: "ST", + + phone_number_id: "ST", + + account_id: "ST", + + application_id: "ST", + + phone_number: "ST", + + _alias: "ST", + + region: "ST", + + country: "ST", + + voice_enabled: false, + + sms_enabled: false, + + offnet: false, + + tfn: TFN.new ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - - - capabilities: Capabilities.new(), - - - campaign_id: "TS", - - - - - phone_number_id: "TS", - - - - - account_id: "TS", - - - - - application_id: "TS", - - - - - phone_number: "TS", - - - - - _alias: "TS", - - - - - region: "TS", - - - - - country: "TS", - - - - voice_enabled: true, - - - - sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new(), - - ) - expect(instance.hash).to be_a_kind_of(Integer) - end - end - - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::IncomingNumberResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - - capabilities: Capabilities.new(), - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: TFN.new(), - + + tfn: TFN.new ) - instance_2 = Freeclimb::IncomingNumberResult.new( - + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::IncomingNumberResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - - capabilities: Capabilities.new(), - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - - offnet: true, - - - - - - - tfn: TFN.new(), - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + offnet: true, - describe 'test method "_deserialize"' do - instance = Freeclimb::IncomingNumberResult.new( - + tfn: TFN.new + ) + instance_2 = Freeclimb::IncomingNumberResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - - capabilities: Capabilities.new(), - - + + capabilities: Capabilities.new, + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: TFN.new(), - + + tfn: TFN.new + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::IncomingNumberResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + capabilities: Capabilities.new, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true, + + tfn: TFN.new ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of capabilities' do + + it "deserializes the data of capabilities" do expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(Capabilities) end - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone_number_id' do + + it "deserializes the data of phone_number_id" do expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone_number' do + + it "deserializes the data of phone_number" do expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of region' do + + it "deserializes the data of region" do expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String) end - - - it 'deserializes the data of country' do + + it "deserializes the data of country" do expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of voice_enabled' do + + it "deserializes the data of voice_enabled" do expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of sms_enabled' do + + it "deserializes the data of sms_enabled" do expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of offnet' do + + it "deserializes the data of offnet" do expect(instance._deserialize("Boolean", instance.offnet)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of tfn' do + + it "deserializes the data of tfn" do expect(instance._deserialize("Object", instance.tfn)).to be_a_kind_of(TFN) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::IncomingNumberResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - + capabilities: Capabilities.new, - - + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: TFN.new, - + + tfn: TFN.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::IncomingNumberResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - + capabilities: Capabilities.new, - - + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: TFN.new, - + + tfn: TFN.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - obj = Capabilities.new() - - - - - - - - - - - - - - obj = TFN.new() - + it "creates equal hash for two equal objects" do + Capabilities.new + + obj = TFN.new + instance_1 = Freeclimb::IncomingNumberResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - + capabilities: obj, - - + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: obj, - + + tfn: obj ) instance_2 = Freeclimb::IncomingNumberResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - - - + capabilities: obj, - - + campaign_id: "TS", - - - - + phone_number_id: "TS", - - - - + account_id: "TS", - - - - + application_id: "TS", - - - - + phone_number: "TS", - - - - + _alias: "TS", - - - - + region: "TS", - - - - + country: "TS", - - - + voice_enabled: true, - - - + sms_enabled: true, - - - + offnet: true, - - - - - - - tfn: obj, - + + tfn: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1738,117 +853,86 @@ describe 'test method "_to_hash"' do instance = Freeclimb::IncomingNumberResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - - - campaign_id: "TS", - - - - phone_number_id: "TS", - - - - account_id: "TS", - - - - application_id: "TS", - - - - phone_number: "TS", - - - - _alias: "TS", - - - - region: "TS", - - - - country: "TS", - - - voice_enabled: true, - - - sms_enabled: true, - - - offnet: true, - - - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + campaign_id: "TS", + + phone_number_id: "TS", + + account_id: "TS", + + application_id: "TS", + + phone_number: "TS", + + _alias: "TS", + + region: "TS", + + country: "TS", + + voice_enabled: true, + + sms_enabled: true, + + offnet: true + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns capabilities in the form of hash' do + it "returns capabilities in the form of hash" do expect(instance._to_hash(instance.capabilities)).to eq(instance.capabilities) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns phone_number_id in the form of hash' do + it "returns phone_number_id in the form of hash" do expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns phone_number in the form of hash' do + it "returns phone_number in the form of hash" do expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns region in the form of hash' do + it "returns region in the form of hash" do expect(instance._to_hash(instance.region)).to eq(instance.region) end - it 'returns country in the form of hash' do + it "returns country in the form of hash" do expect(instance._to_hash(instance.country)).to eq(instance.country) end - it 'returns voice_enabled in the form of hash' do + it "returns voice_enabled in the form of hash" do expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled) end - it 'returns sms_enabled in the form of hash' do + it "returns sms_enabled in the form of hash" do expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled) end - it 'returns offnet in the form of hash' do + it "returns offnet in the form of hash" do expect(instance._to_hash(instance.offnet)).to eq(instance.offnet) end - it 'returns tfn in the form of hash' do + it "returns tfn in the form of hash" do expect(instance._to_hash(instance.tfn)).to eq(instance.tfn) end end - end diff --git a/spec/models/language_spec.rb b/spec/models/language_spec.rb index a24760da..7648fec9 100644 --- a/spec/models/language_spec.rb +++ b/spec/models/language_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Language @@ -21,22 +19,22 @@ describe Freeclimb::Language do let(:instance) { Freeclimb::Language.new } - describe 'test an instance of Language' do - it 'should create an instance of Language' do + describe "test an instance of Language" do + it "should create an instance of Language" do expect(instance).to be_instance_of(Freeclimb::Language) end end - + describe 'test attribute "CATALAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::CATALAN = "ca-ES" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::CATALAN - calculatedValue = Freeclimb::Language::build_from_hash("ca-ES") + calculatedValue = Freeclimb::Language.build_from_hash("ca-ES") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ca-ES" calculatedValue = Freeclimb::Language::CATALAN expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "DANISH"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::DANISH = "da-DK" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::DANISH - calculatedValue = Freeclimb::Language::build_from_hash("da-DK") + calculatedValue = Freeclimb::Language.build_from_hash("da-DK") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "da-DK" calculatedValue = Freeclimb::Language::DANISH expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "GERMAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::GERMAN = "de-DE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::GERMAN - calculatedValue = Freeclimb::Language::build_from_hash("de-DE") + calculatedValue = Freeclimb::Language.build_from_hash("de-DE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "de-DE" calculatedValue = Freeclimb::Language::GERMAN expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "ENGLISH_AU"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_AU = "en-AU" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_AU - calculatedValue = Freeclimb::Language::build_from_hash("en-AU") + calculatedValue = Freeclimb::Language.build_from_hash("en-AU") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "en-AU" calculatedValue = Freeclimb::Language::ENGLISH_AU expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "ENGLISH_CA"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_CA = "en-CA" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_CA - calculatedValue = Freeclimb::Language::build_from_hash("en-CA") + calculatedValue = Freeclimb::Language.build_from_hash("en-CA") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "en-CA" calculatedValue = Freeclimb::Language::ENGLISH_CA expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "ENGLISH_UK"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_UK = "en-GB" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_UK - calculatedValue = Freeclimb::Language::build_from_hash("en-GB") + calculatedValue = Freeclimb::Language.build_from_hash("en-GB") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "en-GB" calculatedValue = Freeclimb::Language::ENGLISH_UK expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "ENGLISH_IN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_IN = "en-IN" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_IN - calculatedValue = Freeclimb::Language::build_from_hash("en-IN") + calculatedValue = Freeclimb::Language.build_from_hash("en-IN") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "en-IN" calculatedValue = Freeclimb::Language::ENGLISH_IN expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "ENGLISH_US"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_US = "en-US" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_US - calculatedValue = Freeclimb::Language::build_from_hash("en-US") + calculatedValue = Freeclimb::Language.build_from_hash("en-US") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "en-US" calculatedValue = Freeclimb::Language::ENGLISH_US expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "ENGLISH_ES"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_ES = "es-ES" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_ES - calculatedValue = Freeclimb::Language::build_from_hash("es-ES") + calculatedValue = Freeclimb::Language.build_from_hash("es-ES") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "es-ES" calculatedValue = Freeclimb::Language::ENGLISH_ES expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "ENGLISH_MX"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ENGLISH_MX = "es-MX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ENGLISH_MX - calculatedValue = Freeclimb::Language::build_from_hash("es-MX") + calculatedValue = Freeclimb::Language.build_from_hash("es-MX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "es-MX" calculatedValue = Freeclimb::Language::ENGLISH_MX expect(expectedValue).to eq(calculatedValue) @@ -188,15 +186,15 @@ end describe 'test attribute "FINNISH"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::FINNISH = "fi-FI" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::FINNISH - calculatedValue = Freeclimb::Language::build_from_hash("fi-FI") + calculatedValue = Freeclimb::Language.build_from_hash("fi-FI") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "fi-FI" calculatedValue = Freeclimb::Language::FINNISH expect(expectedValue).to eq(calculatedValue) @@ -204,15 +202,15 @@ end describe 'test attribute "FRENCH_CA"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::FRENCH_CA = "fr-CA" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::FRENCH_CA - calculatedValue = Freeclimb::Language::build_from_hash("fr-CA") + calculatedValue = Freeclimb::Language.build_from_hash("fr-CA") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "fr-CA" calculatedValue = Freeclimb::Language::FRENCH_CA expect(expectedValue).to eq(calculatedValue) @@ -220,15 +218,15 @@ end describe 'test attribute "FRENCH_FR"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::FRENCH_FR = "fr-FR" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::FRENCH_FR - calculatedValue = Freeclimb::Language::build_from_hash("fr-FR") + calculatedValue = Freeclimb::Language.build_from_hash("fr-FR") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "fr-FR" calculatedValue = Freeclimb::Language::FRENCH_FR expect(expectedValue).to eq(calculatedValue) @@ -236,15 +234,15 @@ end describe 'test attribute "ITALIAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::ITALIAN = "it-IT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::ITALIAN - calculatedValue = Freeclimb::Language::build_from_hash("it-IT") + calculatedValue = Freeclimb::Language.build_from_hash("it-IT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "it-IT" calculatedValue = Freeclimb::Language::ITALIAN expect(expectedValue).to eq(calculatedValue) @@ -252,15 +250,15 @@ end describe 'test attribute "JAPANESE"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::JAPANESE = "ja-JP" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::JAPANESE - calculatedValue = Freeclimb::Language::build_from_hash("ja-JP") + calculatedValue = Freeclimb::Language.build_from_hash("ja-JP") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ja-JP" calculatedValue = Freeclimb::Language::JAPANESE expect(expectedValue).to eq(calculatedValue) @@ -268,15 +266,15 @@ end describe 'test attribute "KOREAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::KOREAN = "ko-KR" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::KOREAN - calculatedValue = Freeclimb::Language::build_from_hash("ko-KR") + calculatedValue = Freeclimb::Language.build_from_hash("ko-KR") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ko-KR" calculatedValue = Freeclimb::Language::KOREAN expect(expectedValue).to eq(calculatedValue) @@ -284,15 +282,15 @@ end describe 'test attribute "NORWEGIAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::NORWEGIAN = "nb-NO" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::NORWEGIAN - calculatedValue = Freeclimb::Language::build_from_hash("nb-NO") + calculatedValue = Freeclimb::Language.build_from_hash("nb-NO") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "nb-NO" calculatedValue = Freeclimb::Language::NORWEGIAN expect(expectedValue).to eq(calculatedValue) @@ -300,15 +298,15 @@ end describe 'test attribute "DUTCH"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::DUTCH = "nl-NL" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::DUTCH - calculatedValue = Freeclimb::Language::build_from_hash("nl-NL") + calculatedValue = Freeclimb::Language.build_from_hash("nl-NL") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "nl-NL" calculatedValue = Freeclimb::Language::DUTCH expect(expectedValue).to eq(calculatedValue) @@ -316,15 +314,15 @@ end describe 'test attribute "POLISH"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::POLISH = "pl-PL" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::POLISH - calculatedValue = Freeclimb::Language::build_from_hash("pl-PL") + calculatedValue = Freeclimb::Language.build_from_hash("pl-PL") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "pl-PL" calculatedValue = Freeclimb::Language::POLISH expect(expectedValue).to eq(calculatedValue) @@ -332,15 +330,15 @@ end describe 'test attribute "PORTUGESE_BR"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::PORTUGESE_BR = "pt-BR" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::PORTUGESE_BR - calculatedValue = Freeclimb::Language::build_from_hash("pt-BR") + calculatedValue = Freeclimb::Language.build_from_hash("pt-BR") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "pt-BR" calculatedValue = Freeclimb::Language::PORTUGESE_BR expect(expectedValue).to eq(calculatedValue) @@ -348,15 +346,15 @@ end describe 'test attribute "PORTUGESE_PT"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::PORTUGESE_PT = "pt-PT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::PORTUGESE_PT - calculatedValue = Freeclimb::Language::build_from_hash("pt-PT") + calculatedValue = Freeclimb::Language.build_from_hash("pt-PT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "pt-PT" calculatedValue = Freeclimb::Language::PORTUGESE_PT expect(expectedValue).to eq(calculatedValue) @@ -364,15 +362,15 @@ end describe 'test attribute "RUSSIAN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::RUSSIAN = "ru-RU" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::RUSSIAN - calculatedValue = Freeclimb::Language::build_from_hash("ru-RU") + calculatedValue = Freeclimb::Language.build_from_hash("ru-RU") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ru-RU" calculatedValue = Freeclimb::Language::RUSSIAN expect(expectedValue).to eq(calculatedValue) @@ -380,15 +378,15 @@ end describe 'test attribute "SWEDISH"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::SWEDISH = "sv-SE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::SWEDISH - calculatedValue = Freeclimb::Language::build_from_hash("sv-SE") + calculatedValue = Freeclimb::Language.build_from_hash("sv-SE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "sv-SE" calculatedValue = Freeclimb::Language::SWEDISH expect(expectedValue).to eq(calculatedValue) @@ -396,15 +394,15 @@ end describe 'test attribute "CHINESE_CN"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::CHINESE_CN = "zh-CN" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::CHINESE_CN - calculatedValue = Freeclimb::Language::build_from_hash("zh-CN") + calculatedValue = Freeclimb::Language.build_from_hash("zh-CN") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "zh-CN" calculatedValue = Freeclimb::Language::CHINESE_CN expect(expectedValue).to eq(calculatedValue) @@ -412,15 +410,15 @@ end describe 'test attribute "CHINESE_HK"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::CHINESE_HK = "zh-HK" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::CHINESE_HK - calculatedValue = Freeclimb::Language::build_from_hash("zh-HK") + calculatedValue = Freeclimb::Language.build_from_hash("zh-HK") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "zh-HK" calculatedValue = Freeclimb::Language::CHINESE_HK expect(expectedValue).to eq(calculatedValue) @@ -428,19 +426,18 @@ end describe 'test attribute "CHINESE_TW"' do - it 'should work' do + it "should work" do expect { Freeclimb::Language::CHINESE_TW = "zh-TW" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::Language::CHINESE_TW - calculatedValue = Freeclimb::Language::build_from_hash("zh-TW") + calculatedValue = Freeclimb::Language.build_from_hash("zh-TW") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "zh-TW" calculatedValue = Freeclimb::Language::CHINESE_TW expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/leave_conference_webhook_spec.rb b/spec/models/leave_conference_webhook_spec.rb index bce5ca11..795f1d1f 100644 --- a/spec/models/leave_conference_webhook_spec.rb +++ b/spec/models/leave_conference_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::LeaveConferenceWebhook @@ -21,714 +19,373 @@ describe Freeclimb::LeaveConferenceWebhook do let(:instance) { Freeclimb::LeaveConferenceWebhook.new } - describe 'test an instance of LeaveConferenceWebhook' do - it 'should create an instance of LeaveConferenceWebhook' do + describe "test an instance of LeaveConferenceWebhook" do + it "should create an instance of LeaveConferenceWebhook" do expect(instance).to be_instance_of(Freeclimb::LeaveConferenceWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of LeaveConferenceWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of LeaveConferenceWebhook" do payload = '{ "requestType": "leaveConference" }' expect(Freeclimb::LeaveConferenceWebhook.deserialize(payload)).to be_instance_of(Freeclimb::LeaveConferenceWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::LeaveConferenceWebhook' do - expect { instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::LeaveConferenceWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::LeaveConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + conference_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::LeaveConferenceWebhook.new( - - ) - expect(instance.valid?).to eq(false) + queue_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::LeaveConferenceWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::LeaveConferenceWebhook" do + expect { + Freeclimb::LeaveConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - ) - instance_2 = Freeclimb::LeaveConferenceWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::LeaveConferenceWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::LeaveConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::LeaveConferenceWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::LeaveConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + instance_2 = Freeclimb::LeaveConferenceWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) instance_2 = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -737,300 +394,139 @@ describe 'test method "_deserialize"' do instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) instance_2 = Freeclimb::LeaveConferenceWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - + + queue_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1038,69 +534,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::LeaveConferenceWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end end - end diff --git a/spec/models/log_level_spec.rb b/spec/models/log_level_spec.rb index 1de3e6ce..f7d19cd4 100644 --- a/spec/models/log_level_spec.rb +++ b/spec/models/log_level_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::LogLevel @@ -21,22 +19,22 @@ describe Freeclimb::LogLevel do let(:instance) { Freeclimb::LogLevel.new } - describe 'test an instance of LogLevel' do - it 'should create an instance of LogLevel' do + describe "test an instance of LogLevel" do + it "should create an instance of LogLevel" do expect(instance).to be_instance_of(Freeclimb::LogLevel) end end - + describe 'test attribute "INFO"' do - it 'should work' do + it "should work" do expect { Freeclimb::LogLevel::INFO = "info" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::LogLevel::INFO - calculatedValue = Freeclimb::LogLevel::build_from_hash("info") + calculatedValue = Freeclimb::LogLevel.build_from_hash("info") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "info" calculatedValue = Freeclimb::LogLevel::INFO expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "WARNING"' do - it 'should work' do + it "should work" do expect { Freeclimb::LogLevel::WARNING = "warning" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::LogLevel::WARNING - calculatedValue = Freeclimb::LogLevel::build_from_hash("warning") + calculatedValue = Freeclimb::LogLevel.build_from_hash("warning") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "warning" calculatedValue = Freeclimb::LogLevel::WARNING expect(expectedValue).to eq(calculatedValue) @@ -60,19 +58,18 @@ end describe 'test attribute "ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::LogLevel::ERROR = "error" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::LogLevel::ERROR - calculatedValue = Freeclimb::LogLevel::build_from_hash("error") + calculatedValue = Freeclimb::LogLevel.build_from_hash("error") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "error" calculatedValue = Freeclimb::LogLevel::ERROR expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/log_list_spec.rb b/spec/models/log_list_spec.rb index a95692e1..ea597c2c 100644 --- a/spec/models/log_list_spec.rb +++ b/spec/models/log_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::LogList @@ -21,541 +19,303 @@ describe Freeclimb::LogList do let(:instance) { Freeclimb::LogList.new } - describe 'test an instance of LogList' do - it 'should create an instance of LogList' do + describe "test an instance of LogList" do + it "should create an instance of LogList" do expect(instance).to be_instance_of(Freeclimb::LogList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "logs"' do - it 'should work' do - + it "should work" do instance.logs = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.logs).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.logs).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::LogList' do - expect { instance = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::LogList.new( + it "properly initializes with values" do + expect { + Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::LogList.new( - - ) - expect(instance.valid?).to eq(false) + logs: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::LogList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::LogList" do + expect { + Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + logs: [], - - ) - instance_2 = Freeclimb::LogList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + logs: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::LogList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::LogList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::LogList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] + ) + instance_2 = Freeclimb::LogList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::LogList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - logs: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + logs: [] ) instance_2 = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - logs: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + logs: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) instance_2 = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::LogList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - logs: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of logs' do + + it "deserializes the data of logs" do expect(instance._deserialize("Array", instance.logs)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) instance_2 = Freeclimb::LogList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - logs: Array.new(), - - - + + logs: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::LogList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - logs: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + logs: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns logs in the form of hash' do + it "returns logs in the form of hash" do expect(instance._to_hash(instance.logs)).to eq(instance.logs) end end - end diff --git a/spec/models/log_result_spec.rb b/spec/models/log_result_spec.rb index d3ca0268..333ded04 100644 --- a/spec/models/log_result_spec.rb +++ b/spec/models/log_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::LogResult @@ -21,546 +19,289 @@ describe Freeclimb::LogResult do let(:instance) { Freeclimb::LogResult.new } - describe 'test an instance of LogResult' do - it 'should create an instance of LogResult' do + describe "test an instance of LogResult" do + it "should create an instance of LogResult" do expect(instance).to be_instance_of(Freeclimb::LogResult) end end - + describe 'test attribute "timestamp"' do - it 'should work' do - - + it "should work" do instance.timestamp = 1 expect(instance.timestamp).to eq(1) - - - end end - describe 'test attribute "level"' do - it 'assigns value INFO' do + it "assigns value INFO" do instance.level = Freeclimb::LogLevel::INFO - expect(instance.level).to eq(Freeclimb::LogLevel::INFO) + expect(instance.level).to eq(Freeclimb::LogLevel::INFO) end - it 'assigns value WARNING' do + it "assigns value WARNING" do instance.level = Freeclimb::LogLevel::WARNING - expect(instance.level).to eq(Freeclimb::LogLevel::WARNING) + expect(instance.level).to eq(Freeclimb::LogLevel::WARNING) end - it 'assigns value ERROR' do + it "assigns value ERROR" do instance.level = Freeclimb::LogLevel::ERROR - expect(instance.level).to eq(Freeclimb::LogLevel::ERROR) + expect(instance.level).to eq(Freeclimb::LogLevel::ERROR) end end describe 'test attribute "request_id"' do - it 'should work' do - + it "should work" do instance.request_id = "TEST_STRING" - expect(instance.request_id).to eq("TEST_STRING") - - - + expect(instance.request_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "message"' do - it 'should work' do - + it "should work" do instance.message = "TEST_STRING" - expect(instance.message).to eq("TEST_STRING") - - - + expect(instance.message).to eq("TEST_STRING") end end describe 'test attribute "metadata"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.metadata = testObject expect(instance.metadata).to eq(testObject) - - + instance.metadata = Object.new expect(instance.metadata).to be_instance_of(Object) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - - metadata: Object.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::LogResult' do - expect { instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - - metadata: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::LogResult.new( + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - - metadata: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::LogResult" do + expect { + Freeclimb::LogResult.new( + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::LogResult.new( + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: Object.new(), - + + metadata: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::LogResult.new( + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::LogResult.new - skip 'checks if properties are invalid' do - instance = Freeclimb::LogResult.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - obj_Object = Object.new() - + it "checks if objects are equal" do + obj_Object = Object.new + instance_1 = Freeclimb::LogResult.new( - timestamp: 1, - - - - - - - level: Freeclimb::LogLevel::INFO, - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - metadata: obj_Object, - - + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: obj_Object ) instance_2 = Freeclimb::LogResult.new( - - - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - metadata: obj_Object, - - + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: obj_Object ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::LogResult.new( - timestamp: 2, - - - - - - - level: Freeclimb::LogLevel::INFO, - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - metadata: Object.new(), - - metadata: Object.new(), - + timestamp: 2, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new, + + metadata: Object.new ) instance_2 = Freeclimb::LogResult.new( - timestamp: 1, - - - - - - - level: nil, - - - request_id: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - message: "ST", - - - - - - metadata: Object.new(), - - + timestamp: 1, + + level: nil, + + request_id: "ST", + + account_id: "ST", + + call_id: "ST", + + message: "ST", + + metadata: Object.new ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - - metadata: Object.new(), - - ) + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: Object.new(), - + + metadata: Object.new ) instance_2 = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: Object.new(), - + + metadata: Object.new ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -569,239 +310,117 @@ describe 'test method "_deserialize"' do instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - - level: Freeclimb::LogLevel::INFO, - - - - - request_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - message: "TS", - - - - - - - metadata: Object.new(), - + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS", + + metadata: Object.new ) - it 'deserializes the data of timestamp' do + it "deserializes the data of timestamp" do expect(instance._deserialize("Integer", instance.timestamp)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of request_id' do + + it "deserializes the data of request_id" do expect(instance._deserialize("String", instance.request_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of message' do + + it "deserializes the data of message" do expect(instance._deserialize("String", instance.message)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of metadata' do + + it "deserializes the data of metadata" do expect(instance._deserialize("Object", instance.metadata)).to be_a_kind_of(Object) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: Object.new, - + + metadata: Object.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: Object.new, - + + metadata: Object.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - obj = Object.new() - + it "creates equal hash for two equal objects" do + obj = Object.new + instance_1 = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: obj, - + + metadata: obj ) instance_2 = Freeclimb::LogResult.new( timestamp: 1, - - - - + level: Freeclimb::LogLevel::INFO, - - - - + request_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + message: "TS", - - - - - - - metadata: obj, - + + metadata: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -809,52 +428,38 @@ describe 'test method "_to_hash"' do instance = Freeclimb::LogResult.new( - timestamp: 1, - - - - level: Freeclimb::LogLevel::INFO, - - - - request_id: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - message: "TS", - - - - ) - it 'returns timestamp in the form of hash' do + timestamp: 1, + + level: Freeclimb::LogLevel::INFO, + + request_id: "TS", + + account_id: "TS", + + call_id: "TS", + + message: "TS" + ) + it "returns timestamp in the form of hash" do expect(instance._to_hash(instance.timestamp)).to eq(instance.timestamp) end - it 'returns level in the form of hash' do + it "returns level in the form of hash" do expect(instance._to_hash(instance.level)).to eq(instance.level) end - it 'returns request_id in the form of hash' do + it "returns request_id in the form of hash" do expect(instance._to_hash(instance.request_id)).to eq(instance.request_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns message in the form of hash' do + it "returns message in the form of hash" do expect(instance._to_hash(instance.message)).to eq(instance.message) end - it 'returns metadata in the form of hash' do + it "returns metadata in the form of hash" do expect(instance._to_hash(instance.metadata)).to eq(instance.metadata) end end - end diff --git a/spec/models/machine_detected_webhook_spec.rb b/spec/models/machine_detected_webhook_spec.rb index 72a66b39..4e0033eb 100644 --- a/spec/models/machine_detected_webhook_spec.rb +++ b/spec/models/machine_detected_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MachineDetectedWebhook @@ -21,848 +19,434 @@ describe Freeclimb::MachineDetectedWebhook do let(:instance) { Freeclimb::MachineDetectedWebhook.new } - describe 'test an instance of MachineDetectedWebhook' do - it 'should create an instance of MachineDetectedWebhook' do + describe "test an instance of MachineDetectedWebhook" do + it "should create an instance of MachineDetectedWebhook" do expect(instance).to be_instance_of(Freeclimb::MachineDetectedWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of MachineDetectedWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of MachineDetectedWebhook" do payload = '{ "requestType": "machineDetected" }' expect(Freeclimb::MachineDetectedWebhook.deserialize(payload)).to be_instance_of(Freeclimb::MachineDetectedWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end - describe 'test attribute "machine_type"' do - it 'assigns value ANSWERING_MACHINE' do + it "assigns value ANSWERING_MACHINE" do instance.machine_type = Freeclimb::MachineType::ANSWERING_MACHINE - expect(instance.machine_type).to eq(Freeclimb::MachineType::ANSWERING_MACHINE) + expect(instance.machine_type).to eq(Freeclimb::MachineType::ANSWERING_MACHINE) end - it 'assigns value FAX_MODEM' do + it "assigns value FAX_MODEM" do instance.machine_type = Freeclimb::MachineType::FAX_MODEM - expect(instance.machine_type).to eq(Freeclimb::MachineType::FAX_MODEM) + expect(instance.machine_type).to eq(Freeclimb::MachineType::FAX_MODEM) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MachineDetectedWebhook' do - expect { instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MachineDetectedWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::MachineDetectedWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - - ) - expect(instance.valid?).to eq(true) - end + parent_call_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::MachineDetectedWebhook.new( - - ) - expect(instance.valid?).to eq(false) + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::MachineDetectedWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::MachineDetectedWebhook" do + expect { + Freeclimb::MachineDetectedWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - - + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - ) - instance_2 = Freeclimb::MachineDetectedWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MachineDetectedWebhook.new( request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - - + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MachineDetectedWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MachineDetectedWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MachineDetectedWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE + ) + instance_2 = Freeclimb::MachineDetectedWebhook.new( + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) instance_2 = Freeclimb::MachineDetectedWebhook.new( - - request_type: "ST", - - - - - call_id: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - parent_call_id: "ST", - - - - - - - machine_type: nil, - + request_type: "ST", + + call_id: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + parent_call_id: "ST", + + machine_type: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - - ) + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) instance_2 = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -871,359 +455,163 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - - call_id: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) instance_2 = Freeclimb::MachineDetectedWebhook.new( - request_type: "TS", - - - - + call_id: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - - + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1231,83 +619,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MachineDetectedWebhook.new( - - request_type: "TS", - - - - call_id: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - parent_call_id: "TS", - - - - machine_type: Freeclimb::MachineType::ANSWERING_MACHINE, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + call_id: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS", + + machine_type: Freeclimb::MachineType::ANSWERING_MACHINE + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end - it 'returns machine_type in the form of hash' do + it "returns machine_type in the form of hash" do expect(instance._to_hash(instance.machine_type)).to eq(instance.machine_type) end end - end diff --git a/spec/models/machine_type_spec.rb b/spec/models/machine_type_spec.rb index 61251dec..5e877945 100644 --- a/spec/models/machine_type_spec.rb +++ b/spec/models/machine_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MachineType @@ -21,22 +19,22 @@ describe Freeclimb::MachineType do let(:instance) { Freeclimb::MachineType.new } - describe 'test an instance of MachineType' do - it 'should create an instance of MachineType' do + describe "test an instance of MachineType" do + it "should create an instance of MachineType" do expect(instance).to be_instance_of(Freeclimb::MachineType) end end - + describe 'test attribute "ANSWERING_MACHINE"' do - it 'should work' do + it "should work" do expect { Freeclimb::MachineType::ANSWERING_MACHINE = "answering machine" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MachineType::ANSWERING_MACHINE - calculatedValue = Freeclimb::MachineType::build_from_hash("answering machine") + calculatedValue = Freeclimb::MachineType.build_from_hash("answering machine") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "answering machine" calculatedValue = Freeclimb::MachineType::ANSWERING_MACHINE expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "FAX_MODEM"' do - it 'should work' do + it "should work" do expect { Freeclimb::MachineType::FAX_MODEM = "fax modem" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MachineType::FAX_MODEM - calculatedValue = Freeclimb::MachineType::build_from_hash("fax modem") + calculatedValue = Freeclimb::MachineType.build_from_hash("fax modem") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "fax modem" calculatedValue = Freeclimb::MachineType::FAX_MODEM expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/make_call_request_spec.rb b/spec/models/make_call_request_spec.rb index 240b443e..0bb8e5b7 100644 --- a/spec/models/make_call_request_spec.rb +++ b/spec/models/make_call_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MakeCallRequest @@ -21,725 +19,361 @@ describe Freeclimb::MakeCallRequest do let(:instance) { Freeclimb::MakeCallRequest.new } - describe 'test an instance of MakeCallRequest' do - it 'should create an instance of MakeCallRequest' do + describe "test an instance of MakeCallRequest" do + it "should create an instance of MakeCallRequest" do expect(instance).to be_instance_of(Freeclimb::MakeCallRequest) end end - + describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test attribute "send_digits"' do - it 'should work' do - + it "should work" do instance.send_digits = "TEST_STRING" - expect(instance.send_digits).to eq("TEST_STRING") - - - + expect(instance.send_digits).to eq("TEST_STRING") end end describe 'test attribute "if_machine"' do - it 'should work' do - + it "should work" do instance.if_machine = "TEST_STRING" - expect(instance.if_machine).to eq("TEST_STRING") - - - + expect(instance.if_machine).to eq("TEST_STRING") end end describe 'test attribute "if_machine_url"' do - it 'should work' do - + it "should work" do instance.if_machine_url = "TEST_STRING" - expect(instance.if_machine_url).to eq("TEST_STRING") - - - + expect(instance.if_machine_url).to eq("TEST_STRING") end end describe 'test attribute "timeout"' do - it 'should work' do - - + it "should work" do instance.timeout = 1 expect(instance.timeout).to eq(1) - - - end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test attribute "call_connect_url"' do - it 'should work' do - + it "should work" do instance.call_connect_url = "TEST_STRING" - expect(instance.call_connect_url).to eq("TEST_STRING") - - - + expect(instance.call_connect_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 1, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MakeCallRequest' do - expect { instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 1, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 1, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MakeCallRequest.new( - + it "properly initializes with values" do + expect { + Freeclimb::MakeCallRequest.new( from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + privacy_mode: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::MakeCallRequest.new( - - ) - expect(instance.valid?).to eq(false) + call_connect_url: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::MakeCallRequest.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::MakeCallRequest" do + expect { + Freeclimb::MakeCallRequest.new( from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - + call_connect_url: "TS", - - - - ) - instance_2 = Freeclimb::MakeCallRequest.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MakeCallRequest.new( from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - - - + timeout: 1, - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - + call_connect_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MakeCallRequest.new( + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MakeCallRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MakeCallRequest.new( + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" + ) + instance_2 = Freeclimb::MakeCallRequest.new( + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 2, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 2, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" ) instance_2 = Freeclimb::MakeCallRequest.new( - - from: "ST", - - - - - to: "ST", - - - - - application_id: "ST", - - - - - send_digits: "ST", - - - - - if_machine: "ST", - - - - - if_machine_url: "ST", - - - - timeout: 1, - - - - - parent_call_id: "ST", - - - - privacy_mode: false, - - - - - call_connect_url: "ST", - - - + from: "ST", + + to: "ST", + + application_id: "ST", + + send_digits: "ST", + + if_machine: "ST", + + if_machine_url: "ST", + + timeout: 1, + + parent_call_id: "ST", + + privacy_mode: false, + + call_connect_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 1, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - - ) + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) instance_2 = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -748,327 +382,160 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - - to: "TS", - - - - - application_id: "TS", - - - - - send_digits: "TS", - - - - - if_machine: "TS", - - - - - if_machine_url: "TS", - - - - timeout: 1, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - - call_connect_url: "TS", - - - + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" ) - it 'deserializes the data of from' do + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of send_digits' do + + it "deserializes the data of send_digits" do expect(instance._deserialize("String", instance.send_digits)).to be_a_kind_of(String) end - - - it 'deserializes the data of if_machine' do + + it "deserializes the data of if_machine" do expect(instance._deserialize("String", instance.if_machine)).to be_a_kind_of(String) end - - - it 'deserializes the data of if_machine_url' do + + it "deserializes the data of if_machine_url" do expect(instance._deserialize("String", instance.if_machine_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of timeout' do + + it "deserializes the data of timeout" do expect(instance._deserialize("Integer", instance.timeout)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of call_connect_url' do + it "deserializes the data of call_connect_url" do expect(instance._deserialize("String", instance.call_connect_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) instance_2 = Freeclimb::MakeCallRequest.new( - from: "TS", - - - - + to: "TS", - - - - + application_id: "TS", - - - - + send_digits: "TS", - - - - + if_machine: "TS", - - - - + if_machine_url: "TS", - - - + timeout: 1, - - - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - - call_connect_url: "TS", - - - + + call_connect_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1076,74 +543,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MakeCallRequest.new( - - from: "TS", - - - - to: "TS", - - - - application_id: "TS", - - - - send_digits: "TS", - - - - if_machine: "TS", - - - - if_machine_url: "TS", - - - timeout: 1, - - - - parent_call_id: "TS", - - - privacy_mode: true, - - - - call_connect_url: "TS", - - ) - it 'returns from in the form of hash' do + from: "TS", + + to: "TS", + + application_id: "TS", + + send_digits: "TS", + + if_machine: "TS", + + if_machine_url: "TS", + + timeout: 1, + + parent_call_id: "TS", + + privacy_mode: true, + + call_connect_url: "TS" + ) + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns send_digits in the form of hash' do + it "returns send_digits in the form of hash" do expect(instance._to_hash(instance.send_digits)).to eq(instance.send_digits) end - it 'returns if_machine in the form of hash' do + it "returns if_machine in the form of hash" do expect(instance._to_hash(instance.if_machine)).to eq(instance.if_machine) end - it 'returns if_machine_url in the form of hash' do + it "returns if_machine_url in the form of hash" do expect(instance._to_hash(instance.if_machine_url)).to eq(instance.if_machine_url) end - it 'returns timeout in the form of hash' do + it "returns timeout in the form of hash" do expect(instance._to_hash(instance.timeout)).to eq(instance.timeout) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end - it 'returns call_connect_url in the form of hash' do + it "returns call_connect_url in the form of hash" do expect(instance._to_hash(instance.call_connect_url)).to eq(instance.call_connect_url) end end - end diff --git a/spec/models/message_delivery_webhook_spec.rb b/spec/models/message_delivery_webhook_spec.rb index 132dc5d8..8c7a5712 100644 --- a/spec/models/message_delivery_webhook_spec.rb +++ b/spec/models/message_delivery_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageDeliveryWebhook @@ -21,753 +19,367 @@ describe Freeclimb::MessageDeliveryWebhook do let(:instance) { Freeclimb::MessageDeliveryWebhook.new } - describe 'test an instance of MessageDeliveryWebhook' do - it 'should create an instance of MessageDeliveryWebhook' do + describe "test an instance of MessageDeliveryWebhook" do + it "should create an instance of MessageDeliveryWebhook" do expect(instance).to be_instance_of(Freeclimb::MessageDeliveryWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of MessageDeliveryWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of MessageDeliveryWebhook" do payload = '{ "requestType": "messageDelivery" }' expect(Freeclimb::MessageDeliveryWebhook.deserialize(payload)).to be_instance_of(Freeclimb::MessageDeliveryWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "direction"' do - it 'should work' do - + it "should work" do instance.direction = "TEST_STRING" - expect(instance.direction).to eq("TEST_STRING") - - - + expect(instance.direction).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test attribute "status"' do - it 'should work' do - + it "should work" do instance.status = "TEST_STRING" - expect(instance.status).to eq("TEST_STRING") - - - + expect(instance.status).to eq("TEST_STRING") end end describe 'test attribute "phone_number_id"' do - it 'should work' do - + it "should work" do instance.phone_number_id = "TEST_STRING" - expect(instance.phone_number_id).to eq("TEST_STRING") - - - + expect(instance.phone_number_id).to eq("TEST_STRING") end end describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageDeliveryWebhook' do - expect { instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MessageDeliveryWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::MessageDeliveryWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + phone_number_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::MessageDeliveryWebhook.new( - - ) - expect(instance.valid?).to eq(false) + uri: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::MessageDeliveryWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::MessageDeliveryWebhook" do + expect { + Freeclimb::MessageDeliveryWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - + uri: "TS", - - - - ) - instance_2 = Freeclimb::MessageDeliveryWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MessageDeliveryWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - + uri: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MessageDeliveryWebhook.new( + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MessageDeliveryWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MessageDeliveryWebhook.new( + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" + ) + instance_2 = Freeclimb::MessageDeliveryWebhook.new( + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" ) instance_2 = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - text: "ST", - - - - - direction: "ST", - - - - - application_id: "ST", - - - - - status: "ST", - - - - - phone_number_id: "ST", - - - - - uri: "ST", - - - + request_type: "ST", + + account_id: "ST", + + from: "ST", + + to: "ST", + + text: "ST", + + direction: "ST", + + application_id: "ST", + + status: "ST", + + phone_number_id: "ST", + + uri: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) instance_2 = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -776,337 +388,161 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: "TS", - - - - - phone_number_id: "TS", - - - - - uri: "TS", - - - + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of text' do + + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of direction' do + + it "deserializes the data of direction" do expect(instance._deserialize("String", instance.direction)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of status' do + + it "deserializes the data of status" do expect(instance._deserialize("String", instance.status)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone_number_id' do + + it "deserializes the data of phone_number_id" do expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of uri' do + + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) instance_2 = Freeclimb::MessageDeliveryWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: "TS", - - - - + phone_number_id: "TS", - - - - - uri: "TS", - - - + + uri: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1114,76 +550,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessageDeliveryWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - text: "TS", - - - - direction: "TS", - - - - application_id: "TS", - - - - status: "TS", - - - - phone_number_id: "TS", - - - - uri: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: "TS", + + phone_number_id: "TS", + + uri: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns text in the form of hash' do + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns phone_number_id in the form of hash' do + it "returns phone_number_id in the form of hash" do expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id) end - it 'returns uri in the form of hash' do + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end end - end diff --git a/spec/models/message_direction_spec.rb b/spec/models/message_direction_spec.rb index 0dbe242c..a0bc33dd 100644 --- a/spec/models/message_direction_spec.rb +++ b/spec/models/message_direction_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageDirection @@ -21,22 +19,22 @@ describe Freeclimb::MessageDirection do let(:instance) { Freeclimb::MessageDirection.new } - describe 'test an instance of MessageDirection' do - it 'should create an instance of MessageDirection' do + describe "test an instance of MessageDirection" do + it "should create an instance of MessageDirection" do expect(instance).to be_instance_of(Freeclimb::MessageDirection) end end - + describe 'test attribute "INBOUND"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageDirection::INBOUND = "inbound" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageDirection::INBOUND - calculatedValue = Freeclimb::MessageDirection::build_from_hash("inbound") + calculatedValue = Freeclimb::MessageDirection.build_from_hash("inbound") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "inbound" calculatedValue = Freeclimb::MessageDirection::INBOUND expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "OUTBOUND"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageDirection::OUTBOUND = "outbound" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageDirection::OUTBOUND - calculatedValue = Freeclimb::MessageDirection::build_from_hash("outbound") + calculatedValue = Freeclimb::MessageDirection.build_from_hash("outbound") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outbound" calculatedValue = Freeclimb::MessageDirection::OUTBOUND expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/message_request_spec.rb b/spec/models/message_request_spec.rb index da73966c..e63cdcef 100644 --- a/spec/models/message_request_spec.rb +++ b/spec/models/message_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageRequest @@ -21,658 +19,332 @@ describe Freeclimb::MessageRequest do let(:instance) { Freeclimb::MessageRequest.new } - describe 'test an instance of MessageRequest' do - it 'should create an instance of MessageRequest' do + describe "test an instance of MessageRequest" do + it "should create an instance of MessageRequest" do expect(instance).to be_instance_of(Freeclimb::MessageRequest) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test attribute "media_urls"' do - it 'should work' do - + it "should work" do instance.media_urls = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageRequest' do - expect { instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MessageRequest.new( - + it "properly initializes with values" do + expect { + Freeclimb::MessageRequest.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + notification_url: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::MessageRequest.new( - - ) - expect(instance.valid?).to eq(false) + media_urls: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::MessageRequest.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::MessageRequest" do + expect { + Freeclimb::MessageRequest.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - - + media_urls: [], - - ) - instance_2 = Freeclimb::MessageRequest.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MessageRequest.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - - + media_urls: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MessageRequest.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MessageRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MessageRequest.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] + ) + instance_2 = Freeclimb::MessageRequest.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - - - media_urls: [], - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] ) instance_2 = Freeclimb::MessageRequest.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - from: "ST", - - - - - to: "ST", - - - - - text: "ST", - - - - - notification_url: "ST", - - - - - - media_urls: nil, - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + from: "ST", + + to: "ST", + + text: "ST", + + notification_url: "ST", + + media_urls: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) instance_2 = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -681,296 +353,147 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - media_urls: Array.new(), - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of text' do + + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of notification_url' do + + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of media_urls' do + + it "deserializes the data of media_urls" do expect(instance._deserialize("Array", instance.media_urls)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) instance_2 = Freeclimb::MessageRequest.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - - media_urls: Array.new(), - - - + + media_urls: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -978,67 +501,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessageRequest.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - from: "TS", - - - - to: "TS", - - - - text: "TS", - - - - notification_url: "TS", - - - media_urls: Array.new(), - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + from: "TS", + + to: "TS", + + text: "TS", + + notification_url: "TS", + + media_urls: [] + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns text in the form of hash' do + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end - it 'returns media_urls in the form of hash' do + it "returns media_urls in the form of hash" do expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls) end end - end diff --git a/spec/models/message_result_spec.rb b/spec/models/message_result_spec.rb index 2005a566..58dbebdf 100644 --- a/spec/models/message_result_spec.rb +++ b/spec/models/message_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageResult @@ -21,1944 +19,920 @@ describe Freeclimb::MessageResult do let(:instance) { Freeclimb::MessageResult.new } - describe 'test an instance of MessageResult' do - it 'should create an instance of MessageResult' do + describe "test an instance of MessageResult" do + it "should create an instance of MessageResult" do expect(instance).to be_instance_of(Freeclimb::MessageResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "message_id"' do - it 'should work' do - + it "should work" do instance.message_id = "TEST_STRING" - expect(instance.message_id).to eq("TEST_STRING") - - - + expect(instance.message_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value NEW' do + it "assigns value NEW" do instance.status = Freeclimb::MessageStatus::NEW - expect(instance.status).to eq(Freeclimb::MessageStatus::NEW) + expect(instance.status).to eq(Freeclimb::MessageStatus::NEW) end - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.status = Freeclimb::MessageStatus::QUEUED - expect(instance.status).to eq(Freeclimb::MessageStatus::QUEUED) + expect(instance.status).to eq(Freeclimb::MessageStatus::QUEUED) end - it 'assigns value REJECTED' do + it "assigns value REJECTED" do instance.status = Freeclimb::MessageStatus::REJECTED - expect(instance.status).to eq(Freeclimb::MessageStatus::REJECTED) + expect(instance.status).to eq(Freeclimb::MessageStatus::REJECTED) end - it 'assigns value SENDING' do + it "assigns value SENDING" do instance.status = Freeclimb::MessageStatus::SENDING - expect(instance.status).to eq(Freeclimb::MessageStatus::SENDING) + expect(instance.status).to eq(Freeclimb::MessageStatus::SENDING) end - it 'assigns value SENT' do + it "assigns value SENT" do instance.status = Freeclimb::MessageStatus::SENT - expect(instance.status).to eq(Freeclimb::MessageStatus::SENT) + expect(instance.status).to eq(Freeclimb::MessageStatus::SENT) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.status = Freeclimb::MessageStatus::FAILED - expect(instance.status).to eq(Freeclimb::MessageStatus::FAILED) + expect(instance.status).to eq(Freeclimb::MessageStatus::FAILED) end - it 'assigns value RECEIVED' do + it "assigns value RECEIVED" do instance.status = Freeclimb::MessageStatus::RECEIVED - expect(instance.status).to eq(Freeclimb::MessageStatus::RECEIVED) + expect(instance.status).to eq(Freeclimb::MessageStatus::RECEIVED) end - it 'assigns value UNDELIVERED' do + it "assigns value UNDELIVERED" do instance.status = Freeclimb::MessageStatus::UNDELIVERED - expect(instance.status).to eq(Freeclimb::MessageStatus::UNDELIVERED) + expect(instance.status).to eq(Freeclimb::MessageStatus::UNDELIVERED) end - it 'assigns value EXPIRED' do + it "assigns value EXPIRED" do instance.status = Freeclimb::MessageStatus::EXPIRED - expect(instance.status).to eq(Freeclimb::MessageStatus::EXPIRED) + expect(instance.status).to eq(Freeclimb::MessageStatus::EXPIRED) end - it 'assigns value DELETED' do + it "assigns value DELETED" do instance.status = Freeclimb::MessageStatus::DELETED - expect(instance.status).to eq(Freeclimb::MessageStatus::DELETED) + expect(instance.status).to eq(Freeclimb::MessageStatus::DELETED) end - it 'assigns value UNKNOWN' do + it "assigns value UNKNOWN" do instance.status = Freeclimb::MessageStatus::UNKNOWN - expect(instance.status).to eq(Freeclimb::MessageStatus::UNKNOWN) + expect(instance.status).to eq(Freeclimb::MessageStatus::UNKNOWN) end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "direction"' do - it 'should work' do - + it "should work" do instance.direction = "TEST_STRING" - expect(instance.direction).to eq("TEST_STRING") - - - + expect(instance.direction).to eq("TEST_STRING") end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test attribute "brand_id"' do - it 'should work' do - + it "should work" do instance.brand_id = "TEST_STRING" - expect(instance.brand_id).to eq("TEST_STRING") - - - + expect(instance.brand_id).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test attribute "segment_count"' do - it 'should work' do - - + it "should work" do instance.segment_count = 1.0 expect(instance.segment_count).to eq(1.0) - - - end end describe 'test attribute "media_urls"' do - it 'should work' do - + it "should work" do instance.media_urls = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test attribute "tfn"' do - it 'should work' do - - - + it "should work" do instance.tfn = TFN.new expect(instance.tfn).to be_instance_of(TFN) - end end describe 'test attribute "phone_number_id"' do - it 'should work' do - + it "should work" do instance.phone_number_id = "TEST_STRING" - expect(instance.phone_number_id).to eq("TEST_STRING") - - - + expect(instance.phone_number_id).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MessageResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - notification_url: "TS", - - - - - brand_id: "TS", - - - - - campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageResult' do - expect { instance = Freeclimb::MessageResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - notification_url: "TS", - - - - - brand_id: "TS", - - - - - campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new, - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MessageResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - notification_url: "TS", - - - - - brand_id: "TS", - - - - - campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new, - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MessageResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - segment_count: 1, - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + media_urls: [], - skip 'checks if properties are invalid' do - instance = Freeclimb::MessageResult.new( - - ) - expect(instance.valid?).to eq(false) - end - - end + tfn: TFN.new, - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - obj_TFN = TFN.new() - - - - instance_1 = Freeclimb::MessageResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - - - status: Freeclimb::MessageStatus::NEW, - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - notification_url: "TS", - - - - - brand_id: "TS", - - - - - campaign_id: "TS", - - - - - - - - - media_urls: [], - - - - tfn: obj_TFN, - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - ) - instance_2 = Freeclimb::MessageResult.new( - + + application_id: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::MessageResult" do + expect { + Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + account_id: "TS", - - - - + message_id: "TS", - - - - - - + status: Freeclimb::MessageStatus::NEW, - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - - + media_urls: [], - - - - tfn: obj_TFN, - - - + + tfn: TFN.new, + phone_number_id: "TS", - - - - + application_id: "TS", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::MessageResult.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 2, - - - - + + revision: 1, + account_id: "TS", - - - - + message_id: "TS", - - - - - - + status: Freeclimb::MessageStatus::NEW, - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - - + media_urls: [], - - - - tfn: TFN.new(), - - - + + tfn: TFN.new, + phone_number_id: "TS", - - - - + application_id: "TS", - - - - ) - instance_2 = Freeclimb::MessageResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - account_id: "ST", - - - - - message_id: "ST", - - - - - - - status: nil, - - - from: "ST", - - - - - to: "ST", - - - - - text: "ST", - - - - - direction: "ST", - - - - - notification_url: "ST", - - - - - brand_id: "ST", - - - - - campaign_id: "ST", - - - - - - - - - media_urls: nil, - - - - tfn: TFN.new(), - - - - phone_number_id: "ST", - - - - - application_id: "ST", - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::MessageResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - notification_url: "TS", - - - - - brand_id: "TS", - - - - - campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::MessageResult.new( - + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - + + segment_count: 1, + + media_urls: [], + + tfn: TFN.new, + phone_number_id: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) - instance_2 = Freeclimb::MessageResult.new( - + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MessageResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_TFN = TFN.new + + instance_1 = Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - - phone_number_id: "TS", - - - - - application_id: "TS", - - - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + media_urls: [], - describe 'test method "_deserialize"' do - instance = Freeclimb::MessageResult.new( - + tfn: obj_TFN, + + phone_number_id: "TS", + + application_id: "TS" + ) + instance_2 = Freeclimb::MessageResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - - tfn: TFN.new(), - - + + media_urls: [], + + tfn: obj_TFN, + phone_number_id: "TS", - - - - - application_id: "TS", - - - - ) - it 'deserializes the data of uri' do - expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) - end - - - it 'deserializes the data of date_created' do - expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) - end - - - it 'deserializes the data of date_updated' do - expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) - end - - - it 'deserializes the data of revision' do - expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) + + application_id: "TS" + ) + expect(instance_1.eql?(instance_2)).to eq(true) end - - - it 'deserializes the data of account_id' do - expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) + + it "checks if objects are not equal" do + instance_1 = Freeclimb::MessageResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + tfn: TFN.new, + + phone_number_id: "TS", + + application_id: "TS" + ) + instance_2 = Freeclimb::MessageResult.new( + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + account_id: "ST", + + message_id: "ST", + + status: nil, + + from: "ST", + + to: "ST", + + text: "ST", + + direction: "ST", + + notification_url: "ST", + + brand_id: "ST", + + campaign_id: "ST", + + media_urls: nil, + + tfn: TFN.new, + + phone_number_id: "ST", + + application_id: "ST" + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::MessageResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + tfn: TFN.new, + + phone_number_id: "TS", + + application_id: "TS" + ) + expect(instance.hash).to be_a_kind_of(Integer) end - - - it 'deserializes the data of message_id' do + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::MessageResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + tfn: TFN.new, + + phone_number_id: "TS", + + application_id: "TS" + ) + instance_2 = Freeclimb::MessageResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + tfn: TFN.new, + + phone_number_id: "TS", + + application_id: "TS" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::MessageResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + tfn: TFN.new, + + phone_number_id: "TS", + + application_id: "TS" + ) + it "deserializes the data of uri" do + expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) + end + + it "deserializes the data of date_created" do + expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) + end + + it "deserializes the data of date_updated" do + expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) + end + + it "deserializes the data of revision" do + expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) + end + + it "deserializes the data of account_id" do + expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) + end + + it "deserializes the data of message_id" do expect(instance._deserialize("String", instance.message_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of text' do + + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of direction' do + + it "deserializes the data of direction" do expect(instance._deserialize("String", instance.direction)).to be_a_kind_of(String) end - - - it 'deserializes the data of notification_url' do + + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of brand_id' do + + it "deserializes the data of brand_id" do expect(instance._deserialize("String", instance.brand_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of segment_count' do + + it "deserializes the data of segment_count" do expect(instance._deserialize("Float", instance.segment_count)).to be_a_kind_of(Float) end - - - it 'deserializes the data of media_urls' do + + it "deserializes the data of media_urls" do expect(instance._deserialize("Array", instance.media_urls)).to be_a_kind_of(Array) end - - - - - it 'deserializes the data of tfn' do + + it "deserializes the data of tfn" do expect(instance._deserialize("Object", instance.tfn)).to be_a_kind_of(TFN) end - - it 'deserializes the data of phone_number_id' do + + it "deserializes the data of phone_number_id" do expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MessageResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - + + media_urls: [], + tfn: TFN.new, - - + phone_number_id: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MessageResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - + + media_urls: [], + tfn: TFN.new, - - + phone_number_id: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - obj = TFN.new() - - - + it "creates equal hash for two equal objects" do + obj = TFN.new + instance_1 = Freeclimb::MessageResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - + + media_urls: [], + tfn: obj, - - + phone_number_id: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) instance_2 = Freeclimb::MessageResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + notification_url: "TS", - - - - + brand_id: "TS", - - - - + campaign_id: "TS", - - - - - - - media_urls: Array.new(), - - - - - - + + media_urls: [], + tfn: obj, - - + phone_number_id: "TS", - - - - - application_id: "TS", - - - + + application_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1966,133 +940,96 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessageResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - account_id: "TS", - - - - message_id: "TS", - - - - status: Freeclimb::MessageStatus::NEW, - - - - from: "TS", - - - - to: "TS", - - - - text: "TS", - - - - direction: "TS", - - - - notification_url: "TS", - - - - brand_id: "TS", - - - - campaign_id: "TS", - - - - - media_urls: Array.new(), - - - - - - phone_number_id: "TS", - - - - application_id: "TS", - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + message_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + notification_url: "TS", + + brand_id: "TS", + + campaign_id: "TS", + + media_urls: [], + + phone_number_id: "TS", + + application_id: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns message_id in the form of hash' do + it "returns message_id in the form of hash" do expect(instance._to_hash(instance.message_id)).to eq(instance.message_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns text in the form of hash' do + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end - it 'returns brand_id in the form of hash' do + it "returns brand_id in the form of hash" do expect(instance._to_hash(instance.brand_id)).to eq(instance.brand_id) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns segment_count in the form of hash' do + it "returns segment_count in the form of hash" do expect(instance._to_hash(instance.segment_count)).to eq(instance.segment_count) end - it 'returns media_urls in the form of hash' do + it "returns media_urls in the form of hash" do expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls) end - it 'returns tfn in the form of hash' do + it "returns tfn in the form of hash" do expect(instance._to_hash(instance.tfn)).to eq(instance.tfn) end - it 'returns phone_number_id in the form of hash' do + it "returns phone_number_id in the form of hash" do expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end end - end diff --git a/spec/models/message_status_spec.rb b/spec/models/message_status_spec.rb index 39023970..071336cd 100644 --- a/spec/models/message_status_spec.rb +++ b/spec/models/message_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageStatus @@ -21,22 +19,22 @@ describe Freeclimb::MessageStatus do let(:instance) { Freeclimb::MessageStatus.new } - describe 'test an instance of MessageStatus' do - it 'should create an instance of MessageStatus' do + describe "test an instance of MessageStatus" do + it "should create an instance of MessageStatus" do expect(instance).to be_instance_of(Freeclimb::MessageStatus) end end - + describe 'test attribute "NEW"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::NEW = "new" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::NEW - calculatedValue = Freeclimb::MessageStatus::build_from_hash("new") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("new") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "new" calculatedValue = Freeclimb::MessageStatus::NEW expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "QUEUED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::QUEUED = "queued" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::QUEUED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("queued") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("queued") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "queued" calculatedValue = Freeclimb::MessageStatus::QUEUED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "REJECTED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::REJECTED = "rejected" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::REJECTED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("rejected") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("rejected") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "rejected" calculatedValue = Freeclimb::MessageStatus::REJECTED expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "SENDING"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::SENDING = "sending" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::SENDING - calculatedValue = Freeclimb::MessageStatus::build_from_hash("sending") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("sending") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "sending" calculatedValue = Freeclimb::MessageStatus::SENDING expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "SENT"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::SENT = "sent" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::SENT - calculatedValue = Freeclimb::MessageStatus::build_from_hash("sent") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("sent") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "sent" calculatedValue = Freeclimb::MessageStatus::SENT expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "FAILED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::FAILED = "failed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::FAILED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("failed") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("failed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "failed" calculatedValue = Freeclimb::MessageStatus::FAILED expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "RECEIVED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::RECEIVED = "received" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::RECEIVED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("received") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("received") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "received" calculatedValue = Freeclimb::MessageStatus::RECEIVED expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "UNDELIVERED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::UNDELIVERED = "undelivered" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::UNDELIVERED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("undelivered") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("undelivered") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "undelivered" calculatedValue = Freeclimb::MessageStatus::UNDELIVERED expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "EXPIRED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::EXPIRED = "expired" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::EXPIRED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("expired") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("expired") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "expired" calculatedValue = Freeclimb::MessageStatus::EXPIRED expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "DELETED"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::DELETED = "deleted" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::DELETED - calculatedValue = Freeclimb::MessageStatus::build_from_hash("deleted") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("deleted") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "deleted" calculatedValue = Freeclimb::MessageStatus::DELETED expect(expectedValue).to eq(calculatedValue) @@ -188,19 +186,18 @@ end describe 'test attribute "UNKNOWN"' do - it 'should work' do + it "should work" do expect { Freeclimb::MessageStatus::UNKNOWN = "unknown" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::MessageStatus::UNKNOWN - calculatedValue = Freeclimb::MessageStatus::build_from_hash("unknown") + calculatedValue = Freeclimb::MessageStatus.build_from_hash("unknown") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "unknown" calculatedValue = Freeclimb::MessageStatus::UNKNOWN expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/message_status_webhook_spec.rb b/spec/models/message_status_webhook_spec.rb index 7d24f37c..32669d39 100644 --- a/spec/models/message_status_webhook_spec.rb +++ b/spec/models/message_status_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessageStatusWebhook @@ -21,856 +19,435 @@ describe Freeclimb::MessageStatusWebhook do let(:instance) { Freeclimb::MessageStatusWebhook.new } - describe 'test an instance of MessageStatusWebhook' do - it 'should create an instance of MessageStatusWebhook' do + describe "test an instance of MessageStatusWebhook" do + it "should create an instance of MessageStatusWebhook" do expect(instance).to be_instance_of(Freeclimb::MessageStatusWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of MessageStatusWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of MessageStatusWebhook" do payload = '{ "requestType": "messageStatus" }' expect(Freeclimb::MessageStatusWebhook.deserialize(payload)).to be_instance_of(Freeclimb::MessageStatusWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "message_id"' do - it 'should work' do - + it "should work" do instance.message_id = "TEST_STRING" - expect(instance.message_id).to eq("TEST_STRING") - - - + expect(instance.message_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "direction"' do - it 'should work' do - + it "should work" do instance.direction = "TEST_STRING" - expect(instance.direction).to eq("TEST_STRING") - - - + expect(instance.direction).to eq("TEST_STRING") end end describe 'test attribute "application_id"' do - it 'should work' do - + it "should work" do instance.application_id = "TEST_STRING" - expect(instance.application_id).to eq("TEST_STRING") - - - + expect(instance.application_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value NEW' do + it "assigns value NEW" do instance.status = Freeclimb::MessageStatus::NEW - expect(instance.status).to eq(Freeclimb::MessageStatus::NEW) + expect(instance.status).to eq(Freeclimb::MessageStatus::NEW) end - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.status = Freeclimb::MessageStatus::QUEUED - expect(instance.status).to eq(Freeclimb::MessageStatus::QUEUED) + expect(instance.status).to eq(Freeclimb::MessageStatus::QUEUED) end - it 'assigns value REJECTED' do + it "assigns value REJECTED" do instance.status = Freeclimb::MessageStatus::REJECTED - expect(instance.status).to eq(Freeclimb::MessageStatus::REJECTED) + expect(instance.status).to eq(Freeclimb::MessageStatus::REJECTED) end - it 'assigns value SENDING' do + it "assigns value SENDING" do instance.status = Freeclimb::MessageStatus::SENDING - expect(instance.status).to eq(Freeclimb::MessageStatus::SENDING) + expect(instance.status).to eq(Freeclimb::MessageStatus::SENDING) end - it 'assigns value SENT' do + it "assigns value SENT" do instance.status = Freeclimb::MessageStatus::SENT - expect(instance.status).to eq(Freeclimb::MessageStatus::SENT) + expect(instance.status).to eq(Freeclimb::MessageStatus::SENT) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.status = Freeclimb::MessageStatus::FAILED - expect(instance.status).to eq(Freeclimb::MessageStatus::FAILED) + expect(instance.status).to eq(Freeclimb::MessageStatus::FAILED) end - it 'assigns value RECEIVED' do + it "assigns value RECEIVED" do instance.status = Freeclimb::MessageStatus::RECEIVED - expect(instance.status).to eq(Freeclimb::MessageStatus::RECEIVED) + expect(instance.status).to eq(Freeclimb::MessageStatus::RECEIVED) end - it 'assigns value UNDELIVERED' do + it "assigns value UNDELIVERED" do instance.status = Freeclimb::MessageStatus::UNDELIVERED - expect(instance.status).to eq(Freeclimb::MessageStatus::UNDELIVERED) + expect(instance.status).to eq(Freeclimb::MessageStatus::UNDELIVERED) end - it 'assigns value EXPIRED' do + it "assigns value EXPIRED" do instance.status = Freeclimb::MessageStatus::EXPIRED - expect(instance.status).to eq(Freeclimb::MessageStatus::EXPIRED) + expect(instance.status).to eq(Freeclimb::MessageStatus::EXPIRED) end - it 'assigns value DELETED' do + it "assigns value DELETED" do instance.status = Freeclimb::MessageStatus::DELETED - expect(instance.status).to eq(Freeclimb::MessageStatus::DELETED) + expect(instance.status).to eq(Freeclimb::MessageStatus::DELETED) end - it 'assigns value UNKNOWN' do + it "assigns value UNKNOWN" do instance.status = Freeclimb::MessageStatus::UNKNOWN - expect(instance.status).to eq(Freeclimb::MessageStatus::UNKNOWN) + expect(instance.status).to eq(Freeclimb::MessageStatus::UNKNOWN) end end describe 'test attribute "phone_number_id"' do - it 'should work' do - + it "should work" do instance.phone_number_id = "TEST_STRING" - expect(instance.phone_number_id).to eq("TEST_STRING") - - - + expect(instance.phone_number_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageStatusWebhook' do - expect { instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MessageStatusWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::MessageStatusWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + status: Freeclimb::MessageStatus::NEW, - skip 'checks if properties are invalid' do - instance = Freeclimb::MessageStatusWebhook.new( - - ) - expect(instance.valid?).to eq(false) + phone_number_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::MessageStatusWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::MessageStatusWebhook" do + expect { + Freeclimb::MessageStatusWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - - - + status: Freeclimb::MessageStatus::NEW, - - + phone_number_id: "TS", - - - - ) - instance_2 = Freeclimb::MessageStatusWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MessageStatusWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - - - + status: Freeclimb::MessageStatus::NEW, - - + phone_number_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MessageStatusWebhook.new( + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MessageStatusWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MessageStatusWebhook.new( + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" + ) + instance_2 = Freeclimb::MessageStatusWebhook.new( + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - - - status: Freeclimb::MessageStatus::NEW, - - - phone_number_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" ) instance_2 = Freeclimb::MessageStatusWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - message_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - text: "ST", - - - - - direction: "ST", - - - - - application_id: "ST", - - - - - - - status: nil, - - - phone_number_id: "ST", - - - + request_type: "ST", + + account_id: "ST", + + message_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + text: "ST", + + direction: "ST", + + application_id: "ST", + + status: nil, + + phone_number_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) instance_2 = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -879,365 +456,171 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - message_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - text: "TS", - - - - - direction: "TS", - - - - - application_id: "TS", - - - - - status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of message_id' do + + it "deserializes the data of message_id" do expect(instance._deserialize("String", instance.message_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of text' do + + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of direction' do + + it "deserializes the data of direction" do expect(instance._deserialize("String", instance.direction)).to be_a_kind_of(String) end - - - it 'deserializes the data of application_id' do + + it "deserializes the data of application_id" do expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of phone_number_id' do + + it "deserializes the data of phone_number_id" do expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) instance_2 = Freeclimb::MessageStatusWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + message_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + text: "TS", - - - - + direction: "TS", - - - - + application_id: "TS", - - - - + status: Freeclimb::MessageStatus::NEW, - - - - - phone_number_id: "TS", - - - + + phone_number_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1245,83 +628,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessageStatusWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - message_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - text: "TS", - - - - direction: "TS", - - - - application_id: "TS", - - - - status: Freeclimb::MessageStatus::NEW, - - - - phone_number_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + message_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + text: "TS", + + direction: "TS", + + application_id: "TS", + + status: Freeclimb::MessageStatus::NEW, + + phone_number_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns message_id in the form of hash' do + it "returns message_id in the form of hash" do expect(instance._to_hash(instance.message_id)).to eq(instance.message_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns text in the form of hash' do + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns application_id in the form of hash' do + it "returns application_id in the form of hash" do expect(instance._to_hash(instance.application_id)).to eq(instance.application_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns phone_number_id in the form of hash' do + it "returns phone_number_id in the form of hash" do expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id) end end - end diff --git a/spec/models/messages_list_spec.rb b/spec/models/messages_list_spec.rb index 2ce54700..1c0c43d4 100644 --- a/spec/models/messages_list_spec.rb +++ b/spec/models/messages_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MessagesList @@ -21,541 +19,303 @@ describe Freeclimb::MessagesList do let(:instance) { Freeclimb::MessagesList.new } - describe 'test an instance of MessagesList' do - it 'should create an instance of MessagesList' do + describe "test an instance of MessagesList" do + it "should create an instance of MessagesList" do expect(instance).to be_instance_of(Freeclimb::MessagesList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "messages"' do - it 'should work' do - + it "should work" do instance.messages = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.messages).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.messages).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MessagesList' do - expect { instance = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MessagesList.new( + it "properly initializes with values" do + expect { + Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::MessagesList.new( - - ) - expect(instance.valid?).to eq(false) + messages: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::MessagesList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::MessagesList" do + expect { + Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + messages: [], - - ) - instance_2 = Freeclimb::MessagesList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + messages: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MessagesList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::MessagesList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::MessagesList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] + ) + instance_2 = Freeclimb::MessagesList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MessagesList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - messages: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + messages: [] ) instance_2 = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - messages: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + messages: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) instance_2 = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MessagesList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - messages: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of messages' do + + it "deserializes the data of messages" do expect(instance._deserialize("Array", instance.messages)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) instance_2 = Freeclimb::MessagesList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - messages: Array.new(), - - - + + messages: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessagesList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - messages: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + messages: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns messages in the form of hash' do + it "returns messages in the form of hash" do expect(instance._to_hash(instance.messages)).to eq(instance.messages) end end - end diff --git a/spec/models/mutable_resource_model_spec.rb b/spec/models/mutable_resource_model_spec.rb index ea957e91..f593de4f 100644 --- a/spec/models/mutable_resource_model_spec.rb +++ b/spec/models/mutable_resource_model_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::MutableResourceModel @@ -21,335 +19,187 @@ describe Freeclimb::MutableResourceModel do let(:instance) { Freeclimb::MutableResourceModel.new } - describe 'test an instance of MutableResourceModel' do - it 'should create an instance of MutableResourceModel' do + describe "test an instance of MutableResourceModel" do + it "should create an instance of MutableResourceModel" do expect(instance).to be_instance_of(Freeclimb::MutableResourceModel) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::MutableResourceModel' do - expect { instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::MutableResourceModel.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::MutableResourceModel" do + expect { + Freeclimb::MutableResourceModel.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::MutableResourceModel.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::MutableResourceModel.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::MutableResourceModel.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::MutableResourceModel.new - skip 'checks if properties are invalid' do - instance = Freeclimb::MutableResourceModel.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) instance_2 = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - - revision: 1, - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2 ) instance_2 = Freeclimb::MutableResourceModel.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -358,146 +208,77 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::MutableResourceModel.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -505,33 +286,25 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MutableResourceModel.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end end - end diff --git a/spec/models/out_dial_api_connect_webhook_spec.rb b/spec/models/out_dial_api_connect_webhook_spec.rb index 32f255ec..e0565da5 100644 --- a/spec/models/out_dial_api_connect_webhook_spec.rb +++ b/spec/models/out_dial_api_connect_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::OutDialApiConnectWebhook @@ -21,781 +19,402 @@ describe Freeclimb::OutDialApiConnectWebhook do let(:instance) { Freeclimb::OutDialApiConnectWebhook.new } - describe 'test an instance of OutDialApiConnectWebhook' do - it 'should create an instance of OutDialApiConnectWebhook' do + describe "test an instance of OutDialApiConnectWebhook" do + it "should create an instance of OutDialApiConnectWebhook" do expect(instance).to be_instance_of(Freeclimb::OutDialApiConnectWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of OutDialApiConnectWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of OutDialApiConnectWebhook" do payload = '{ "requestType": "outDialApiConnect" }' expect(Freeclimb::OutDialApiConnectWebhook.deserialize(payload)).to be_instance_of(Freeclimb::OutDialApiConnectWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::OutDialApiConnectWebhook' do - expect { instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::OutDialApiConnectWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::OutDialApiConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + queue_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::OutDialApiConnectWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::OutDialApiConnectWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::OutDialApiConnectWebhook" do + expect { + Freeclimb::OutDialApiConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::OutDialApiConnectWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::OutDialApiConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::OutDialApiConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::OutDialApiConnectWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::OutDialApiConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::OutDialApiConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - parent_call_id: "ST", - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -804,331 +423,153 @@ describe 'test method "_deserialize"' do instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialApiConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1136,76 +577,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::OutDialApiConnectWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/out_dial_connect_webhook_spec.rb b/spec/models/out_dial_connect_webhook_spec.rb index de670aa7..a330de3c 100644 --- a/spec/models/out_dial_connect_webhook_spec.rb +++ b/spec/models/out_dial_connect_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::OutDialConnectWebhook @@ -21,781 +19,402 @@ describe Freeclimb::OutDialConnectWebhook do let(:instance) { Freeclimb::OutDialConnectWebhook.new } - describe 'test an instance of OutDialConnectWebhook' do - it 'should create an instance of OutDialConnectWebhook' do + describe "test an instance of OutDialConnectWebhook" do + it "should create an instance of OutDialConnectWebhook" do expect(instance).to be_instance_of(Freeclimb::OutDialConnectWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of OutDialConnectWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of OutDialConnectWebhook" do payload = '{ "requestType": "outDialConnect" }' expect(Freeclimb::OutDialConnectWebhook.deserialize(payload)).to be_instance_of(Freeclimb::OutDialConnectWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::OutDialConnectWebhook' do - expect { instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::OutDialConnectWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::OutDialConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + queue_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::OutDialConnectWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::OutDialConnectWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::OutDialConnectWebhook" do + expect { + Freeclimb::OutDialConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::OutDialConnectWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::OutDialConnectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::OutDialConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::OutDialConnectWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::OutDialConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::OutDialConnectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialConnectWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - parent_call_id: "ST", - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -804,331 +423,153 @@ describe 'test method "_deserialize"' do instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialConnectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1136,76 +577,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::OutDialConnectWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/out_dial_spec.rb b/spec/models/out_dial_spec.rb index e96fb60f..5439ad88 100644 --- a/spec/models/out_dial_spec.rb +++ b/spec/models/out_dial_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::OutDial @@ -21,725 +19,364 @@ describe Freeclimb::OutDial do let(:instance) { Freeclimb::OutDial.new } - describe 'test an instance of OutDial' do - it 'should create an instance of OutDial' do + describe "test an instance of OutDial" do + it "should create an instance of OutDial" do expect(instance).to be_instance_of(Freeclimb::OutDial) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "call_connect_url"' do - it 'should work' do - + it "should work" do instance.call_connect_url = "TEST_STRING" - expect(instance.call_connect_url).to eq("TEST_STRING") - - - + expect(instance.call_connect_url).to eq("TEST_STRING") end end describe 'test attribute "calling_number"' do - it 'should work' do - + it "should work" do instance.calling_number = "TEST_STRING" - expect(instance.calling_number).to eq("TEST_STRING") - - - + expect(instance.calling_number).to eq("TEST_STRING") end end describe 'test attribute "destination"' do - it 'should work' do - + it "should work" do instance.destination = "TEST_STRING" - expect(instance.destination).to eq("TEST_STRING") - - - + expect(instance.destination).to eq("TEST_STRING") end end - describe 'test attribute "if_machine"' do - it 'assigns value REDIRECT' do + it "assigns value REDIRECT" do instance.if_machine = Freeclimb::IfMachine::REDIRECT - expect(instance.if_machine).to eq(Freeclimb::IfMachine::REDIRECT) + expect(instance.if_machine).to eq(Freeclimb::IfMachine::REDIRECT) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.if_machine = Freeclimb::IfMachine::HANGUP - expect(instance.if_machine).to eq(Freeclimb::IfMachine::HANGUP) + expect(instance.if_machine).to eq(Freeclimb::IfMachine::HANGUP) end end describe 'test attribute "if_machine_url"' do - it 'should work' do - + it "should work" do instance.if_machine_url = "TEST_STRING" - expect(instance.if_machine_url).to eq("TEST_STRING") - - - + expect(instance.if_machine_url).to eq("TEST_STRING") end end describe 'test attribute "send_digits"' do - it 'should work' do - + it "should work" do instance.send_digits = "TEST_STRING" - expect(instance.send_digits).to eq("TEST_STRING") - - - + expect(instance.send_digits).to eq("TEST_STRING") end end describe 'test attribute "status_callback_url"' do - it 'should work' do - + it "should work" do instance.status_callback_url = "TEST_STRING" - expect(instance.status_callback_url).to eq("TEST_STRING") - - - + expect(instance.status_callback_url).to eq("TEST_STRING") end end describe 'test attribute "timeout"' do - it 'should work' do - - + it "should work" do instance.timeout = 1 expect(instance.timeout).to eq(1) - - - end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::OutDial' do - expect { instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::OutDial.new( - + it "properly initializes with values" do + expect { + Freeclimb::OutDial.new( action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - - ) - expect(instance.valid?).to eq(true) - end + timeout: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::OutDial.new( - - ) - expect(instance.valid?).to eq(false) + privacy_mode: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::OutDial.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::OutDial" do + expect { + Freeclimb::OutDial.new( action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - + privacy_mode: true, - - - - ) - instance_2 = Freeclimb::OutDial.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::OutDial.new( action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - - - + timeout: 1, - + privacy_mode: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::OutDial.new( + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::OutDial.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::OutDial.new( + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true + ) + instance_2 = Freeclimb::OutDial.new( + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 2, - - - - privacy_mode: true, - - - + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 2, + + privacy_mode: true ) instance_2 = Freeclimb::OutDial.new( - - action_url: "ST", - - - - - call_connect_url: "ST", - - - - - calling_number: "ST", - - - - - destination: "ST", - - - - - - - if_machine: nil, - - - if_machine_url: "ST", - - - - - send_digits: "ST", - - - - - status_callback_url: "ST", - - - - timeout: 1, - - - - privacy_mode: false, - - - + action_url: "ST", + + call_connect_url: "ST", + + calling_number: "ST", + + destination: "ST", + + if_machine: nil, + + if_machine_url: "ST", + + send_digits: "ST", + + status_callback_url: "ST", + + timeout: 1, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - - ) + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -748,324 +385,157 @@ describe 'test method "_deserialize"' do instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - - call_connect_url: "TS", - - - - - calling_number: "TS", - - - - - destination: "TS", - - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - - if_machine_url: "TS", - - - - - send_digits: "TS", - - - - - status_callback_url: "TS", - - - - timeout: 1, - - - - privacy_mode: true, - - - + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_connect_url' do + + it "deserializes the data of call_connect_url" do expect(instance._deserialize("String", instance.call_connect_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of calling_number' do + + it "deserializes the data of calling_number" do expect(instance._deserialize("String", instance.calling_number)).to be_a_kind_of(String) end - - - it 'deserializes the data of destination' do + + it "deserializes the data of destination" do expect(instance._deserialize("String", instance.destination)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of if_machine_url' do + + it "deserializes the data of if_machine_url" do expect(instance._deserialize("String", instance.if_machine_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of send_digits' do + + it "deserializes the data of send_digits" do expect(instance._deserialize("String", instance.send_digits)).to be_a_kind_of(String) end - - - it 'deserializes the data of status_callback_url' do + + it "deserializes the data of status_callback_url" do expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of timeout' do + + it "deserializes the data of timeout" do expect(instance._deserialize("Integer", instance.timeout)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::OutDial.new( - action_url: "TS", - - - - + call_connect_url: "TS", - - - - + calling_number: "TS", - - - - + destination: "TS", - - - - + if_machine: Freeclimb::IfMachine::REDIRECT, - - - - + if_machine_url: "TS", - - - - + send_digits: "TS", - - - - + status_callback_url: "TS", - - - + timeout: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1073,74 +543,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::OutDial.new( - - action_url: "TS", - - - - call_connect_url: "TS", - - - - calling_number: "TS", - - - - destination: "TS", - - - - if_machine: Freeclimb::IfMachine::REDIRECT, - - - - if_machine_url: "TS", - - - - send_digits: "TS", - - - - status_callback_url: "TS", - - - timeout: 1, - - - privacy_mode: true, - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + call_connect_url: "TS", + + calling_number: "TS", + + destination: "TS", + + if_machine: Freeclimb::IfMachine::REDIRECT, + + if_machine_url: "TS", + + send_digits: "TS", + + status_callback_url: "TS", + + timeout: 1, + + privacy_mode: true + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns call_connect_url in the form of hash' do + it "returns call_connect_url in the form of hash" do expect(instance._to_hash(instance.call_connect_url)).to eq(instance.call_connect_url) end - it 'returns calling_number in the form of hash' do + it "returns calling_number in the form of hash" do expect(instance._to_hash(instance.calling_number)).to eq(instance.calling_number) end - it 'returns destination in the form of hash' do + it "returns destination in the form of hash" do expect(instance._to_hash(instance.destination)).to eq(instance.destination) end - it 'returns if_machine in the form of hash' do + it "returns if_machine in the form of hash" do expect(instance._to_hash(instance.if_machine)).to eq(instance.if_machine) end - it 'returns if_machine_url in the form of hash' do + it "returns if_machine_url in the form of hash" do expect(instance._to_hash(instance.if_machine_url)).to eq(instance.if_machine_url) end - it 'returns send_digits in the form of hash' do + it "returns send_digits in the form of hash" do expect(instance._to_hash(instance.send_digits)).to eq(instance.send_digits) end - it 'returns status_callback_url in the form of hash' do + it "returns status_callback_url in the form of hash" do expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url) end - it 'returns timeout in the form of hash' do + it "returns timeout in the form of hash" do expect(instance._to_hash(instance.timeout)).to eq(instance.timeout) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/out_dial_start_webhook_spec.rb b/spec/models/out_dial_start_webhook_spec.rb index 5f49a324..646c7c99 100644 --- a/spec/models/out_dial_start_webhook_spec.rb +++ b/spec/models/out_dial_start_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::OutDialStartWebhook @@ -21,848 +19,431 @@ describe Freeclimb::OutDialStartWebhook do let(:instance) { Freeclimb::OutDialStartWebhook.new } - describe 'test an instance of OutDialStartWebhook' do - it 'should create an instance of OutDialStartWebhook' do + describe "test an instance of OutDialStartWebhook" do + it "should create an instance of OutDialStartWebhook" do expect(instance).to be_instance_of(Freeclimb::OutDialStartWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of OutDialStartWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of OutDialStartWebhook" do payload = '{ "requestType": "outDialStart" }' expect(Freeclimb::OutDialStartWebhook.deserialize(payload)).to be_instance_of(Freeclimb::OutDialStartWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "dial_call_id"' do - it 'should work' do - + it "should work" do instance.dial_call_id = "TEST_STRING" - expect(instance.dial_call_id).to eq("TEST_STRING") - - - + expect(instance.dial_call_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::OutDialStartWebhook' do - expect { instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::OutDialStartWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::OutDialStartWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + dial_call_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::OutDialStartWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::OutDialStartWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::OutDialStartWebhook" do + expect { + Freeclimb::OutDialStartWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::OutDialStartWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::OutDialStartWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::OutDialStartWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::OutDialStartWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::OutDialStartWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::OutDialStartWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialStartWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - dial_call_id: "ST", - - - - - parent_call_id: "ST", - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + dial_call_id: "ST", + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -871,362 +452,167 @@ describe 'test method "_deserialize"' do instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of dial_call_id' do + + it "deserializes the data of dial_call_id" do expect(instance._deserialize("String", instance.dial_call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::OutDialStartWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + dial_call_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1234,83 +620,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::OutDialStartWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - dial_call_id: "TS", - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + dial_call_id: "TS", + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns dial_call_id in the form of hash' do + it "returns dial_call_id in the form of hash" do expect(instance._to_hash(instance.dial_call_id)).to eq(instance.dial_call_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/pagination_model_spec.rb b/spec/models/pagination_model_spec.rb index ae69614e..f18f2000 100644 --- a/spec/models/pagination_model_spec.rb +++ b/spec/models/pagination_model_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::PaginationModel @@ -21,486 +19,274 @@ describe Freeclimb::PaginationModel do let(:instance) { Freeclimb::PaginationModel.new } - describe 'test an instance of PaginationModel' do - it 'should create an instance of PaginationModel' do + describe "test an instance of PaginationModel" do + it "should create an instance of PaginationModel" do expect(instance).to be_instance_of(Freeclimb::PaginationModel) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::PaginationModel' do - expect { instance = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::PaginationModel.new( + it "properly initializes with values" do + expect { + Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + page_size: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::PaginationModel.new( - - ) - expect(instance.valid?).to eq(false) + next_page_uri: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - instance_1 = Freeclimb::PaginationModel.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::PaginationModel" do + expect { + Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - ) - instance_2 = Freeclimb::PaginationModel.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::PaginationModel.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::PaginationModel.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::PaginationModel.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" + ) + instance_2 = Freeclimb::PaginationModel.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::PaginationModel.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS" ) instance_2 = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) instance_2 = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -509,214 +295,119 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PaginationModel.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) instance_2 = Freeclimb::PaginationModel.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - + + next_page_uri: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -724,49 +415,40 @@ describe 'test method "_to_hash"' do instance = Freeclimb::PaginationModel.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS" + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end end - end diff --git a/spec/models/park_spec.rb b/spec/models/park_spec.rb index 2a00c447..d4208bc7 100644 --- a/spec/models/park_spec.rb +++ b/spec/models/park_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Park @@ -21,278 +19,158 @@ describe Freeclimb::Park do let(:instance) { Freeclimb::Park.new } - describe 'test an instance of Park' do - it 'should create an instance of Park' do + describe "test an instance of Park" do + it "should create an instance of Park" do expect(instance).to be_instance_of(Freeclimb::Park) end end - + describe 'test attribute "wait_url"' do - it 'should work' do - + it "should work" do instance.wait_url = "TEST_STRING" - expect(instance.wait_url).to eq("TEST_STRING") - - - + expect(instance.wait_url).to eq("TEST_STRING") end end describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::Park.new( + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Park' do - expect { instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Park" do + expect { + Freeclimb::Park.new( + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Park.new( + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Park.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Park.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" ) instance_2 = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" ) instance_2 = Freeclimb::Park.new( - - wait_url: "ST", - - - - - action_url: "ST", - - - - - notification_url: "ST", - - - + wait_url: "ST", + + action_url: "ST", + + notification_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - - ) + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) instance_2 = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -301,120 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - - action_url: "TS", - - - - - notification_url: "TS", - - - + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" ) - it 'deserializes the data of wait_url' do + it "deserializes the data of wait_url" do expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of action_url' do + + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of notification_url' do + + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) instance_2 = Freeclimb::Park.new( - wait_url: "TS", - - - - + action_url: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -422,27 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Park.new( - - wait_url: "TS", - - - - action_url: "TS", - - - - notification_url: "TS", - - ) - it 'returns wait_url in the form of hash' do + wait_url: "TS", + + action_url: "TS", + + notification_url: "TS" + ) + it "returns wait_url in the form of hash" do expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url) end - it 'returns action_url in the form of hash' do + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end end - end diff --git a/spec/models/pause_spec.rb b/spec/models/pause_spec.rb index a3d73694..d5bea0c2 100644 --- a/spec/models/pause_spec.rb +++ b/spec/models/pause_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Pause @@ -21,134 +19,100 @@ describe Freeclimb::Pause do let(:instance) { Freeclimb::Pause.new } - describe 'test an instance of Pause' do - it 'should create an instance of Pause' do + describe "test an instance of Pause" do + it "should create an instance of Pause" do expect(instance).to be_instance_of(Freeclimb::Pause) end end - + describe 'test attribute "length"' do - it 'should work' do - - + it "should work" do instance.length = 1 expect(instance.length).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Pause.new( - length: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Pause' do - expect { instance = Freeclimb::Pause.new( - length: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Pause.new( - length: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Pause.new( + length: 1 + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::Pause" do + expect { + Freeclimb::Pause.new( + length: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Pause.new( + length: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Pause.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Pause.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) instance_2 = Freeclimb::Pause.new( - - - length: 1, - + length: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Pause.new( - length: 2, - - - + length: 2 ) instance_2 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Pause.new( - length: 1, - - - - ) + length: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) instance_2 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -157,53 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) - it 'deserializes the data of length' do + it "deserializes the data of length" do expect(instance._deserialize("Integer", instance.length)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) instance_2 = Freeclimb::Pause.new( - length: 1, - - - + length: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -211,12 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Pause.new( - length: 1, - - ) - it 'returns length in the form of hash' do + length: 1 + ) + it "returns length in the form of hash" do expect(instance._to_hash(instance.length)).to eq(instance.length) end end - end diff --git a/spec/models/percl_command_spec.rb b/spec/models/percl_command_spec.rb index bfceb49c..f063c4f1 100644 --- a/spec/models/percl_command_spec.rb +++ b/spec/models/percl_command_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::PerclCommand @@ -21,134 +19,93 @@ describe Freeclimb::PerclCommand do let(:instance) { Freeclimb::PerclCommand.new } - describe 'test an instance of PerclCommand' do - it 'should create an instance of PerclCommand' do + describe "test an instance of PerclCommand" do + it "should create an instance of PerclCommand" do expect(instance).to be_instance_of(Freeclimb::PerclCommand) end end - describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::PerclCommand' do - expect { instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::PerclCommand.new( + command: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::PerclCommand" do + expect { + Freeclimb::PerclCommand.new( + command: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::PerclCommand.new( + command: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::PerclCommand.new - skip 'checks if properties are invalid' do - instance = Freeclimb::PerclCommand.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) instance_2 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) instance_2 = Freeclimb::PerclCommand.new( - - command: "ST", - - - + command: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - - ) + command: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) instance_2 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -157,58 +114,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) - it 'deserializes the data of command' do + it "deserializes the data of command" do expect(instance._deserialize("String", instance.command)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) instance_2 = Freeclimb::PerclCommand.new( - - command: "TS", - - - + command: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -216,31 +150,28 @@ describe 'test method "_to_hash"' do instance = Freeclimb::PerclCommand.new( - - command: "TS", - - ) - it 'returns command in the form of hash' do + command: "TS" + ) + it "returns command in the form of hash" do expect(instance._to_hash(instance.command)).to eq(instance.command) end end describe 'test method "to_percl_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::PerclCommand.new( - command: "PERCL_COMMAND", + command: "PERCL_COMMAND" ) expect(instance.to_percl_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - obj = Object.new() + it "creates equal hash for two equal objects" do + Object.new instance_1 = Freeclimb::PerclCommand.new( - command: "PERCL_COMMAND", + command: "PERCL_COMMAND" ) instance_2 = Freeclimb::PerclCommand.new( - command: "PERCL_COMMAND", + command: "PERCL_COMMAND" ) expect(instance_1.to_percl_hash).to eq(instance_2.to_percl_hash) end end - end diff --git a/spec/models/percl_script_spec.rb b/spec/models/percl_script_spec.rb index 6c410588..81e1ca37 100644 --- a/spec/models/percl_script_spec.rb +++ b/spec/models/percl_script_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::PerclScript @@ -21,132 +19,100 @@ describe Freeclimb::PerclScript do let(:instance) { Freeclimb::PerclScript.new } - describe 'test an instance of PerclScript' do - it 'should create an instance of PerclScript' do + describe "test an instance of PerclScript" do + it "should create an instance of PerclScript" do expect(instance).to be_instance_of(Freeclimb::PerclScript) end end - + describe 'test attribute "commands"' do - it 'should work' do - + it "should work" do instance.commands = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.commands).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.commands).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::PerclScript' do - expect { instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::PerclScript.new( + commands: [] + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::PerclScript" do + expect { + Freeclimb::PerclScript.new( + commands: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::PerclScript.new( + commands: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::PerclScript.new - skip 'checks if properties are invalid' do - instance = Freeclimb::PerclScript.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::PerclScript.new( - - - commands: [], - + commands: [] ) instance_2 = Freeclimb::PerclScript.new( - - - commands: [], - + commands: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::PerclScript.new( - - - commands: [], - + commands: [] ) instance_2 = Freeclimb::PerclScript.new( - - - commands: nil, - + commands: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - - ) + commands: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) instance_2 = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -155,53 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) - it 'deserializes the data of commands' do + it "deserializes the data of commands" do expect(instance._deserialize("Array", instance.commands)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) instance_2 = Freeclimb::PerclScript.new( - commands: Array.new(), - - - + commands: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -209,12 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::PerclScript.new( - commands: Array.new(), - - ) - it 'returns commands in the form of hash' do + commands: [] + ) + it "returns commands in the form of hash" do expect(instance._to_hash(instance.commands)).to eq(instance.commands) end end - end diff --git a/spec/models/play_beep_spec.rb b/spec/models/play_beep_spec.rb index 57640b44..2644e922 100644 --- a/spec/models/play_beep_spec.rb +++ b/spec/models/play_beep_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::PlayBeep @@ -21,22 +19,22 @@ describe Freeclimb::PlayBeep do let(:instance) { Freeclimb::PlayBeep.new } - describe 'test an instance of PlayBeep' do - it 'should create an instance of PlayBeep' do + describe "test an instance of PlayBeep" do + it "should create an instance of PlayBeep" do expect(instance).to be_instance_of(Freeclimb::PlayBeep) end end - + describe 'test attribute "ALWAYS"' do - it 'should work' do + it "should work" do expect { Freeclimb::PlayBeep::ALWAYS = "always" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::PlayBeep::ALWAYS - calculatedValue = Freeclimb::PlayBeep::build_from_hash("always") + calculatedValue = Freeclimb::PlayBeep.build_from_hash("always") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "always" calculatedValue = Freeclimb::PlayBeep::ALWAYS expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "NEVER"' do - it 'should work' do + it "should work" do expect { Freeclimb::PlayBeep::NEVER = "never" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::PlayBeep::NEVER - calculatedValue = Freeclimb::PlayBeep::build_from_hash("never") + calculatedValue = Freeclimb::PlayBeep.build_from_hash("never") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "never" calculatedValue = Freeclimb::PlayBeep::NEVER expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "ENTRY_ONLY"' do - it 'should work' do + it "should work" do expect { Freeclimb::PlayBeep::ENTRY_ONLY = "entryOnly" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::PlayBeep::ENTRY_ONLY - calculatedValue = Freeclimb::PlayBeep::build_from_hash("entryOnly") + calculatedValue = Freeclimb::PlayBeep.build_from_hash("entryOnly") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "entryOnly" calculatedValue = Freeclimb::PlayBeep::ENTRY_ONLY expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "EXIT_ONLY"' do - it 'should work' do + it "should work" do expect { Freeclimb::PlayBeep::EXIT_ONLY = "exitOnly" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::PlayBeep::EXIT_ONLY - calculatedValue = Freeclimb::PlayBeep::build_from_hash("exitOnly") + calculatedValue = Freeclimb::PlayBeep.build_from_hash("exitOnly") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "exitOnly" calculatedValue = Freeclimb::PlayBeep::EXIT_ONLY expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/play_early_media_spec.rb b/spec/models/play_early_media_spec.rb index e304eefa..d0039c09 100644 --- a/spec/models/play_early_media_spec.rb +++ b/spec/models/play_early_media_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::PlayEarlyMedia @@ -21,144 +19,100 @@ describe Freeclimb::PlayEarlyMedia do let(:instance) { Freeclimb::PlayEarlyMedia.new } - describe 'test an instance of PlayEarlyMedia' do - it 'should create an instance of PlayEarlyMedia' do + describe "test an instance of PlayEarlyMedia" do + it "should create an instance of PlayEarlyMedia" do expect(instance).to be_instance_of(Freeclimb::PlayEarlyMedia) end end - + describe 'test attribute "file"' do - it 'should work' do - + it "should work" do instance.file = "TEST_STRING" - expect(instance.file).to eq("TEST_STRING") - - - + expect(instance.file).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::PlayEarlyMedia' do - expect { instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::PlayEarlyMedia.new( + file: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::PlayEarlyMedia" do + expect { + Freeclimb::PlayEarlyMedia.new( + file: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::PlayEarlyMedia.new( + file: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::PlayEarlyMedia.new - skip 'checks if properties are invalid' do - instance = Freeclimb::PlayEarlyMedia.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) instance_2 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) instance_2 = Freeclimb::PlayEarlyMedia.new( - - file: "ST", - - - + file: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - - ) + file: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) instance_2 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) - it 'deserializes the data of file' do + it "deserializes the data of file" do expect(instance._deserialize("String", instance.file)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) instance_2 = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - - + file: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::PlayEarlyMedia.new( - - file: "TS", - - ) - it 'returns file in the form of hash' do + file: "TS" + ) + it "returns file in the form of hash" do expect(instance._to_hash(instance.file)).to eq(instance.file) end end - end diff --git a/spec/models/play_spec.rb b/spec/models/play_spec.rb index 5d4f9791..a42c8f28 100644 --- a/spec/models/play_spec.rb +++ b/spec/models/play_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Play @@ -21,256 +19,158 @@ describe Freeclimb::Play do let(:instance) { Freeclimb::Play.new } - describe 'test an instance of Play' do - it 'should create an instance of Play' do + describe "test an instance of Play" do + it "should create an instance of Play" do expect(instance).to be_instance_of(Freeclimb::Play) end end - + describe 'test attribute "file"' do - it 'should work' do - + it "should work" do instance.file = "TEST_STRING" - expect(instance.file).to eq("TEST_STRING") - - - + expect(instance.file).to eq("TEST_STRING") end end describe 'test attribute "loop"' do - it 'should work' do - - + it "should work" do instance.loop = 1 expect(instance.loop).to eq(1) - - - end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::Play.new( + file: "TS", + + loop: 1, + + privacy_mode: true + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Play' do - expect { instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Play" do + expect { + Freeclimb::Play.new( + file: "TS", + + loop: 1, + + privacy_mode: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Play.new( + file: "TS", + + loop: 1, + + privacy_mode: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - + file: "TS", + + loop: 1, + + privacy_mode: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Play.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Play.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - + file: "TS", + + loop: 1, + + privacy_mode: true ) instance_2 = Freeclimb::Play.new( - - file: "TS", - - - - - - loop: 1, - - privacy_mode: true, - - - + file: "TS", + + loop: 1, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Play.new( - - file: "TS", - - - - loop: 2, - - - - privacy_mode: true, - - - + file: "TS", + + loop: 2, + + privacy_mode: true ) instance_2 = Freeclimb::Play.new( - - file: "ST", - - - - loop: 1, - - - - privacy_mode: false, - - - + file: "ST", + + loop: 1, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - ) + file: "TS", + + loop: 1, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -279,110 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Play.new( - - file: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - + file: "TS", + + loop: 1, + + privacy_mode: true ) - it 'deserializes the data of file' do + it "deserializes the data of file" do expect(instance._deserialize("String", instance.file)).to be_a_kind_of(String) end - - - it 'deserializes the data of loop' do + + it "deserializes the data of loop" do expect(instance._deserialize("Integer", instance.loop)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::Play.new( - file: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -390,25 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Play.new( - - file: "TS", - - - loop: 1, - - - privacy_mode: true, - - ) - it 'returns file in the form of hash' do + file: "TS", + + loop: 1, + + privacy_mode: true + ) + it "returns file in the form of hash" do expect(instance._to_hash(instance.file)).to eq(instance.file) end - it 'returns loop in the form of hash' do + it "returns loop in the form of hash" do expect(instance._to_hash(instance.loop)).to eq(instance.loop) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/queue_list_spec.rb b/spec/models/queue_list_spec.rb index 1cc4dfdd..65ffe57c 100644 --- a/spec/models/queue_list_spec.rb +++ b/spec/models/queue_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueList @@ -21,541 +19,303 @@ describe Freeclimb::QueueList do let(:instance) { Freeclimb::QueueList.new } - describe 'test an instance of QueueList' do - it 'should create an instance of QueueList' do + describe "test an instance of QueueList" do + it "should create an instance of QueueList" do expect(instance).to be_instance_of(Freeclimb::QueueList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "queues"' do - it 'should work' do - + it "should work" do instance.queues = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.queues).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.queues).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueList' do - expect { instance = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::QueueList.new( + it "properly initializes with values" do + expect { + Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueList.new( - - ) - expect(instance.valid?).to eq(false) + queues: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::QueueList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueList" do + expect { + Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + queues: [], - - ) - instance_2 = Freeclimb::QueueList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + queues: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::QueueList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::QueueList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::QueueList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] + ) + instance_2 = Freeclimb::QueueList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - queues: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + queues: [] ) instance_2 = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - queues: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + queues: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) instance_2 = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queues: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of queues' do + + it "deserializes the data of queues" do expect(instance._deserialize("Array", instance.queues)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) instance_2 = Freeclimb::QueueList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queues: Array.new(), - - - + + queues: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - queues: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queues: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns queues in the form of hash' do + it "returns queues in the form of hash" do expect(instance._to_hash(instance.queues)).to eq(instance.queues) end end - end diff --git a/spec/models/queue_member_list_spec.rb b/spec/models/queue_member_list_spec.rb index 7c795280..5ed1fa80 100644 --- a/spec/models/queue_member_list_spec.rb +++ b/spec/models/queue_member_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueMemberList @@ -21,541 +19,303 @@ describe Freeclimb::QueueMemberList do let(:instance) { Freeclimb::QueueMemberList.new } - describe 'test an instance of QueueMemberList' do - it 'should create an instance of QueueMemberList' do + describe "test an instance of QueueMemberList" do + it "should create an instance of QueueMemberList" do expect(instance).to be_instance_of(Freeclimb::QueueMemberList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "queue_members"' do - it 'should work' do - + it "should work" do instance.queue_members = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.queue_members).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.queue_members).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueMemberList' do - expect { instance = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::QueueMemberList.new( + it "properly initializes with values" do + expect { + Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueMemberList.new( - - ) - expect(instance.valid?).to eq(false) + queue_members: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::QueueMemberList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueMemberList" do + expect { + Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + queue_members: [], - - ) - instance_2 = Freeclimb::QueueMemberList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + queue_members: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::QueueMemberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::QueueMemberList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::QueueMemberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] + ) + instance_2 = Freeclimb::QueueMemberList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueMemberList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - queue_members: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + queue_members: [] ) instance_2 = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - queue_members: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + queue_members: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) instance_2 = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueMemberList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_members' do + + it "deserializes the data of queue_members" do expect(instance._deserialize("Array", instance.queue_members)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) instance_2 = Freeclimb::QueueMemberList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - queue_members: Array.new(), - - - + + queue_members: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueMemberList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - queue_members: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + queue_members: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns queue_members in the form of hash' do + it "returns queue_members in the form of hash" do expect(instance._to_hash(instance.queue_members)).to eq(instance.queue_members) end end - end diff --git a/spec/models/queue_member_spec.rb b/spec/models/queue_member_spec.rb index b90baa96..f051a92c 100644 --- a/spec/models/queue_member_spec.rb +++ b/spec/models/queue_member_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueMember @@ -21,392 +19,216 @@ describe Freeclimb::QueueMember do let(:instance) { Freeclimb::QueueMember.new } - describe 'test an instance of QueueMember' do - it 'should create an instance of QueueMember' do + describe "test an instance of QueueMember" do + it "should create an instance of QueueMember" do expect(instance).to be_instance_of(Freeclimb::QueueMember) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "wait_time"' do - it 'should work' do - - + it "should work" do instance.wait_time = 1 expect(instance.wait_time).to eq(1) - - - end end describe 'test attribute "position"' do - it 'should work' do - - + it "should work" do instance.position = 1 expect(instance.position).to eq(1) - - - end end describe 'test attribute "date_enqueued"' do - it 'should work' do - + it "should work" do instance.date_enqueued = "TEST_STRING" - expect(instance.date_enqueued).to eq("TEST_STRING") - - - + expect(instance.date_enqueued).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueMember' do - expect { instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::QueueMember.new( + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueMember" do + expect { + Freeclimb::QueueMember.new( + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::QueueMember.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueMember.new( uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - + date_enqueued: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::QueueMember.new( + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::QueueMember.new - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueMember.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" ) instance_2 = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - - - wait_time: 1, - - - - position: 1, - - - date_enqueued: "TS", - - - + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 2, - - - - position: 2, - - - - - date_enqueued: "TS", - - - + uri: "TS", + + call_id: "TS", + + wait_time: 2, + + position: 2, + + date_enqueued: "TS" ) instance_2 = Freeclimb::QueueMember.new( - - uri: "ST", - - - - - call_id: "ST", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "ST", - - - + uri: "ST", + + call_id: "ST", + + wait_time: 1, + + position: 1, + + date_enqueued: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - - ) + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) instance_2 = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -415,172 +237,91 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - - call_id: "TS", - - - - wait_time: 1, - - - - position: 1, - - - - - date_enqueued: "TS", - - - + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of wait_time' do + + it "deserializes the data of wait_time" do expect(instance._deserialize("Integer", instance.wait_time)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of position' do + + it "deserializes the data of position" do expect(instance._deserialize("Integer", instance.position)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of date_enqueued' do + + it "deserializes the data of date_enqueued" do expect(instance._deserialize("String", instance.date_enqueued)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) instance_2 = Freeclimb::QueueMember.new( - uri: "TS", - - - - + call_id: "TS", - - - + wait_time: 1, - - - + position: 1, - - - - - date_enqueued: "TS", - - - + + date_enqueued: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -588,39 +329,30 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueMember.new( - - uri: "TS", - - - - call_id: "TS", - - - wait_time: 1, - - - position: 1, - - - - date_enqueued: "TS", - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + call_id: "TS", + + wait_time: 1, + + position: 1, + + date_enqueued: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns wait_time in the form of hash' do + it "returns wait_time in the form of hash" do expect(instance._to_hash(instance.wait_time)).to eq(instance.wait_time) end - it 'returns position in the form of hash' do + it "returns position in the form of hash" do expect(instance._to_hash(instance.position)).to eq(instance.position) end - it 'returns date_enqueued in the form of hash' do + it "returns date_enqueued in the form of hash" do expect(instance._to_hash(instance.date_enqueued)).to eq(instance.date_enqueued) end end - end diff --git a/spec/models/queue_request_spec.rb b/spec/models/queue_request_spec.rb index 0b110fc6..c9c5bf81 100644 --- a/spec/models/queue_request_spec.rb +++ b/spec/models/queue_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueRequest @@ -21,201 +19,129 @@ describe Freeclimb::QueueRequest do let(:instance) { Freeclimb::QueueRequest.new } - describe 'test an instance of QueueRequest' do - it 'should create an instance of QueueRequest' do + describe "test an instance of QueueRequest" do + it "should create an instance of QueueRequest" do expect(instance).to be_instance_of(Freeclimb::QueueRequest) end end - + describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "max_size"' do - it 'should work' do - - + it "should work" do instance.max_size = 1 expect(instance.max_size).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::QueueRequest.new( + _alias: "TS", + + max_size: 1 + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueRequest' do - expect { instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueRequest" do + expect { + Freeclimb::QueueRequest.new( + _alias: "TS", + + max_size: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueRequest.new( + _alias: "TS", + + max_size: 1, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - + _alias: "TS", + + max_size: 1 ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::QueueRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - + it "checks if objects are equal" do instance_1 = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - + _alias: "TS", + + max_size: 1 ) instance_2 = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - - - max_size: 1, - + _alias: "TS", + + max_size: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 2, - - - + _alias: "TS", + + max_size: 2 ) instance_2 = Freeclimb::QueueRequest.new( - - _alias: "ST", - - - - max_size: 1, - - - + _alias: "ST", + + max_size: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - - ) + _alias: "TS", + + max_size: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) instance_2 = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -224,84 +150,49 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - - max_size: 1, - - - + _alias: "TS", + + max_size: 1 ) - it 'deserializes the data of _alias' do + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of max_size' do + + it "deserializes the data of max_size" do expect(instance._deserialize("Integer", instance.max_size)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) instance_2 = Freeclimb::QueueRequest.new( - _alias: "TS", - - - - max_size: 1, - - - + + max_size: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -309,19 +200,15 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueRequest.new( - - _alias: "TS", - - - max_size: 1, - - ) - it 'returns _alias in the form of hash' do + _alias: "TS", + + max_size: 1 + ) + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns max_size in the form of hash' do + it "returns max_size in the form of hash" do expect(instance._to_hash(instance.max_size)).to eq(instance.max_size) end end - end diff --git a/spec/models/queue_result_spec.rb b/spec/models/queue_result_spec.rb index 05af298d..cb7d83bb 100644 --- a/spec/models/queue_result_spec.rb +++ b/spec/models/queue_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueResult @@ -21,780 +19,398 @@ describe Freeclimb::QueueResult do let(:instance) { Freeclimb::QueueResult.new } - describe 'test an instance of QueueResult' do - it 'should create an instance of QueueResult' do + describe "test an instance of QueueResult" do + it "should create an instance of QueueResult" do expect(instance).to be_instance_of(Freeclimb::QueueResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end describe 'test attribute "max_size"' do - it 'should work' do - - + it "should work" do instance.max_size = 1 expect(instance.max_size).to eq(1) - - - end end describe 'test attribute "current_size"' do - it 'should work' do - - + it "should work" do instance.current_size = 1 expect(instance.current_size).to eq(1) - - - end end describe 'test attribute "average_queue_removal_time"' do - it 'should work' do - - + it "should work" do instance.average_queue_removal_time = 1 expect(instance.average_queue_removal_time).to eq(1) - - - end end describe 'test attribute "subresource_uris"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.subresource_uris = testObject expect(instance.subresource_uris).to eq(testObject) - - + instance.subresource_uris = Object.new expect(instance.subresource_uris).to be_instance_of(Object) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueResult' do - expect { instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::QueueResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::QueueResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - - ) - expect(instance.valid?).to eq(true) - end + average_queue_removal_time: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueResult.new( - - ) - expect(instance.valid?).to eq(false) + subresource_uris: Object.new + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - obj_Object = Object.new() - - instance_1 = Freeclimb::QueueResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueResult" do + expect { + Freeclimb::QueueResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - subresource_uris: obj_Object, - - - ) - instance_2 = Freeclimb::QueueResult.new( - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - subresource_uris: obj_Object, - - + + subresource_uris: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::QueueResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::QueueResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_Object = Object.new + + instance_1 = Freeclimb::QueueResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: obj_Object + ) + instance_2 = Freeclimb::QueueResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: obj_Object ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 2, - - - - current_size: 2, - - - - average_queue_removal_time: 2, - - - - - - subresource_uris: Object.new(), - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 2, + + current_size: 2, + + average_queue_removal_time: 2, + + subresource_uris: Object.new, + + subresource_uris: Object.new ) instance_2 = Freeclimb::QueueResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - account_id: "ST", - - - - - queue_id: "ST", - - - - - _alias: "ST", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - subresource_uris: Object.new(), - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + account_id: "ST", + + queue_id: "ST", + + _alias: "ST", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: Object.new ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: Object.new + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) instance_2 = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - + + subresource_uris: Object.new ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -803,351 +419,177 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - account_id: "TS", - - - - - queue_id: "TS", - - - - - _alias: "TS", - - - - max_size: 1, - - - - current_size: 1, - - - - average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new(), - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1, + + subresource_uris: Object.new ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of _alias' do + + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - it 'deserializes the data of max_size' do + + it "deserializes the data of max_size" do expect(instance._deserialize("Integer", instance.max_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of current_size' do + + it "deserializes the data of current_size" do expect(instance._deserialize("Integer", instance.current_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of average_queue_removal_time' do + + it "deserializes the data of average_queue_removal_time" do expect(instance._deserialize("Integer", instance.average_queue_removal_time)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of subresource_uris' do + + it "deserializes the data of subresource_uris" do expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: Object.new, - + + subresource_uris: Object.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - obj = Object.new() - + it "creates equal hash for two equal objects" do + obj = Object.new + instance_1 = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) instance_2 = Freeclimb::QueueResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + account_id: "TS", - - - - + queue_id: "TS", - - - - + _alias: "TS", - - - + max_size: 1, - - - + current_size: 1, - - - + average_queue_removal_time: 1, - - - - - - - subresource_uris: obj, - + + subresource_uris: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1155,77 +597,58 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - account_id: "TS", - - - - queue_id: "TS", - - - - _alias: "TS", - - - max_size: 1, - - - current_size: 1, - - - average_queue_removal_time: 1, - - - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + account_id: "TS", + + queue_id: "TS", + + _alias: "TS", + + max_size: 1, + + current_size: 1, + + average_queue_removal_time: 1 + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns _alias in the form of hash' do + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns max_size in the form of hash' do + it "returns max_size in the form of hash" do expect(instance._to_hash(instance.max_size)).to eq(instance.max_size) end - it 'returns current_size in the form of hash' do + it "returns current_size in the form of hash" do expect(instance._to_hash(instance.current_size)).to eq(instance.current_size) end - it 'returns average_queue_removal_time in the form of hash' do + it "returns average_queue_removal_time in the form of hash" do expect(instance._to_hash(instance.average_queue_removal_time)).to eq(instance.average_queue_removal_time) end - it 'returns subresource_uris in the form of hash' do + it "returns subresource_uris in the form of hash" do expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris) end end - end diff --git a/spec/models/queue_result_status_spec.rb b/spec/models/queue_result_status_spec.rb index 8db7b9b8..27e803b8 100644 --- a/spec/models/queue_result_status_spec.rb +++ b/spec/models/queue_result_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueResultStatus @@ -21,22 +19,22 @@ describe Freeclimb::QueueResultStatus do let(:instance) { Freeclimb::QueueResultStatus.new } - describe 'test an instance of QueueResultStatus' do - it 'should create an instance of QueueResultStatus' do + describe "test an instance of QueueResultStatus" do + it "should create an instance of QueueResultStatus" do expect(instance).to be_instance_of(Freeclimb::QueueResultStatus) end end - + describe 'test attribute "QUEUE_FULL"' do - it 'should work' do + it "should work" do expect { Freeclimb::QueueResultStatus::QUEUE_FULL = "queueFull" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::QueueResultStatus::QUEUE_FULL - calculatedValue = Freeclimb::QueueResultStatus::build_from_hash("queueFull") + calculatedValue = Freeclimb::QueueResultStatus.build_from_hash("queueFull") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "queueFull" calculatedValue = Freeclimb::QueueResultStatus::QUEUE_FULL expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "DEQUEUED"' do - it 'should work' do + it "should work" do expect { Freeclimb::QueueResultStatus::DEQUEUED = "dequeued" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::QueueResultStatus::DEQUEUED - calculatedValue = Freeclimb::QueueResultStatus::build_from_hash("dequeued") + calculatedValue = Freeclimb::QueueResultStatus.build_from_hash("dequeued") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "dequeued" calculatedValue = Freeclimb::QueueResultStatus::DEQUEUED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::QueueResultStatus::HANGUP = "hangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::QueueResultStatus::HANGUP - calculatedValue = Freeclimb::QueueResultStatus::build_from_hash("hangup") + calculatedValue = Freeclimb::QueueResultStatus.build_from_hash("hangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "hangup" calculatedValue = Freeclimb::QueueResultStatus::HANGUP expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "SYSTEM_ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::QueueResultStatus::SYSTEM_ERROR = "systemError" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::QueueResultStatus::SYSTEM_ERROR - calculatedValue = Freeclimb::QueueResultStatus::build_from_hash("systemError") + calculatedValue = Freeclimb::QueueResultStatus.build_from_hash("systemError") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "systemError" calculatedValue = Freeclimb::QueueResultStatus::SYSTEM_ERROR expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/queue_wait_webhook_spec.rb b/spec/models/queue_wait_webhook_spec.rb index 642646d1..78d959c0 100644 --- a/spec/models/queue_wait_webhook_spec.rb +++ b/spec/models/queue_wait_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::QueueWaitWebhook @@ -21,895 +19,460 @@ describe Freeclimb::QueueWaitWebhook do let(:instance) { Freeclimb::QueueWaitWebhook.new } - describe 'test an instance of QueueWaitWebhook' do - it 'should create an instance of QueueWaitWebhook' do + describe "test an instance of QueueWaitWebhook" do + it "should create an instance of QueueWaitWebhook" do expect(instance).to be_instance_of(Freeclimb::QueueWaitWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of QueueWaitWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of QueueWaitWebhook" do payload = '{ "requestType": "queueWait" }' expect(Freeclimb::QueueWaitWebhook.deserialize(payload)).to be_instance_of(Freeclimb::QueueWaitWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "queue_position"' do - it 'should work' do - + it "should work" do instance.queue_position = "TEST_STRING" - expect(instance.queue_position).to eq("TEST_STRING") - - - + expect(instance.queue_position).to eq("TEST_STRING") end end describe 'test attribute "queue_time"' do - it 'should work' do - - + it "should work" do instance.queue_time = 1 expect(instance.queue_time).to eq(1) - - - end end describe 'test attribute "current_queue_size"' do - it 'should work' do - - + it "should work" do instance.current_queue_size = 1 expect(instance.current_queue_size).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::QueueWaitWebhook' do - expect { instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::QueueWaitWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::QueueWaitWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + queue_time: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::QueueWaitWebhook.new( - - ) - expect(instance.valid?).to eq(false) + current_queue_size: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - instance_1 = Freeclimb::QueueWaitWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::QueueWaitWebhook" do + expect { + Freeclimb::QueueWaitWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - + current_queue_size: 1, - - - - ) - instance_2 = Freeclimb::QueueWaitWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::QueueWaitWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - - - + queue_time: 1, - - - + current_queue_size: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::QueueWaitWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::QueueWaitWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::QueueWaitWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 + ) + instance_2 = Freeclimb::QueueWaitWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 2, - - - - current_queue_size: 2, - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 2, + + current_queue_size: 2 ) instance_2 = Freeclimb::QueueWaitWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - queue_position: "ST", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + queue_position: "ST", + + queue_time: 1, + + current_queue_size: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) instance_2 = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -918,383 +481,181 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_position: "TS", - - - - queue_time: 1, - - - - current_queue_size: 1, - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_position' do + + it "deserializes the data of queue_position" do expect(instance._deserialize("String", instance.queue_position)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_time' do + + it "deserializes the data of queue_time" do expect(instance._deserialize("Integer", instance.queue_time)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of current_queue_size' do + + it "deserializes the data of current_queue_size" do expect(instance._deserialize("Integer", instance.current_queue_size)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) instance_2 = Freeclimb::QueueWaitWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_position: "TS", - - - + queue_time: 1, - - - - current_queue_size: 1, - - - + + current_queue_size: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1302,88 +663,65 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueWaitWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - queue_position: "TS", - - - queue_time: 1, - - - current_queue_size: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_position: "TS", + + queue_time: 1, + + current_queue_size: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns queue_position in the form of hash' do + it "returns queue_position in the form of hash" do expect(instance._to_hash(instance.queue_position)).to eq(instance.queue_position) end - it 'returns queue_time in the form of hash' do + it "returns queue_time in the form of hash" do expect(instance._to_hash(instance.queue_time)).to eq(instance.queue_time) end - it 'returns current_queue_size in the form of hash' do + it "returns current_queue_size in the form of hash" do expect(instance._to_hash(instance.current_queue_size)).to eq(instance.current_queue_size) end end - end diff --git a/spec/models/record_utterance_spec.rb b/spec/models/record_utterance_spec.rb index 8810ae38..36aaf564 100644 --- a/spec/models/record_utterance_spec.rb +++ b/spec/models/record_utterance_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RecordUtterance @@ -21,490 +19,274 @@ describe Freeclimb::RecordUtterance do let(:instance) { Freeclimb::RecordUtterance.new } - describe 'test an instance of RecordUtterance' do - it 'should create an instance of RecordUtterance' do + describe "test an instance of RecordUtterance" do + it "should create an instance of RecordUtterance" do expect(instance).to be_instance_of(Freeclimb::RecordUtterance) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "silence_timeout_ms"' do - it 'should work' do - - + it "should work" do instance.silence_timeout_ms = 1 expect(instance.silence_timeout_ms).to eq(1) - - - end end describe 'test attribute "finish_on_key"' do - it 'should work' do - + it "should work" do instance.finish_on_key = "TEST_STRING" - expect(instance.finish_on_key).to eq("TEST_STRING") - - - + expect(instance.finish_on_key).to eq("TEST_STRING") end end describe 'test attribute "max_length_sec"' do - it 'should work' do - - + it "should work" do instance.max_length_sec = 1 expect(instance.max_length_sec).to eq(1) - - - end end describe 'test attribute "play_beep"' do - it 'should work' do + it "should work" do instance.play_beep = false - expect(instance.play_beep).to eq(false) - - - + expect(instance.play_beep).to eq(false) end end describe 'test attribute "auto_start"' do - it 'should work' do + it "should work" do instance.auto_start = false - expect(instance.auto_start).to eq(false) - - - + expect(instance.auto_start).to eq(false) end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - max_length_sec: 1, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RecordUtterance' do - expect { instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - max_length_sec: 1, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - max_length_sec: 1, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RecordUtterance.new( - + it "properly initializes with values" do + expect { + Freeclimb::RecordUtterance.new( action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - - ) - expect(instance.valid?).to eq(true) - end + auto_start: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::RecordUtterance.new( - - ) - expect(instance.valid?).to eq(false) + privacy_mode: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - instance_1 = Freeclimb::RecordUtterance.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::RecordUtterance" do + expect { + Freeclimb::RecordUtterance.new( action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - + privacy_mode: true, - - - - ) - instance_2 = Freeclimb::RecordUtterance.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RecordUtterance.new( action_url: "TS", - - - - - + silence_timeout_ms: 1, - - + finish_on_key: "TS", - - - - - + max_length_sec: 1, - + play_beep: true, - - - + auto_start: true, - - - + privacy_mode: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RecordUtterance.new( + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RecordUtterance.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RecordUtterance.new( + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true + ) + instance_2 = Freeclimb::RecordUtterance.new( + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 2, - - - - - finish_on_key: "TS", - - - - max_length_sec: 2, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - + action_url: "TS", + + silence_timeout_ms: 2, + + finish_on_key: "TS", + + max_length_sec: 2, + + play_beep: true, + + auto_start: true, + + privacy_mode: true ) instance_2 = Freeclimb::RecordUtterance.new( - - action_url: "ST", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "ST", - - - - max_length_sec: 1, - - - - play_beep: false, - - - - auto_start: false, - - - - privacy_mode: false, - - - + action_url: "ST", + + silence_timeout_ms: 1, + + finish_on_key: "ST", + + max_length_sec: 1, + + play_beep: false, + + auto_start: false, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - max_length_sec: 1, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - - ) + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -513,219 +295,119 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - - silence_timeout_ms: 1, - - - - - finish_on_key: "TS", - - - - max_length_sec: 1, - - - - play_beep: true, - - - - auto_start: true, - - - - privacy_mode: true, - - - + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of silence_timeout_ms' do + + it "deserializes the data of silence_timeout_ms" do expect(instance._deserialize("Integer", instance.silence_timeout_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of finish_on_key' do + + it "deserializes the data of finish_on_key" do expect(instance._deserialize("String", instance.finish_on_key)).to be_a_kind_of(String) end - - - it 'deserializes the data of max_length_sec' do + + it "deserializes the data of max_length_sec" do expect(instance._deserialize("Integer", instance.max_length_sec)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of play_beep' do + + it "deserializes the data of play_beep" do expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of auto_start' do + + it "deserializes the data of auto_start" do expect(instance._deserialize("Boolean", instance.auto_start)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::RecordUtterance.new( - action_url: "TS", - - - + silence_timeout_ms: 1, - - - - + finish_on_key: "TS", - - - + max_length_sec: 1, - - - + play_beep: true, - - - + auto_start: true, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -733,50 +415,40 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RecordUtterance.new( - - action_url: "TS", - - - silence_timeout_ms: 1, - - - - finish_on_key: "TS", - - - max_length_sec: 1, - - - play_beep: true, - - - auto_start: true, - - - privacy_mode: true, - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + silence_timeout_ms: 1, + + finish_on_key: "TS", + + max_length_sec: 1, + + play_beep: true, + + auto_start: true, + + privacy_mode: true + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns silence_timeout_ms in the form of hash' do + it "returns silence_timeout_ms in the form of hash" do expect(instance._to_hash(instance.silence_timeout_ms)).to eq(instance.silence_timeout_ms) end - it 'returns finish_on_key in the form of hash' do + it "returns finish_on_key in the form of hash" do expect(instance._to_hash(instance.finish_on_key)).to eq(instance.finish_on_key) end - it 'returns max_length_sec in the form of hash' do + it "returns max_length_sec in the form of hash" do expect(instance._to_hash(instance.max_length_sec)).to eq(instance.max_length_sec) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns auto_start in the form of hash' do + it "returns auto_start in the form of hash" do expect(instance._to_hash(instance.auto_start)).to eq(instance.auto_start) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/record_utterance_term_reason_spec.rb b/spec/models/record_utterance_term_reason_spec.rb index 82f68b80..2f0cdef9 100644 --- a/spec/models/record_utterance_term_reason_spec.rb +++ b/spec/models/record_utterance_term_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RecordUtteranceTermReason @@ -21,22 +19,22 @@ describe Freeclimb::RecordUtteranceTermReason do let(:instance) { Freeclimb::RecordUtteranceTermReason.new } - describe 'test an instance of RecordUtteranceTermReason' do - it 'should create an instance of RecordUtteranceTermReason' do + describe "test an instance of RecordUtteranceTermReason" do + it "should create an instance of RecordUtteranceTermReason" do expect(instance).to be_instance_of(Freeclimb::RecordUtteranceTermReason) end end - + describe 'test attribute "FINISH_KEY"' do - it 'should work' do + it "should work" do expect { Freeclimb::RecordUtteranceTermReason::FINISH_KEY = "finishKey" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RecordUtteranceTermReason::FINISH_KEY - calculatedValue = Freeclimb::RecordUtteranceTermReason::build_from_hash("finishKey") + calculatedValue = Freeclimb::RecordUtteranceTermReason.build_from_hash("finishKey") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "finishKey" calculatedValue = Freeclimb::RecordUtteranceTermReason::FINISH_KEY expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "TIMEOUT"' do - it 'should work' do + it "should work" do expect { Freeclimb::RecordUtteranceTermReason::TIMEOUT = "timeout" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RecordUtteranceTermReason::TIMEOUT - calculatedValue = Freeclimb::RecordUtteranceTermReason::build_from_hash("timeout") + calculatedValue = Freeclimb::RecordUtteranceTermReason.build_from_hash("timeout") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "timeout" calculatedValue = Freeclimb::RecordUtteranceTermReason::TIMEOUT expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::RecordUtteranceTermReason::HANGUP = "hangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RecordUtteranceTermReason::HANGUP - calculatedValue = Freeclimb::RecordUtteranceTermReason::build_from_hash("hangup") + calculatedValue = Freeclimb::RecordUtteranceTermReason.build_from_hash("hangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "hangup" calculatedValue = Freeclimb::RecordUtteranceTermReason::HANGUP expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "MAX_LENGTH"' do - it 'should work' do + it "should work" do expect { Freeclimb::RecordUtteranceTermReason::MAX_LENGTH = "maxLength" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RecordUtteranceTermReason::MAX_LENGTH - calculatedValue = Freeclimb::RecordUtteranceTermReason::build_from_hash("maxLength") + calculatedValue = Freeclimb::RecordUtteranceTermReason.build_from_hash("maxLength") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "maxLength" calculatedValue = Freeclimb::RecordUtteranceTermReason::MAX_LENGTH expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/record_webhook_spec.rb b/spec/models/record_webhook_spec.rb index acbfdfe7..d2171c3b 100644 --- a/spec/models/record_webhook_spec.rb +++ b/spec/models/record_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RecordWebhook @@ -21,1773 +19,865 @@ describe Freeclimb::RecordWebhook do let(:instance) { Freeclimb::RecordWebhook.new } - describe 'test an instance of RecordWebhook' do - it 'should create an instance of RecordWebhook' do + describe "test an instance of RecordWebhook" do + it "should create an instance of RecordWebhook" do expect(instance).to be_instance_of(Freeclimb::RecordWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of RecordWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of RecordWebhook" do payload = '{ "requestType": "record" }' expect(Freeclimb::RecordWebhook.deserialize(payload)).to be_instance_of(Freeclimb::RecordWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_size"' do - it 'should work' do - + it "should work" do instance.recording_size = "TEST_STRING" - expect(instance.recording_size).to eq("TEST_STRING") - - - + expect(instance.recording_size).to eq("TEST_STRING") end end describe 'test attribute "recording_format"' do - it 'should work' do - + it "should work" do instance.recording_format = "TEST_STRING" - expect(instance.recording_format).to eq("TEST_STRING") - - - + expect(instance.recording_format).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_sec"' do - it 'should work' do - - + it "should work" do instance.recording_duration_sec = 1 expect(instance.recording_duration_sec).to eq(1) - - - end end - describe 'test attribute "term_reason"' do - it 'assigns value FINISH_KEY' do + it "assigns value FINISH_KEY" do instance.term_reason = Freeclimb::RecordUtteranceTermReason::FINISH_KEY - expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::FINISH_KEY) + expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::FINISH_KEY) end - it 'assigns value TIMEOUT' do + it "assigns value TIMEOUT" do instance.term_reason = Freeclimb::RecordUtteranceTermReason::TIMEOUT - expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::TIMEOUT) + expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::TIMEOUT) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.term_reason = Freeclimb::RecordUtteranceTermReason::HANGUP - expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::HANGUP) + expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::HANGUP) end - it 'assigns value MAX_LENGTH' do + it "assigns value MAX_LENGTH" do instance.term_reason = Freeclimb::RecordUtteranceTermReason::MAX_LENGTH - expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::MAX_LENGTH) + expect(instance.term_reason).to eq(Freeclimb::RecordUtteranceTermReason::MAX_LENGTH) end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - - recording_size: "TS", - - - - - recording_format: "TS", - - - - recording_duration_sec: 1, - - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RecordWebhook' do - expect { instance = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - - recording_size: "TS", - - - - - recording_format: "TS", - - - - recording_duration_sec: 1, - - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - - recording_size: "TS", - - - - - recording_format: "TS", - - - - recording_duration_sec: 1, - - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RecordWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - ) - expect(instance.valid?).to eq(true) - end + parent_call_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::RecordWebhook.new( - - ) - expect(instance.valid?).to eq(false) + privacy_mode: true + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - instance_1 = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - - recording_size: "TS", - - - - - recording_format: "TS", - - - - recording_duration_sec: 1, - - - - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - ) - instance_2 = Freeclimb::RecordWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::RecordWebhook" do + expect { + Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::RecordWebhook.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - - recording_duration_sec: 2, - - - - - - + + recording_duration_sec: 1, + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - + parent_call_id: "TS", - - - + privacy_mode: true, - - - - ) - instance_2 = Freeclimb::RecordWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - recording_id: "ST", - - - - - recording_url: "ST", - - - - - recording_size: "ST", - - - - - recording_format: "ST", - - - - recording_duration_sec: 1, - - - - - - - term_reason: nil, - - - parent_call_id: "ST", - - - - privacy_mode: false, - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - - recording_size: "TS", - - - - - recording_format: "TS", - - - - recording_duration_sec: 1, - - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::RecordWebhook.new( - + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - + + privacy_mode: true ) - instance_2 = Freeclimb::RecordWebhook.new( - + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RecordWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - parent_call_id: "TS", - - - - privacy_mode: true, - - - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + parent_call_id: "TS", - describe 'test method "_deserialize"' do - instance = Freeclimb::RecordWebhook.new( - + privacy_mode: true + ) + instance_2 = Freeclimb::RecordWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - - ) - it 'deserializes the data of request_type' do - expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) - end - - - it 'deserializes the data of account_id' do - expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) - end - - - it 'deserializes the data of call_id' do - expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) - end - - - it 'deserializes the data of from' do - expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) - end - - - it 'deserializes the data of to' do - expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) - end - - - - - - - it 'deserializes the data of conference_id' do - expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) + + privacy_mode: true + ) + expect(instance_1.eql?(instance_2)).to eq(true) end - - - it 'deserializes the data of queue_id' do - expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) + + it "checks if objects are not equal" do + instance_1 = Freeclimb::RecordWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 2, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + instance_2 = Freeclimb::RecordWebhook.new( + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + recording_id: "ST", + + recording_url: "ST", + + recording_size: "ST", + + recording_format: "ST", + + recording_duration_sec: 1, + + term_reason: nil, + + parent_call_id: "ST", + + privacy_mode: false + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::RecordWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 1, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::RecordWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 1, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + instance_2 = Freeclimb::RecordWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 1, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::RecordWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 1, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + it "deserializes the data of request_type" do + expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of account_id" do + expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) + end + + it "deserializes the data of call_id" do + expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) + end + + it "deserializes the data of from" do + expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) + end + + it "deserializes the data of to" do + expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) + end + + it "deserializes the data of conference_id" do + expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) + end + + it "deserializes the data of queue_id" do + expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) + end + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_size' do + + it "deserializes the data of recording_size" do expect(instance._deserialize("String", instance.recording_size)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_format' do + + it "deserializes the data of recording_format" do expect(instance._deserialize("String", instance.recording_format)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_sec' do + + it "deserializes the data of recording_duration_sec" do expect(instance._deserialize("Integer", instance.recording_duration_sec)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RecordWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RecordWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RecordWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::RecordWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - + recording_size: "TS", - - - - + recording_format: "TS", - - - + recording_duration_sec: 1, - - - - + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + parent_call_id: "TS", - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1795,123 +885,90 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RecordWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - recording_id: "TS", - - - - recording_url: "TS", - - - - recording_size: "TS", - - - - recording_format: "TS", - - - recording_duration_sec: 1, - - - - term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - parent_call_id: "TS", - - - privacy_mode: true, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: "TS", + + recording_format: "TS", + + recording_duration_sec: 1, + + term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + parent_call_id: "TS", + + privacy_mode: true + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_size in the form of hash' do + it "returns recording_size in the form of hash" do expect(instance._to_hash(instance.recording_size)).to eq(instance.recording_size) end - it 'returns recording_format in the form of hash' do + it "returns recording_format in the form of hash" do expect(instance._to_hash(instance.recording_format)).to eq(instance.recording_format) end - it 'returns recording_duration_sec in the form of hash' do + it "returns recording_duration_sec in the form of hash" do expect(instance._to_hash(instance.recording_duration_sec)).to eq(instance.recording_duration_sec) end - it 'returns term_reason in the form of hash' do + it "returns term_reason in the form of hash" do expect(instance._to_hash(instance.term_reason)).to eq(instance.term_reason) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/recording_list_spec.rb b/spec/models/recording_list_spec.rb index 100c4511..9276eaf4 100644 --- a/spec/models/recording_list_spec.rb +++ b/spec/models/recording_list_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RecordingList @@ -21,541 +19,303 @@ describe Freeclimb::RecordingList do let(:instance) { Freeclimb::RecordingList.new } - describe 'test an instance of RecordingList' do - it 'should create an instance of RecordingList' do + describe "test an instance of RecordingList" do + it "should create an instance of RecordingList" do expect(instance).to be_instance_of(Freeclimb::RecordingList) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "recordings"' do - it 'should work' do - + it "should work" do instance.recordings = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.recordings).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.recordings).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RecordingList' do - expect { instance = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RecordingList.new( + it "properly initializes with values" do + expect { + Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::RecordingList.new( - - ) - expect(instance.valid?).to eq(false) + recordings: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::RecordingList.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::RecordingList" do + expect { + Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + recordings: [], - - ) - instance_2 = Freeclimb::RecordingList.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + recordings: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RecordingList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RecordingList.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RecordingList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] + ) + instance_2 = Freeclimb::RecordingList.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::RecordingList.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - recordings: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + recordings: [] ) instance_2 = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - recordings: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + recordings: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) instance_2 = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RecordingList.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - recordings: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of recordings' do + + it "deserializes the data of recordings" do expect(instance._deserialize("Array", instance.recordings)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) instance_2 = Freeclimb::RecordingList.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - recordings: Array.new(), - - - + + recordings: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RecordingList.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - recordings: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + recordings: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns recordings in the form of hash' do + it "returns recordings in the form of hash" do expect(instance._to_hash(instance.recordings)).to eq(instance.recordings) end end - end diff --git a/spec/models/recording_result_spec.rb b/spec/models/recording_result_spec.rb index eb9ea2b4..81ccdc64 100644 --- a/spec/models/recording_result_spec.rb +++ b/spec/models/recording_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RecordingResult @@ -21,660 +19,332 @@ describe Freeclimb::RecordingResult do let(:instance) { Freeclimb::RecordingResult.new } - describe 'test an instance of RecordingResult' do - it 'should create an instance of RecordingResult' do + describe "test an instance of RecordingResult" do + it "should create an instance of RecordingResult" do expect(instance).to be_instance_of(Freeclimb::RecordingResult) end end - + describe 'test attribute "uri"' do - it 'should work' do - + it "should work" do instance.uri = "TEST_STRING" - expect(instance.uri).to eq("TEST_STRING") - - - + expect(instance.uri).to eq("TEST_STRING") end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "duration_sec"' do - it 'should work' do - - + it "should work" do instance.duration_sec = 1 expect(instance.duration_sec).to eq(1) - - - end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RecordingResult' do - expect { instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RecordingResult.new( - + it "properly initializes with values" do + expect { + Freeclimb::RecordingResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + duration_sec: 1, - skip 'checks if properties are invalid' do - instance = Freeclimb::RecordingResult.new( - - ) - expect(instance.valid?).to eq(false) + conference_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::RecordingResult.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::RecordingResult" do + expect { + Freeclimb::RecordingResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - + conference_id: "TS", - - - - ) - instance_2 = Freeclimb::RecordingResult.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RecordingResult.new( uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - - + duration_sec: 1, - - + conference_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RecordingResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RecordingResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RecordingResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" + ) + instance_2 = Freeclimb::RecordingResult.new( + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 2, - - - - - conference_id: "TS", - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 2, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 2, + + conference_id: "TS" ) instance_2 = Freeclimb::RecordingResult.new( - - uri: "ST", - - - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - - - recording_id: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - duration_sec: 1, - - - - - conference_id: "ST", - - - + uri: "ST", + + date_created: "ST", + + date_updated: "ST", + + revision: 1, + + recording_id: "ST", + + account_id: "ST", + + call_id: "ST", + + duration_sec: 1, + + conference_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - - ) + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) instance_2 = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -683,296 +353,147 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - - recording_id: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - duration_sec: 1, - - - - - conference_id: "TS", - - - + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" ) - it 'deserializes the data of uri' do + it "deserializes the data of uri" do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of duration_sec' do + + it "deserializes the data of duration_sec" do expect(instance._deserialize("Integer", instance.duration_sec)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) instance_2 = Freeclimb::RecordingResult.new( - uri: "TS", - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - + recording_id: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - + duration_sec: 1, - - - - - conference_id: "TS", - - - + + conference_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -980,67 +501,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RecordingResult.new( - - uri: "TS", - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - - - recording_id: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - duration_sec: 1, - - - - conference_id: "TS", - - ) - it 'returns uri in the form of hash' do + uri: "TS", + + date_created: "TS", + + date_updated: "TS", + + revision: 1, + + recording_id: "TS", + + account_id: "TS", + + call_id: "TS", + + duration_sec: 1, + + conference_id: "TS" + ) + it "returns uri in the form of hash" do expect(instance._to_hash(instance.uri)).to eq(instance.uri) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns duration_sec in the form of hash' do + it "returns duration_sec in the form of hash" do expect(instance._to_hash(instance.duration_sec)).to eq(instance.duration_sec) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end end - end diff --git a/spec/models/redirect_spec.rb b/spec/models/redirect_spec.rb index 7be92495..a8942592 100644 --- a/spec/models/redirect_spec.rb +++ b/spec/models/redirect_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Redirect @@ -21,144 +19,100 @@ describe Freeclimb::Redirect do let(:instance) { Freeclimb::Redirect.new } - describe 'test an instance of Redirect' do - it 'should create an instance of Redirect' do + describe "test an instance of Redirect" do + it "should create an instance of Redirect" do expect(instance).to be_instance_of(Freeclimb::Redirect) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Redirect' do - expect { instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Redirect.new( + action_url: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::Redirect" do + expect { + Freeclimb::Redirect.new( + action_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Redirect.new( + action_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Redirect.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Redirect.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) instance_2 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) instance_2 = Freeclimb::Redirect.new( - - action_url: "ST", - - - + action_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - - ) + action_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) instance_2 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) instance_2 = Freeclimb::Redirect.new( - - action_url: "TS", - - - + action_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Redirect.new( - - action_url: "TS", - - ) - it 'returns action_url in the form of hash' do + action_url: "TS" + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end end - end diff --git a/spec/models/redirect_webhook_spec.rb b/spec/models/redirect_webhook_spec.rb index b6e1ea2a..e9e9c144 100644 --- a/spec/models/redirect_webhook_spec.rb +++ b/spec/models/redirect_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RedirectWebhook @@ -21,781 +19,402 @@ describe Freeclimb::RedirectWebhook do let(:instance) { Freeclimb::RedirectWebhook.new } - describe 'test an instance of RedirectWebhook' do - it 'should create an instance of RedirectWebhook' do + describe "test an instance of RedirectWebhook" do + it "should create an instance of RedirectWebhook" do expect(instance).to be_instance_of(Freeclimb::RedirectWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of RedirectWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of RedirectWebhook" do payload = '{ "requestType": "redirect" }' expect(Freeclimb::RedirectWebhook.deserialize(payload)).to be_instance_of(Freeclimb::RedirectWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end describe 'test attribute "parent_call_id"' do - it 'should work' do - + it "should work" do instance.parent_call_id = "TEST_STRING" - expect(instance.parent_call_id).to eq("TEST_STRING") - - - + expect(instance.parent_call_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RedirectWebhook' do - expect { instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RedirectWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::RedirectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) - expect(instance.valid?).to eq(true) - end + queue_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::RedirectWebhook.new( - - ) - expect(instance.valid?).to eq(false) + parent_call_id: "TS" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - instance_1 = Freeclimb::RedirectWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::RedirectWebhook" do + expect { + Freeclimb::RedirectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - - ) - instance_2 = Freeclimb::RedirectWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RedirectWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + parent_call_id: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RedirectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RedirectWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RedirectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + instance_2 = Freeclimb::RedirectWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) instance_2 = Freeclimb::RedirectWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - parent_call_id: "ST", - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + parent_call_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -804,331 +423,153 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - parent_call_id: "TS", - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of parent_call_id' do + + it "deserializes the data of parent_call_id" do expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) instance_2 = Freeclimb::RedirectWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - parent_call_id: "TS", - - - + + parent_call_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1136,76 +577,55 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RedirectWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - parent_call_id: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + parent_call_id: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns parent_call_id in the form of hash' do + it "returns parent_call_id in the form of hash" do expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id) end end - end diff --git a/spec/models/reject_spec.rb b/spec/models/reject_spec.rb index a9c2cef1..6c6e7d88 100644 --- a/spec/models/reject_spec.rb +++ b/spec/models/reject_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Reject @@ -21,144 +19,100 @@ describe Freeclimb::Reject do let(:instance) { Freeclimb::Reject.new } - describe 'test an instance of Reject' do - it 'should create an instance of Reject' do + describe "test an instance of Reject" do + it "should create an instance of Reject" do expect(instance).to be_instance_of(Freeclimb::Reject) end end - + describe 'test attribute "reason"' do - it 'should work' do - + it "should work" do instance.reason = "TEST_STRING" - expect(instance.reason).to eq("TEST_STRING") - - - + expect(instance.reason).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Reject.new( - - reason: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Reject' do - expect { instance = Freeclimb::Reject.new( - - reason: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Reject.new( - - reason: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Reject.new( + reason: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::Reject" do + expect { + Freeclimb::Reject.new( + reason: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Reject.new( + reason: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Reject.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Reject.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Reject.new( - - reason: "ST", - - - + reason: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Reject.new( - - reason: "TS", - - - - ) + reason: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) - it 'deserializes the data of reason' do + it "deserializes the data of reason" do expect(instance._deserialize("String", instance.reason)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) instance_2 = Freeclimb::Reject.new( - - reason: "TS", - - - + reason: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Reject.new( - - reason: "TS", - - ) - it 'returns reason in the form of hash' do + reason: "TS" + ) + it "returns reason in the form of hash" do expect(instance._to_hash(instance.reason)).to eq(instance.reason) end end - end diff --git a/spec/models/remove_from_conference_spec.rb b/spec/models/remove_from_conference_spec.rb index 67b122ad..c214781c 100644 --- a/spec/models/remove_from_conference_spec.rb +++ b/spec/models/remove_from_conference_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RemoveFromConference @@ -21,10 +19,9 @@ describe Freeclimb::RemoveFromConference do let(:instance) { Freeclimb::RemoveFromConference.new } - describe 'test an instance of RemoveFromConference' do - it 'should create an instance of RemoveFromConference' do + describe "test an instance of RemoveFromConference" do + it "should create an instance of RemoveFromConference" do expect(instance).to be_instance_of(Freeclimb::RemoveFromConference) end end - end diff --git a/spec/models/remove_from_queue_notification_webhook_spec.rb b/spec/models/remove_from_queue_notification_webhook_spec.rb index 20554117..36e75ead 100644 --- a/spec/models/remove_from_queue_notification_webhook_spec.rb +++ b/spec/models/remove_from_queue_notification_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RemoveFromQueueNotificationWebhook @@ -21,846 +19,442 @@ describe Freeclimb::RemoveFromQueueNotificationWebhook do let(:instance) { Freeclimb::RemoveFromQueueNotificationWebhook.new } - describe 'test an instance of RemoveFromQueueNotificationWebhook' do - it 'should create an instance of RemoveFromQueueNotificationWebhook' do + describe "test an instance of RemoveFromQueueNotificationWebhook" do + it "should create an instance of RemoveFromQueueNotificationWebhook" do expect(instance).to be_instance_of(Freeclimb::RemoveFromQueueNotificationWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of RemoveFromQueueNotificationWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of RemoveFromQueueNotificationWebhook" do payload = '{ "requestType": "removeFromQueueNotification" }' expect(Freeclimb::RemoveFromQueueNotificationWebhook.deserialize(payload)).to be_instance_of(Freeclimb::RemoveFromQueueNotificationWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end - describe 'test attribute "call_status"' do - it 'assigns value QUEUED' do + it "assigns value QUEUED" do instance.call_status = Freeclimb::CallStatus::QUEUED - expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED) end - it 'assigns value RINGING' do + it "assigns value RINGING" do instance.call_status = Freeclimb::CallStatus::RINGING - expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) + expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING) end - it 'assigns value IN_PROGRESS' do + it "assigns value IN_PROGRESS" do instance.call_status = Freeclimb::CallStatus::IN_PROGRESS - expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) + expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS) end - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.call_status = Freeclimb::CallStatus::CANCELED - expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.call_status = Freeclimb::CallStatus::COMPLETED - expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED) end - it 'assigns value FAILED' do + it "assigns value FAILED" do instance.call_status = Freeclimb::CallStatus::FAILED - expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) + expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED) end - it 'assigns value BUSY' do + it "assigns value BUSY" do instance.call_status = Freeclimb::CallStatus::BUSY - expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) + expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY) end - it 'assigns value NO_ANSWER' do + it "assigns value NO_ANSWER" do instance.call_status = Freeclimb::CallStatus::NO_ANSWER - expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) + expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER) end end describe 'test attribute "direction"' do - it 'assigns value INBOUND' do + it "assigns value INBOUND" do instance.direction = Freeclimb::CallDirection::INBOUND - expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) + expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND) end - it 'assigns value OUTBOUND_API' do + it "assigns value OUTBOUND_API" do instance.direction = Freeclimb::CallDirection::OUTBOUND_API - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API) end - it 'assigns value OUTBOUND_DIAL' do + it "assigns value OUTBOUND_DIAL" do instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL - expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) + expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL) end end describe 'test attribute "conference_id"' do - it 'should work' do - + it "should work" do instance.conference_id = "TEST_STRING" - expect(instance.conference_id).to eq("TEST_STRING") - - - + expect(instance.conference_id).to eq("TEST_STRING") end end describe 'test attribute "queue_id"' do - it 'should work' do - + it "should work" do instance.queue_id = "TEST_STRING" - expect(instance.queue_id).to eq("TEST_STRING") - - - + expect(instance.queue_id).to eq("TEST_STRING") end end - describe 'test attribute "queue_result"' do - it 'assigns value QUEUE_FULL' do + it "assigns value QUEUE_FULL" do instance.queue_result = Freeclimb::QueueResultStatus::QUEUE_FULL - expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::QUEUE_FULL) + expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::QUEUE_FULL) end - it 'assigns value DEQUEUED' do + it "assigns value DEQUEUED" do instance.queue_result = Freeclimb::QueueResultStatus::DEQUEUED - expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::DEQUEUED) + expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::DEQUEUED) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.queue_result = Freeclimb::QueueResultStatus::HANGUP - expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::HANGUP) + expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::HANGUP) end - it 'assigns value SYSTEM_ERROR' do + it "assigns value SYSTEM_ERROR" do instance.queue_result = Freeclimb::QueueResultStatus::SYSTEM_ERROR - expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::SYSTEM_ERROR) + expect(instance.queue_result).to eq(Freeclimb::QueueResultStatus::SYSTEM_ERROR) end end describe 'test attribute "queue_time"' do - it 'should work' do - - + it "should work" do instance.queue_time = 1 expect(instance.queue_time).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::RemoveFromQueueNotificationWebhook' do - expect { instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::RemoveFromQueueNotificationWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - skip 'checks if properties are invalid' do - instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - ) - expect(instance.valid?).to eq(false) + queue_time: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::RemoveFromQueueNotificationWebhook" do + expect { + Freeclimb::RemoveFromQueueNotificationWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - + queue_time: 1, - - - - ) - instance_2 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::RemoveFromQueueNotificationWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - + queue_time: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::RemoveFromQueueNotificationWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::RemoveFromQueueNotificationWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 + ) + instance_2 = Freeclimb::RemoveFromQueueNotificationWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - queue_time: 2, - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 2 ) instance_2 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - - - call_status: nil, - - - - - direction: nil, - - - conference_id: "ST", - - - - - queue_id: "ST", - - - - - - - queue_result: nil, - - queue_time: 1, - - - + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + call_status: nil, + + direction: nil, + + conference_id: "ST", + + queue_id: "ST", + + queue_result: nil, + + queue_time: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - - ) + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) instance_2 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -869,354 +463,163 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - - conference_id: "TS", - - - - - queue_id: "TS", - - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - - - - - it 'deserializes the data of conference_id' do + + it "deserializes the data of conference_id" do expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of queue_id' do + + it "deserializes the data of queue_id" do expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of queue_time' do + + it "deserializes the data of queue_time" do expect(instance._deserialize("Integer", instance.queue_time)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) instance_2 = Freeclimb::RemoveFromQueueNotificationWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + call_status: Freeclimb::CallStatus::QUEUED, - - - - + direction: Freeclimb::CallDirection::INBOUND, - - - - + conference_id: "TS", - - - - + queue_id: "TS", - - - - + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - - queue_time: 1, - - - + + queue_time: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1224,82 +627,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RemoveFromQueueNotificationWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - call_status: Freeclimb::CallStatus::QUEUED, - - - - direction: Freeclimb::CallDirection::INBOUND, - - - - conference_id: "TS", - - - - queue_id: "TS", - - - - queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, - - - queue_time: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + call_status: Freeclimb::CallStatus::QUEUED, + + direction: Freeclimb::CallDirection::INBOUND, + + conference_id: "TS", + + queue_id: "TS", + + queue_result: Freeclimb::QueueResultStatus::QUEUE_FULL, + + queue_time: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns call_status in the form of hash' do + it "returns call_status in the form of hash" do expect(instance._to_hash(instance.call_status)).to eq(instance.call_status) end - it 'returns direction in the form of hash' do + it "returns direction in the form of hash" do expect(instance._to_hash(instance.direction)).to eq(instance.direction) end - it 'returns conference_id in the form of hash' do + it "returns conference_id in the form of hash" do expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id) end - it 'returns queue_id in the form of hash' do + it "returns queue_id in the form of hash" do expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id) end - it 'returns queue_result in the form of hash' do + it "returns queue_result in the form of hash" do expect(instance._to_hash(instance.queue_result)).to eq(instance.queue_result) end - it 'returns queue_time in the form of hash' do + it "returns queue_time in the form of hash" do expect(instance._to_hash(instance.queue_time)).to eq(instance.queue_time) end end - end diff --git a/spec/models/request_type_spec.rb b/spec/models/request_type_spec.rb index f573f981..66449848 100644 --- a/spec/models/request_type_spec.rb +++ b/spec/models/request_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::RequestType @@ -21,22 +19,22 @@ describe Freeclimb::RequestType do let(:instance) { Freeclimb::RequestType.new } - describe 'test an instance of RequestType' do - it 'should create an instance of RequestType' do + describe "test an instance of RequestType" do + it "should create an instance of RequestType" do expect(instance).to be_instance_of(Freeclimb::RequestType) end end - + describe 'test attribute "INBOUND_CALL"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::INBOUND_CALL = "inboundCall" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::INBOUND_CALL - calculatedValue = Freeclimb::RequestType::build_from_hash("inboundCall") + calculatedValue = Freeclimb::RequestType.build_from_hash("inboundCall") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "inboundCall" calculatedValue = Freeclimb::RequestType::INBOUND_CALL expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "RECORD"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::RECORD = "record" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::RECORD - calculatedValue = Freeclimb::RequestType::build_from_hash("record") + calculatedValue = Freeclimb::RequestType.build_from_hash("record") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "record" calculatedValue = Freeclimb::RequestType::RECORD expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "GET_DIGITS"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::GET_DIGITS = "getDigits" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::GET_DIGITS - calculatedValue = Freeclimb::RequestType::build_from_hash("getDigits") + calculatedValue = Freeclimb::RequestType.build_from_hash("getDigits") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "getDigits" calculatedValue = Freeclimb::RequestType::GET_DIGITS expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "GET_SPEECH"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::GET_SPEECH = "getSpeech" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::GET_SPEECH - calculatedValue = Freeclimb::RequestType::build_from_hash("getSpeech") + calculatedValue = Freeclimb::RequestType.build_from_hash("getSpeech") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "getSpeech" calculatedValue = Freeclimb::RequestType::GET_SPEECH expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "REDIRECT"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::REDIRECT = "redirect" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::REDIRECT - calculatedValue = Freeclimb::RequestType::build_from_hash("redirect") + calculatedValue = Freeclimb::RequestType.build_from_hash("redirect") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "redirect" calculatedValue = Freeclimb::RequestType::REDIRECT expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "PAUSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::PAUSE = "pause" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::PAUSE - calculatedValue = Freeclimb::RequestType::build_from_hash("pause") + calculatedValue = Freeclimb::RequestType.build_from_hash("pause") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "pause" calculatedValue = Freeclimb::RequestType::PAUSE expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "OUT_DIAL_START"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::OUT_DIAL_START = "outDialStart" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::OUT_DIAL_START - calculatedValue = Freeclimb::RequestType::build_from_hash("outDialStart") + calculatedValue = Freeclimb::RequestType.build_from_hash("outDialStart") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outDialStart" calculatedValue = Freeclimb::RequestType::OUT_DIAL_START expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "OUT_DIAL_CONNECT"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::OUT_DIAL_CONNECT = "outDialConnect" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::OUT_DIAL_CONNECT - calculatedValue = Freeclimb::RequestType::build_from_hash("outDialConnect") + calculatedValue = Freeclimb::RequestType.build_from_hash("outDialConnect") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outDialConnect" calculatedValue = Freeclimb::RequestType::OUT_DIAL_CONNECT expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "OUT_DIAL_API_CONNECT"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::OUT_DIAL_API_CONNECT = "outDialApiConnect" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::OUT_DIAL_API_CONNECT - calculatedValue = Freeclimb::RequestType::build_from_hash("outDialApiConnect") + calculatedValue = Freeclimb::RequestType.build_from_hash("outDialApiConnect") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "outDialApiConnect" calculatedValue = Freeclimb::RequestType::OUT_DIAL_API_CONNECT expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "MACHINE_DETECTED"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::MACHINE_DETECTED = "machineDetected" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::MACHINE_DETECTED - calculatedValue = Freeclimb::RequestType::build_from_hash("machineDetected") + calculatedValue = Freeclimb::RequestType.build_from_hash("machineDetected") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "machineDetected" calculatedValue = Freeclimb::RequestType::MACHINE_DETECTED expect(expectedValue).to eq(calculatedValue) @@ -188,15 +186,15 @@ end describe 'test attribute "DEQUEUE"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::DEQUEUE = "dequeue" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::DEQUEUE - calculatedValue = Freeclimb::RequestType::build_from_hash("dequeue") + calculatedValue = Freeclimb::RequestType.build_from_hash("dequeue") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "dequeue" calculatedValue = Freeclimb::RequestType::DEQUEUE expect(expectedValue).to eq(calculatedValue) @@ -204,15 +202,15 @@ end describe 'test attribute "QUEUE_WAIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::QUEUE_WAIT = "queueWait" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::QUEUE_WAIT - calculatedValue = Freeclimb::RequestType::build_from_hash("queueWait") + calculatedValue = Freeclimb::RequestType.build_from_hash("queueWait") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "queueWait" calculatedValue = Freeclimb::RequestType::QUEUE_WAIT expect(expectedValue).to eq(calculatedValue) @@ -220,15 +218,15 @@ end describe 'test attribute "ADD_TO_QUEUE_NOTIFICATION"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::ADD_TO_QUEUE_NOTIFICATION = "addToQueueNotification" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::ADD_TO_QUEUE_NOTIFICATION - calculatedValue = Freeclimb::RequestType::build_from_hash("addToQueueNotification") + calculatedValue = Freeclimb::RequestType.build_from_hash("addToQueueNotification") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "addToQueueNotification" calculatedValue = Freeclimb::RequestType::ADD_TO_QUEUE_NOTIFICATION expect(expectedValue).to eq(calculatedValue) @@ -236,15 +234,15 @@ end describe 'test attribute "REMOVE_FROM_QUEUE_NOTIFICATION"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::REMOVE_FROM_QUEUE_NOTIFICATION = "removeFromQueueNotification" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::REMOVE_FROM_QUEUE_NOTIFICATION - calculatedValue = Freeclimb::RequestType::build_from_hash("removeFromQueueNotification") + calculatedValue = Freeclimb::RequestType.build_from_hash("removeFromQueueNotification") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "removeFromQueueNotification" calculatedValue = Freeclimb::RequestType::REMOVE_FROM_QUEUE_NOTIFICATION expect(expectedValue).to eq(calculatedValue) @@ -252,15 +250,15 @@ end describe 'test attribute "CALL_STATUS"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::CALL_STATUS = "callStatus" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::CALL_STATUS - calculatedValue = Freeclimb::RequestType::build_from_hash("callStatus") + calculatedValue = Freeclimb::RequestType.build_from_hash("callStatus") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "callStatus" calculatedValue = Freeclimb::RequestType::CALL_STATUS expect(expectedValue).to eq(calculatedValue) @@ -268,15 +266,15 @@ end describe 'test attribute "CREATE_CONFERENCE"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::CREATE_CONFERENCE = "createConference" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::CREATE_CONFERENCE - calculatedValue = Freeclimb::RequestType::build_from_hash("createConference") + calculatedValue = Freeclimb::RequestType.build_from_hash("createConference") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "createConference" calculatedValue = Freeclimb::RequestType::CREATE_CONFERENCE expect(expectedValue).to eq(calculatedValue) @@ -284,15 +282,15 @@ end describe 'test attribute "CONFERENCE_STATUS"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::CONFERENCE_STATUS = "conferenceStatus" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::CONFERENCE_STATUS - calculatedValue = Freeclimb::RequestType::build_from_hash("conferenceStatus") + calculatedValue = Freeclimb::RequestType.build_from_hash("conferenceStatus") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "conferenceStatus" calculatedValue = Freeclimb::RequestType::CONFERENCE_STATUS expect(expectedValue).to eq(calculatedValue) @@ -300,15 +298,15 @@ end describe 'test attribute "LEAVE_CONFERENCE"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::LEAVE_CONFERENCE = "leaveConference" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::LEAVE_CONFERENCE - calculatedValue = Freeclimb::RequestType::build_from_hash("leaveConference") + calculatedValue = Freeclimb::RequestType.build_from_hash("leaveConference") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "leaveConference" calculatedValue = Freeclimb::RequestType::LEAVE_CONFERENCE expect(expectedValue).to eq(calculatedValue) @@ -316,15 +314,15 @@ end describe 'test attribute "ADD_TO_CONFERENCE_NOTIFICATION"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::ADD_TO_CONFERENCE_NOTIFICATION = "addToConferenceNotification" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::ADD_TO_CONFERENCE_NOTIFICATION - calculatedValue = Freeclimb::RequestType::build_from_hash("addToConferenceNotification") + calculatedValue = Freeclimb::RequestType.build_from_hash("addToConferenceNotification") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "addToConferenceNotification" calculatedValue = Freeclimb::RequestType::ADD_TO_CONFERENCE_NOTIFICATION expect(expectedValue).to eq(calculatedValue) @@ -332,15 +330,15 @@ end describe 'test attribute "CONFERENCE_RECORDING_STATUS"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::CONFERENCE_RECORDING_STATUS = "conferenceRecordingStatus" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::CONFERENCE_RECORDING_STATUS - calculatedValue = Freeclimb::RequestType::build_from_hash("conferenceRecordingStatus") + calculatedValue = Freeclimb::RequestType.build_from_hash("conferenceRecordingStatus") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "conferenceRecordingStatus" calculatedValue = Freeclimb::RequestType::CONFERENCE_RECORDING_STATUS expect(expectedValue).to eq(calculatedValue) @@ -348,15 +346,15 @@ end describe 'test attribute "CONFERENCE_CALL_CONTROL"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::CONFERENCE_CALL_CONTROL = "conferenceCallControl" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::CONFERENCE_CALL_CONTROL - calculatedValue = Freeclimb::RequestType::build_from_hash("conferenceCallControl") + calculatedValue = Freeclimb::RequestType.build_from_hash("conferenceCallControl") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "conferenceCallControl" calculatedValue = Freeclimb::RequestType::CONFERENCE_CALL_CONTROL expect(expectedValue).to eq(calculatedValue) @@ -364,15 +362,15 @@ end describe 'test attribute "MESSAGE_DELIVERY"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::MESSAGE_DELIVERY = "messageDelivery" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::MESSAGE_DELIVERY - calculatedValue = Freeclimb::RequestType::build_from_hash("messageDelivery") + calculatedValue = Freeclimb::RequestType.build_from_hash("messageDelivery") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "messageDelivery" calculatedValue = Freeclimb::RequestType::MESSAGE_DELIVERY expect(expectedValue).to eq(calculatedValue) @@ -380,19 +378,18 @@ end describe 'test attribute "MESSAGE_STATUS"' do - it 'should work' do + it "should work" do expect { Freeclimb::RequestType::MESSAGE_STATUS = "messageStatus" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::RequestType::MESSAGE_STATUS - calculatedValue = Freeclimb::RequestType::build_from_hash("messageStatus") + calculatedValue = Freeclimb::RequestType.build_from_hash("messageStatus") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "messageStatus" calculatedValue = Freeclimb::RequestType::MESSAGE_STATUS expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/say_spec.rb b/spec/models/say_spec.rb index b00e24df..d6811c4b 100644 --- a/spec/models/say_spec.rb +++ b/spec/models/say_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Say @@ -21,323 +19,187 @@ describe Freeclimb::Say do let(:instance) { Freeclimb::Say.new } - describe 'test an instance of Say' do - it 'should create an instance of Say' do + describe "test an instance of Say" do + it "should create an instance of Say" do expect(instance).to be_instance_of(Freeclimb::Say) end end - + describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "language"' do - it 'should work' do - + it "should work" do instance.language = "TEST_STRING" - expect(instance.language).to eq("TEST_STRING") - - - + expect(instance.language).to eq("TEST_STRING") end end describe 'test attribute "loop"' do - it 'should work' do - - + it "should work" do instance.loop = 1 expect(instance.loop).to eq(1) - - - end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Say' do - expect { instance = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Say.new( + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Say" do + expect { + Freeclimb::Say.new( + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::Say.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Say.new( text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - + privacy_mode: true, - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::Say.new( + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Say.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Say.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true ) instance_2 = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - - - loop: 1, - - privacy_mode: true, - - - + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 2, - - - - privacy_mode: true, - - - + text: "TS", + + language: "TS", + + loop: 2, + + privacy_mode: true ) instance_2 = Freeclimb::Say.new( - - text: "ST", - - - - - language: "ST", - - - - loop: 1, - - - - privacy_mode: false, - - - + text: "ST", + + language: "ST", + + loop: 1, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - - ) + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -346,141 +208,77 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Say.new( - - text: "TS", - - - - - language: "TS", - - - - loop: 1, - - - - privacy_mode: true, - - - + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true ) - it 'deserializes the data of text' do + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of language' do + + it "deserializes the data of language" do expect(instance._deserialize("String", instance.language)).to be_a_kind_of(String) end - - - it 'deserializes the data of loop' do + + it "deserializes the data of loop" do expect(instance._deserialize("Integer", instance.loop)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::Say.new( - text: "TS", - - - - + language: "TS", - - - + loop: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -488,32 +286,25 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Say.new( - - text: "TS", - - - - language: "TS", - - - loop: 1, - - - privacy_mode: true, - - ) - it 'returns text in the form of hash' do + text: "TS", + + language: "TS", + + loop: 1, + + privacy_mode: true + ) + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns language in the form of hash' do + it "returns language in the form of hash" do expect(instance._to_hash(instance.language)).to eq(instance.language) end - it 'returns loop in the form of hash' do + it "returns loop in the form of hash" do expect(instance._to_hash(instance.loop)).to eq(instance.loop) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/send_digits_spec.rb b/spec/models/send_digits_spec.rb index 050a7259..f1d831f5 100644 --- a/spec/models/send_digits_spec.rb +++ b/spec/models/send_digits_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SendDigits @@ -21,256 +19,158 @@ describe Freeclimb::SendDigits do let(:instance) { Freeclimb::SendDigits.new } - describe 'test an instance of SendDigits' do - it 'should create an instance of SendDigits' do + describe "test an instance of SendDigits" do + it "should create an instance of SendDigits" do expect(instance).to be_instance_of(Freeclimb::SendDigits) end end - + describe 'test attribute "digits"' do - it 'should work' do - + it "should work" do instance.digits = "TEST_STRING" - expect(instance.digits).to eq("TEST_STRING") - - - + expect(instance.digits).to eq("TEST_STRING") end end describe 'test attribute "pause_ms"' do - it 'should work' do - - + it "should work" do instance.pause_ms = 1 expect(instance.pause_ms).to eq(1) - - - end end describe 'test attribute "privacy_mode"' do - it 'should work' do + it "should work" do instance.privacy_mode = false - expect(instance.privacy_mode).to eq(false) - - - + expect(instance.privacy_mode).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::SendDigits.new( + digits: "TS", + + pause_ms: 1, + + privacy_mode: true + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SendDigits' do - expect { instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::SendDigits" do + expect { + Freeclimb::SendDigits.new( + digits: "TS", + + pause_ms: 1, + + privacy_mode: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SendDigits.new( + digits: "TS", + + pause_ms: 1, + + privacy_mode: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - + digits: "TS", + + pause_ms: 1, + + privacy_mode: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::SendDigits.new - skip 'checks if properties are invalid' do - instance = Freeclimb::SendDigits.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - + digits: "TS", + + pause_ms: 1, + + privacy_mode: true ) instance_2 = Freeclimb::SendDigits.new( - - digits: "TS", - - - - - - pause_ms: 1, - - privacy_mode: true, - - - + digits: "TS", + + pause_ms: 1, + + privacy_mode: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 2, - - - - privacy_mode: true, - - - + digits: "TS", + + pause_ms: 2, + + privacy_mode: true ) instance_2 = Freeclimb::SendDigits.new( - - digits: "ST", - - - - pause_ms: 1, - - - - privacy_mode: false, - - - + digits: "ST", + + pause_ms: 1, + + privacy_mode: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - - ) + digits: "TS", + + pause_ms: 1, + + privacy_mode: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -279,110 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - - pause_ms: 1, - - - - privacy_mode: true, - - - + digits: "TS", + + pause_ms: 1, + + privacy_mode: true ) - it 'deserializes the data of digits' do + it "deserializes the data of digits" do expect(instance._deserialize("String", instance.digits)).to be_a_kind_of(String) end - - - it 'deserializes the data of pause_ms' do + + it "deserializes the data of pause_ms" do expect(instance._deserialize("Integer", instance.pause_ms)).to be_a_kind_of(Integer) end - - - - - it 'deserializes the data of privacy_mode' do + + it "deserializes the data of privacy_mode" do expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) instance_2 = Freeclimb::SendDigits.new( - digits: "TS", - - - + pause_ms: 1, - - - - privacy_mode: true, - - - + + privacy_mode: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -390,25 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SendDigits.new( - - digits: "TS", - - - pause_ms: 1, - - - privacy_mode: true, - - ) - it 'returns digits in the form of hash' do + digits: "TS", + + pause_ms: 1, + + privacy_mode: true + ) + it "returns digits in the form of hash" do expect(instance._to_hash(instance.digits)).to eq(instance.digits) end - it 'returns pause_ms in the form of hash' do + it "returns pause_ms in the form of hash" do expect(instance._to_hash(instance.pause_ms)).to eq(instance.pause_ms) end - it 'returns privacy_mode in the form of hash' do + it "returns privacy_mode in the form of hash" do expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode) end end - end diff --git a/spec/models/set_dtmf_pass_through_spec.rb b/spec/models/set_dtmf_pass_through_spec.rb index f326a9e9..ca879050 100644 --- a/spec/models/set_dtmf_pass_through_spec.rb +++ b/spec/models/set_dtmf_pass_through_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SetDTMFPassThrough @@ -21,132 +19,100 @@ describe Freeclimb::SetDTMFPassThrough do let(:instance) { Freeclimb::SetDTMFPassThrough.new } - describe 'test an instance of SetDTMFPassThrough' do - it 'should create an instance of SetDTMFPassThrough' do + describe "test an instance of SetDTMFPassThrough" do + it "should create an instance of SetDTMFPassThrough" do expect(instance).to be_instance_of(Freeclimb::SetDTMFPassThrough) end end - + describe 'test attribute "dtmf_pass_through"' do - it 'should work' do + it "should work" do instance.dtmf_pass_through = false - expect(instance.dtmf_pass_through).to eq(false) - - - + expect(instance.dtmf_pass_through).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SetDTMFPassThrough' do - expect { instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::SetDTMFPassThrough.new( + dtmf_pass_through: true + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::SetDTMFPassThrough" do + expect { + Freeclimb::SetDTMFPassThrough.new( + dtmf_pass_through: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SetDTMFPassThrough.new( + dtmf_pass_through: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::SetDTMFPassThrough.new - skip 'checks if properties are invalid' do - instance = Freeclimb::SetDTMFPassThrough.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) instance_2 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) instance_2 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: false, - - - + dtmf_pass_through: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - - ) + dtmf_pass_through: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) instance_2 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -155,53 +121,36 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) - - - it 'deserializes the data of dtmf_pass_through' do + + it "deserializes the data of dtmf_pass_through" do expect(instance._deserialize("Boolean", instance.dtmf_pass_through)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) instance_2 = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - - + dtmf_pass_through: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -209,12 +158,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SetDTMFPassThrough.new( - dtmf_pass_through: true, - - ) - it 'returns dtmf_pass_through in the form of hash' do + dtmf_pass_through: true + ) + it "returns dtmf_pass_through in the form of hash" do expect(instance._to_hash(instance.dtmf_pass_through)).to eq(instance.dtmf_pass_through) end end - end diff --git a/spec/models/set_listen_spec.rb b/spec/models/set_listen_spec.rb index 3d97f19f..f9944c3e 100644 --- a/spec/models/set_listen_spec.rb +++ b/spec/models/set_listen_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SetListen @@ -21,132 +19,100 @@ describe Freeclimb::SetListen do let(:instance) { Freeclimb::SetListen.new } - describe 'test an instance of SetListen' do - it 'should create an instance of SetListen' do + describe "test an instance of SetListen" do + it "should create an instance of SetListen" do expect(instance).to be_instance_of(Freeclimb::SetListen) end end - + describe 'test attribute "listen"' do - it 'should work' do + it "should work" do instance.listen = false - expect(instance.listen).to eq(false) - - - + expect(instance.listen).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SetListen.new( - listen: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SetListen' do - expect { instance = Freeclimb::SetListen.new( - listen: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SetListen.new( - listen: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::SetListen.new( + listen: true + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::SetListen" do + expect { + Freeclimb::SetListen.new( + listen: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SetListen.new( + listen: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::SetListen.new - skip 'checks if properties are invalid' do - instance = Freeclimb::SetListen.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) instance_2 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) instance_2 = Freeclimb::SetListen.new( - listen: false, - - - + listen: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SetListen.new( - listen: true, - - - - ) + listen: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) instance_2 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -155,53 +121,36 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) - - - it 'deserializes the data of listen' do + + it "deserializes the data of listen" do expect(instance._deserialize("Boolean", instance.listen)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) instance_2 = Freeclimb::SetListen.new( - listen: true, - - - + listen: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -209,12 +158,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SetListen.new( - listen: true, - - ) - it 'returns listen in the form of hash' do + listen: true + ) + it "returns listen in the form of hash" do expect(instance._to_hash(instance.listen)).to eq(instance.listen) end end - end diff --git a/spec/models/set_talk_spec.rb b/spec/models/set_talk_spec.rb index 47e992fe..eb4ebc0e 100644 --- a/spec/models/set_talk_spec.rb +++ b/spec/models/set_talk_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SetTalk @@ -21,132 +19,100 @@ describe Freeclimb::SetTalk do let(:instance) { Freeclimb::SetTalk.new } - describe 'test an instance of SetTalk' do - it 'should create an instance of SetTalk' do + describe "test an instance of SetTalk" do + it "should create an instance of SetTalk" do expect(instance).to be_instance_of(Freeclimb::SetTalk) end end - + describe 'test attribute "talk"' do - it 'should work' do + it "should work" do instance.talk = false - expect(instance.talk).to eq(false) - - - + expect(instance.talk).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SetTalk.new( - talk: true, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SetTalk' do - expect { instance = Freeclimb::SetTalk.new( - talk: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SetTalk.new( - talk: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::SetTalk.new( + talk: true + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::SetTalk" do + expect { + Freeclimb::SetTalk.new( + talk: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SetTalk.new( + talk: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::SetTalk.new - skip 'checks if properties are invalid' do - instance = Freeclimb::SetTalk.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) instance_2 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) instance_2 = Freeclimb::SetTalk.new( - talk: false, - - - + talk: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SetTalk.new( - talk: true, - - - - ) + talk: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) instance_2 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -155,53 +121,36 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) - - - it 'deserializes the data of talk' do + + it "deserializes the data of talk" do expect(instance._deserialize("Boolean", instance.talk)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) instance_2 = Freeclimb::SetTalk.new( - talk: true, - - - + talk: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -209,12 +158,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SetTalk.new( - talk: true, - - ) - it 'returns talk in the form of hash' do + talk: true + ) + it "returns talk in the form of hash" do expect(instance._to_hash(instance.talk)).to eq(instance.talk) end end - end diff --git a/spec/models/sms_spec.rb b/spec/models/sms_spec.rb index a3127637..08332ba5 100644 --- a/spec/models/sms_spec.rb +++ b/spec/models/sms_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Sms @@ -21,345 +19,187 @@ describe Freeclimb::Sms do let(:instance) { Freeclimb::Sms.new } - describe 'test an instance of Sms' do - it 'should create an instance of Sms' do + describe "test an instance of Sms" do + it "should create an instance of Sms" do expect(instance).to be_instance_of(Freeclimb::Sms) end end - + describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "text"' do - it 'should work' do - + it "should work" do instance.text = "TEST_STRING" - expect(instance.text).to eq("TEST_STRING") - - - + expect(instance.text).to eq("TEST_STRING") end end describe 'test attribute "notification_url"' do - it 'should work' do - + it "should work" do instance.notification_url = "TEST_STRING" - expect(instance.notification_url).to eq("TEST_STRING") - - - + expect(instance.notification_url).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Sms' do - expect { instance = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::Sms.new( + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Sms" do + expect { + Freeclimb::Sms.new( + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::Sms.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Sms.new( to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - + notification_url: "TS", - - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::Sms.new( + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Sms.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Sms.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - + it "checks if objects are equal" do instance_1 = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" ) instance_2 = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" ) instance_2 = Freeclimb::Sms.new( - - to: "ST", - - - - - from: "ST", - - - - - text: "ST", - - - - - notification_url: "ST", - - - + to: "ST", + + from: "ST", + + text: "ST", + + notification_url: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - - ) + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) instance_2 = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -368,151 +208,77 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Sms.new( - - to: "TS", - - - - - from: "TS", - - - - - text: "TS", - - - - - notification_url: "TS", - - - + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" ) - it 'deserializes the data of to' do + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of text' do + + it "deserializes the data of text" do expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String) end - - - it 'deserializes the data of notification_url' do + + it "deserializes the data of notification_url" do expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) instance_2 = Freeclimb::Sms.new( - to: "TS", - - - - + from: "TS", - - - - + text: "TS", - - - - - notification_url: "TS", - - - + + notification_url: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -520,34 +286,25 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Sms.new( - - to: "TS", - - - - from: "TS", - - - - text: "TS", - - - - notification_url: "TS", - - ) - it 'returns to in the form of hash' do + to: "TS", + + from: "TS", + + text: "TS", + + notification_url: "TS" + ) + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns text in the form of hash' do + it "returns text in the form of hash" do expect(instance._to_hash(instance.text)).to eq(instance.text) end - it 'returns notification_url in the form of hash' do + it "returns notification_url in the form of hash" do expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url) end end - end diff --git a/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb b/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb index f5b47163..cd623706 100644 --- a/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +++ b/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandAltBusinessIdType @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCBrandAltBusinessIdType do let(:instance) { Freeclimb::SMSTenDLCBrandAltBusinessIdType.new } - describe 'test an instance of SMSTenDLCBrandAltBusinessIdType' do - it 'should create an instance of SMSTenDLCBrandAltBusinessIdType' do + describe "test an instance of SMSTenDLCBrandAltBusinessIdType" do + it "should create an instance of SMSTenDLCBrandAltBusinessIdType" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandAltBusinessIdType) end end - + describe 'test attribute "NONE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE = "NONE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE - calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::build_from_hash("NONE") + calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType.build_from_hash("NONE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NONE" calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "DUNS"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS = "DUNS" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS - calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::build_from_hash("DUNS") + calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType.build_from_hash("DUNS") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DUNS" calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "GIIN"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN = "GIIN" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN - calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::build_from_hash("GIIN") + calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType.build_from_hash("GIIN") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "GIIN" calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "LEI"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI = "LEI" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI - calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::build_from_hash("LEI") + calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType.build_from_hash("LEI") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "LEI" calculatedValue = Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_brand_entity_type_spec.rb b/spec/models/sms_ten_dlc_brand_entity_type_spec.rb index 9e659274..4ca19d7b 100644 --- a/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +++ b/spec/models/sms_ten_dlc_brand_entity_type_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandEntityType @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCBrandEntityType do let(:instance) { Freeclimb::SMSTenDLCBrandEntityType.new } - describe 'test an instance of SMSTenDLCBrandEntityType' do - it 'should create an instance of SMSTenDLCBrandEntityType' do + describe "test an instance of SMSTenDLCBrandEntityType" do + it "should create an instance of SMSTenDLCBrandEntityType" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandEntityType) end end - + describe 'test attribute "PRIVATE_PROFIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT = "PRIVATE_PROFIT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT - calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::build_from_hash("PRIVATE_PROFIT") + calculatedValue = Freeclimb::SMSTenDLCBrandEntityType.build_from_hash("PRIVATE_PROFIT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "PRIVATE_PROFIT" calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "PUBLIC_PROFIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT = "PUBLIC_PROFIT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT - calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::build_from_hash("PUBLIC_PROFIT") + calculatedValue = Freeclimb::SMSTenDLCBrandEntityType.build_from_hash("PUBLIC_PROFIT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "PUBLIC_PROFIT" calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "NON_PROFIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT = "NON_PROFIT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT - calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::build_from_hash("NON_PROFIT") + calculatedValue = Freeclimb::SMSTenDLCBrandEntityType.build_from_hash("NON_PROFIT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NON_PROFIT" calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "GOVERNMENT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT = "GOVERNMENT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT - calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::build_from_hash("GOVERNMENT") + calculatedValue = Freeclimb::SMSTenDLCBrandEntityType.build_from_hash("GOVERNMENT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "GOVERNMENT" calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT expect(expectedValue).to eq(calculatedValue) @@ -92,19 +90,18 @@ end describe 'test attribute "SOLE_PROPRIETOR"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR = "SOLE_PROPRIETOR" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR - calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::build_from_hash("SOLE_PROPRIETOR") + calculatedValue = Freeclimb::SMSTenDLCBrandEntityType.build_from_hash("SOLE_PROPRIETOR") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SOLE_PROPRIETOR" calculatedValue = Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_brand_identity_status_spec.rb b/spec/models/sms_ten_dlc_brand_identity_status_spec.rb index 685ef2a8..5c3e1225 100644 --- a/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +++ b/spec/models/sms_ten_dlc_brand_identity_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandIdentityStatus @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCBrandIdentityStatus do let(:instance) { Freeclimb::SMSTenDLCBrandIdentityStatus.new } - describe 'test an instance of SMSTenDLCBrandIdentityStatus' do - it 'should create an instance of SMSTenDLCBrandIdentityStatus' do + describe "test an instance of SMSTenDLCBrandIdentityStatus" do + it "should create an instance of SMSTenDLCBrandIdentityStatus" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandIdentityStatus) end end - + describe 'test attribute "SELF_DECLARED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED = "SELF_DECLARED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED - calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::build_from_hash("SELF_DECLARED") + calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus.build_from_hash("SELF_DECLARED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SELF_DECLARED" calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "UNVERIFIED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED = "UNVERIFIED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED - calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::build_from_hash("UNVERIFIED") + calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus.build_from_hash("UNVERIFIED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "UNVERIFIED" calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "VERIFIED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED = "VERIFIED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED - calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::build_from_hash("VERIFIED") + calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus.build_from_hash("VERIFIED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "VERIFIED" calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED expect(expectedValue).to eq(calculatedValue) @@ -76,19 +74,18 @@ end describe 'test attribute "VETTED_VERIFIED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED = "VETTED_VERIFIED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED - calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::build_from_hash("VETTED_VERIFIED") + calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus.build_from_hash("VETTED_VERIFIED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "VETTED_VERIFIED" calculatedValue = Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_brand_relationship_spec.rb b/spec/models/sms_ten_dlc_brand_relationship_spec.rb index 40437ffb..28a80e50 100644 --- a/spec/models/sms_ten_dlc_brand_relationship_spec.rb +++ b/spec/models/sms_ten_dlc_brand_relationship_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandRelationship @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCBrandRelationship do let(:instance) { Freeclimb::SMSTenDLCBrandRelationship.new } - describe 'test an instance of SMSTenDLCBrandRelationship' do - it 'should create an instance of SMSTenDLCBrandRelationship' do + describe "test an instance of SMSTenDLCBrandRelationship" do + it "should create an instance of SMSTenDLCBrandRelationship" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandRelationship) end end - + describe 'test attribute "BASIC_ACCOUNT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT = "BASIC_ACCOUNT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT - calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::build_from_hash("BASIC_ACCOUNT") + calculatedValue = Freeclimb::SMSTenDLCBrandRelationship.build_from_hash("BASIC_ACCOUNT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "BASIC_ACCOUNT" calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "SMALL_ACCOUNT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT = "SMALL_ACCOUNT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT - calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::build_from_hash("SMALL_ACCOUNT") + calculatedValue = Freeclimb::SMSTenDLCBrandRelationship.build_from_hash("SMALL_ACCOUNT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SMALL_ACCOUNT" calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "MEDIUM_ACCOUNT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT = "MEDIUM_ACCOUNT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT - calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::build_from_hash("MEDIUM_ACCOUNT") + calculatedValue = Freeclimb::SMSTenDLCBrandRelationship.build_from_hash("MEDIUM_ACCOUNT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "MEDIUM_ACCOUNT" calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "LARGE_ACCOUNT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT = "LARGE_ACCOUNT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT - calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::build_from_hash("LARGE_ACCOUNT") + calculatedValue = Freeclimb::SMSTenDLCBrandRelationship.build_from_hash("LARGE_ACCOUNT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "LARGE_ACCOUNT" calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT expect(expectedValue).to eq(calculatedValue) @@ -92,19 +90,18 @@ end describe 'test attribute "KEY_ACCOUNT"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT = "KEY_ACCOUNT" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT - calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::build_from_hash("KEY_ACCOUNT") + calculatedValue = Freeclimb::SMSTenDLCBrandRelationship.build_from_hash("KEY_ACCOUNT") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "KEY_ACCOUNT" calculatedValue = Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_brand_spec.rb b/spec/models/sms_ten_dlc_brand_spec.rb index 6e99a3ea..36d30965 100644 --- a/spec/models/sms_ten_dlc_brand_spec.rb +++ b/spec/models/sms_ten_dlc_brand_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrand @@ -21,3214 +19,1612 @@ describe Freeclimb::SMSTenDLCBrand do let(:instance) { Freeclimb::SMSTenDLCBrand.new } - describe 'test an instance of SMSTenDLCBrand' do - it 'should create an instance of SMSTenDLCBrand' do + describe "test an instance of SMSTenDLCBrand" do + it "should create an instance of SMSTenDLCBrand" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrand) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end - describe 'test attribute "entity_type"' do - it 'assigns value PRIVATE_PROFIT' do + it "assigns value PRIVATE_PROFIT" do instance.entity_type = Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT - expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT) + expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT) end - it 'assigns value PUBLIC_PROFIT' do + it "assigns value PUBLIC_PROFIT" do instance.entity_type = Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT - expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT) + expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::PUBLIC_PROFIT) end - it 'assigns value NON_PROFIT' do + it "assigns value NON_PROFIT" do instance.entity_type = Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT - expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT) + expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::NON_PROFIT) end - it 'assigns value GOVERNMENT' do + it "assigns value GOVERNMENT" do instance.entity_type = Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT - expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT) + expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::GOVERNMENT) end - it 'assigns value SOLE_PROPRIETOR' do + it "assigns value SOLE_PROPRIETOR" do instance.entity_type = Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR - expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR) + expect(instance.entity_type).to eq(Freeclimb::SMSTenDLCBrandEntityType::SOLE_PROPRIETOR) end end describe 'test attribute "csp_id"' do - it 'should work' do - + it "should work" do instance.csp_id = "TEST_STRING" - expect(instance.csp_id).to eq("TEST_STRING") - - - + expect(instance.csp_id).to eq("TEST_STRING") end end describe 'test attribute "brand_id"' do - it 'should work' do - + it "should work" do instance.brand_id = "TEST_STRING" - expect(instance.brand_id).to eq("TEST_STRING") - - - + expect(instance.brand_id).to eq("TEST_STRING") end end describe 'test attribute "first_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.first_name = "T" * 100 - expect(instance.first_name).to eq("T" * 100) + expect(instance.first_name).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.first_name = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.first_name = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "last_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.last_name = "T" * 100 - expect(instance.last_name).to eq("T" * 100) + expect(instance.last_name).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.last_name = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.last_name = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "display_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.display_name = "T" * 255 - expect(instance.display_name).to eq("T" * 255) + expect(instance.display_name).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.display_name = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.display_name = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "company_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.company_name = "T" * 255 - expect(instance.company_name).to eq("T" * 255) + expect(instance.company_name).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.company_name = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.company_name = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "ein"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.ein = "T" * 21 - expect(instance.ein).to eq("T" * 21) + expect(instance.ein).to eq("T" * 21) end - it 'should not assign a value over maxLength' do - expect { instance.ein = "T" * (21 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.ein = "T" * (21 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "ein_issuing_country"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.ein_issuing_country = "T" * 2 - expect(instance.ein_issuing_country).to eq("T" * 2) + expect(instance.ein_issuing_country).to eq("T" * 2) end - it 'should not assign a value over maxLength' do - expect { instance.ein_issuing_country = "T" * (2 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.ein_issuing_country = "T" * (2 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "phone"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.phone = "T" * 20 - expect(instance.phone).to eq("T" * 20) + expect(instance.phone).to eq("T" * 20) end - it 'should not assign a value over maxLength' do - expect { instance.phone = "T" * (20 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.phone = "T" * (20 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "street"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.street = "T" * 100 - expect(instance.street).to eq("T" * 100) + expect(instance.street).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.street = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.street = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "city"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.city = "T" * 100 - expect(instance.city).to eq("T" * 100) + expect(instance.city).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.city = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.city = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "state"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.state = "T" * 20 - expect(instance.state).to eq("T" * 20) + expect(instance.state).to eq("T" * 20) end - it 'should not assign a value over maxLength' do - expect { instance.state = "T" * (20 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.state = "T" * (20 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "postal_code"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.postal_code = "T" * 10 - expect(instance.postal_code).to eq("T" * 10) + expect(instance.postal_code).to eq("T" * 10) end - it 'should not assign a value over maxLength' do - expect { instance.postal_code = "T" * (10 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.postal_code = "T" * (10 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "country"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.country = "T" * 2 - expect(instance.country).to eq("T" * 2) + expect(instance.country).to eq("T" * 2) end - it 'should not assign a value over maxLength' do - expect { instance.country = "T" * (2 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.country = "T" * (2 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "email"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.email = "T" * 100 - expect(instance.email).to eq("T" * 100) + expect(instance.email).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.email = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.email = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "stock_symbol"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.stock_symbol = "T" * 10 - expect(instance.stock_symbol).to eq("T" * 10) + expect(instance.stock_symbol).to eq("T" * 10) end - it 'should not assign a value over maxLength' do - expect { instance.stock_symbol = "T" * (10 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.stock_symbol = "T" * (10 + 1) }.to raise_error(ArgumentError) end end - describe 'test attribute "stock_exchange"' do - it 'assigns value NONE' do + it "assigns value NONE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::NONE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NONE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NONE) end - it 'assigns value NASDAQ' do + it "assigns value NASDAQ" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ) end - it 'assigns value NYSE' do + it "assigns value NYSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::NYSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NYSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NYSE) end - it 'assigns value AMEX' do + it "assigns value AMEX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::AMEX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::AMEX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::AMEX) end - it 'assigns value AMX' do + it "assigns value AMX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::AMX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::AMX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::AMX) end - it 'assigns value ASX' do + it "assigns value ASX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::ASX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::ASX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::ASX) end - it 'assigns value B3' do + it "assigns value B3" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::B3 - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::B3) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::B3) end - it 'assigns value BME' do + it "assigns value BME" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::BME - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::BME) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::BME) end - it 'assigns value BSE' do + it "assigns value BSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::BSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::BSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::BSE) end - it 'assigns value FRA' do + it "assigns value FRA" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::FRA - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::FRA) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::FRA) end - it 'assigns value ICEX' do + it "assigns value ICEX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::ICEX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::ICEX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::ICEX) end - it 'assigns value JPX' do + it "assigns value JPX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::JPX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::JPX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::JPX) end - it 'assigns value JSE' do + it "assigns value JSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::JSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::JSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::JSE) end - it 'assigns value KRX' do + it "assigns value KRX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::KRX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::KRX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::KRX) end - it 'assigns value LON' do + it "assigns value LON" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::LON - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::LON) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::LON) end - it 'assigns value NSE' do + it "assigns value NSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::NSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::NSE) end - it 'assigns value OMX' do + it "assigns value OMX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::OMX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::OMX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::OMX) end - it 'assigns value SEHK' do + it "assigns value SEHK" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::SEHK - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SEHK) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SEHK) end - it 'assigns value SGX' do + it "assigns value SGX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::SGX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SGX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SGX) end - it 'assigns value SSE' do + it "assigns value SSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::SSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SSE) end - it 'assigns value STO' do + it "assigns value STO" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::STO - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::STO) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::STO) end - it 'assigns value SWX' do + it "assigns value SWX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::SWX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SWX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SWX) end - it 'assigns value SZSE' do + it "assigns value SZSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::SZSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SZSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::SZSE) end - it 'assigns value TSX' do + it "assigns value TSX" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::TSX - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::TSX) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::TSX) end - it 'assigns value TWSE' do + it "assigns value TWSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::TWSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::TWSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::TWSE) end - it 'assigns value VSE' do + it "assigns value VSE" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::VSE - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::VSE) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::VSE) end - it 'assigns value OTHER' do + it "assigns value OTHER" do instance.stock_exchange = Freeclimb::SMSTenDLCBrandStockExchange::OTHER - expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::OTHER) + expect(instance.stock_exchange).to eq(Freeclimb::SMSTenDLCBrandStockExchange::OTHER) end end describe 'test attribute "ip_address"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.ip_address = "T" * 50 - expect(instance.ip_address).to eq("T" * 50) + expect(instance.ip_address).to eq("T" * 50) end - it 'should not assign a value over maxLength' do - expect { instance.ip_address = "T" * (50 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.ip_address = "T" * (50 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "website"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.website = "T" * 100 - expect(instance.website).to eq("T" * 100) + expect(instance.website).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.website = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.website = "T" * (100 + 1) }.to raise_error(ArgumentError) end end - describe 'test attribute "brand_relationship"' do - it 'assigns value BASIC_ACCOUNT' do + it "assigns value BASIC_ACCOUNT" do instance.brand_relationship = Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT - expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT) + expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT) end - it 'assigns value SMALL_ACCOUNT' do + it "assigns value SMALL_ACCOUNT" do instance.brand_relationship = Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT - expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT) + expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::SMALL_ACCOUNT) end - it 'assigns value MEDIUM_ACCOUNT' do + it "assigns value MEDIUM_ACCOUNT" do instance.brand_relationship = Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT - expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT) + expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::MEDIUM_ACCOUNT) end - it 'assigns value LARGE_ACCOUNT' do + it "assigns value LARGE_ACCOUNT" do instance.brand_relationship = Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT - expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT) + expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::LARGE_ACCOUNT) end - it 'assigns value KEY_ACCOUNT' do + it "assigns value KEY_ACCOUNT" do instance.brand_relationship = Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT - expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT) + expect(instance.brand_relationship).to eq(Freeclimb::SMSTenDLCBrandRelationship::KEY_ACCOUNT) end end describe 'test attribute "vertical"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.vertical = "T" * 50 - expect(instance.vertical).to eq("T" * 50) + expect(instance.vertical).to eq("T" * 50) end - it 'should not assign a value over maxLength' do - expect { instance.vertical = "T" * (50 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.vertical = "T" * (50 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "alt_business_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.alt_business_id = "T" * 50 - expect(instance.alt_business_id).to eq("T" * 50) + expect(instance.alt_business_id).to eq("T" * 50) end - it 'should not assign a value over maxLength' do - expect { instance.alt_business_id = "T" * (50 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.alt_business_id = "T" * (50 + 1) }.to raise_error(ArgumentError) end end - describe 'test attribute "alt_business_id_type"' do - it 'assigns value NONE' do + it "assigns value NONE" do instance.alt_business_id_type = Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE - expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE) + expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE) end - it 'assigns value DUNS' do + it "assigns value DUNS" do instance.alt_business_id_type = Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS - expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS) + expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::DUNS) end - it 'assigns value GIIN' do + it "assigns value GIIN" do instance.alt_business_id_type = Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN - expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN) + expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::GIIN) end - it 'assigns value LEI' do + it "assigns value LEI" do instance.alt_business_id_type = Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI - expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI) + expect(instance.alt_business_id_type).to eq(Freeclimb::SMSTenDLCBrandAltBusinessIdType::LEI) end end describe 'test attribute "universal_ein"' do - it 'should work' do - + it "should work" do instance.universal_ein = "TEST_STRING" - expect(instance.universal_ein).to eq("TEST_STRING") - - - + expect(instance.universal_ein).to eq("TEST_STRING") end end describe 'test attribute "reference_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.reference_id = "T" * 50 - expect(instance.reference_id).to eq("T" * 50) + expect(instance.reference_id).to eq("T" * 50) end - it 'should not assign a value over maxLength' do - expect { instance.reference_id = "T" * (50 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.reference_id = "T" * (50 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optional_attributes"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.optional_attributes = testObject expect(instance.optional_attributes).to eq(testObject) - - - end end describe 'test attribute "mock"' do - it 'should work' do + it "should work" do instance.mock = false - expect(instance.mock).to eq(false) - - - + expect(instance.mock).to eq(false) end end - describe 'test attribute "identity_status"' do - it 'assigns value SELF_DECLARED' do + it "assigns value SELF_DECLARED" do instance.identity_status = Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED - expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED) + expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED) end - it 'assigns value UNVERIFIED' do + it "assigns value UNVERIFIED" do instance.identity_status = Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED - expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED) + expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::UNVERIFIED) end - it 'assigns value VERIFIED' do + it "assigns value VERIFIED" do instance.identity_status = Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED - expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED) + expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::VERIFIED) end - it 'assigns value VETTED_VERIFIED' do + it "assigns value VETTED_VERIFIED" do instance.identity_status = Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED - expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED) + expect(instance.identity_status).to eq(Freeclimb::SMSTenDLCBrandIdentityStatus::VETTED_VERIFIED) end end describe 'test attribute "create_date"' do - it 'should work' do + it "should work" do instance.create_date = "2022-07-05T15:17:05Z" - expect(instance.create_date).to eq("2022-07-05T15:17:05Z") - - - + expect(instance.create_date).to eq("2022-07-05T15:17:05Z") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - - csp_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - ein: "TS", - - - - - ein_issuing_country: "TS", - - - - - phone: "TS", - - - - - street: "TS", - - - - - city: "TS", - - - - - state: "TS", - - - - - postal_code: "TS", - - - - - country: "TS", - - - - - email: "TS", - - - - - stock_symbol: "TS", - - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - - ip_address: "TS", - - - - - website: "TS", - - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - - vertical: "TS", - - - - - alt_business_id: "TS", - - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - - universal_ein: "TS", - - - - - reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCBrand' do - expect { instance = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - - csp_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - ein: "TS", - - - - - ein_issuing_country: "TS", - - - - - phone: "TS", - - - - - street: "TS", - - - - - city: "TS", - - - - - state: "TS", - - - - - postal_code: "TS", - - - - - country: "TS", - - - - - email: "TS", - - - - - stock_symbol: "TS", - - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - - ip_address: "TS", - - - - - website: "TS", - - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - - vertical: "TS", - - - - - alt_business_id: "TS", - - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - - universal_ein: "TS", - - - - - reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - - csp_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - ein: "TS", - - - - - ein_issuing_country: "TS", - - - - - phone: "TS", - - - - - street: "TS", - - - - - city: "TS", - - - - - state: "TS", - - - - - postal_code: "TS", - - - - - country: "TS", - - - - - email: "TS", - - - - - stock_symbol: "TS", - - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - - ip_address: "TS", - - - - - website: "TS", - - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - - vertical: "TS", - - - - - alt_business_id: "TS", - - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - - universal_ein: "TS", - - - - - reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCBrand.new( - + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCBrand.new( account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - - reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - - ) - expect(instance.valid?).to eq(true) - end + reference_id: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCBrand.new( - - ) - expect(instance.valid?).to eq(false) - end - - end + optional_attributes: {}, - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - csp_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - ein: "TS", - - - - - ein_issuing_country: "TS", - - - - - phone: "TS", - - - - - street: "TS", - - - - - city: "TS", - - - - - state: "TS", - - - - - postal_code: "TS", - - - - - country: "TS", - - - - - email: "TS", - - - - - stock_symbol: "TS", - - - - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - ip_address: "TS", - - - - - website: "TS", - - - - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - vertical: "TS", - - - - - alt_business_id: "TS", - - - - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - universal_ein: "TS", - - - - - reference_id: "TS", - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - ) - instance_2 = Freeclimb::SMSTenDLCBrand.new( - + + create_date: "2022-07-05T15:17:05Z" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCBrand" do + expect { + Freeclimb::SMSTenDLCBrand.new( account_id: "TS", - - - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - + ip_address: "TS", - - - - + website: "TS", - - - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - optional_attributes: Hash.new(), - - - + + optional_attributes: {}, + mock: true, - - - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) + + create_date: "2022-07-05T15:17:05Z", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SMSTenDLCBrand.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCBrand.new( account_id: "TS", - - - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - + ip_address: "TS", - - - - + website: "TS", - - - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - optional_attributes: Hash.new(), - - - + + optional_attributes: {}, + mock: true, - - - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - ) - instance_2 = Freeclimb::SMSTenDLCBrand.new( - - account_id: "ST", - - - - - - - entity_type: nil, - - - csp_id: "ST", - - - - - brand_id: "ST", - - - - - first_name: "ST", - - - - - last_name: "ST", - - - - - display_name: "ST", - - - - - company_name: "ST", - - - - - ein: "ST", - - - - - ein_issuing_country: "ST", - - - - - phone: "ST", - - - - - street: "ST", - - - - - city: "ST", - - - - - state: "ST", - - - - - postal_code: "ST", - - - - - country: "ST", - - - - - email: "ST", - - - - - stock_symbol: "ST", - - - - - - - stock_exchange: nil, - - - ip_address: "ST", - - - - - website: "ST", - - - - - - - brand_relationship: nil, - - - vertical: "ST", - - - - - alt_business_id: "ST", - - - - - - - alt_business_id_type: nil, - - - universal_ein: "ST", - - - - - reference_id: "ST", - - - - - optional_attributes: Hash.new(), - - - - mock: false, - - - - - - - identity_status: nil, - - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) + + create_date: "2022-07-05T15:17:05Z", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - - describe 'test method "hash"' do - it 'calculates hash code' do + + describe 'test method "valid"' do + it "checks if properties are valid" do instance = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - - csp_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - ein: "TS", - - - - - ein_issuing_country: "TS", - - - - - phone: "TS", - - - - - street: "TS", - - - - - city: "TS", - - - - - state: "TS", - - - - - postal_code: "TS", - - - - - country: "TS", - - - - - email: "TS", - - - - - stock_symbol: "TS", - - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - - ip_address: "TS", - - - - - website: "TS", - - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - - vertical: "TS", - - - - - alt_business_id: "TS", - - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - - universal_ein: "TS", - - - - - reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - - mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, + + create_date: "2022-07-05T15:17:05Z" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCBrand.new + + expect(instance.valid?).to eq(false) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + describe 'test method "eql?"' do + it "checks if objects are equal" do instance_1 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED ) instance_2 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED ) + expect(instance_1.eql?(instance_2)).to eq(true) + end - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + it "checks if objects are not equal" do + instance_1 = Freeclimb::SMSTenDLCBrand.new( + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED + ) + instance_2 = Freeclimb::SMSTenDLCBrand.new( + account_id: "ST", + + entity_type: nil, + + csp_id: "ST", + + brand_id: "ST", + + first_name: "ST", + + last_name: "ST", + + display_name: "ST", + + company_name: "ST", + + ein: "ST", + + ein_issuing_country: "ST", + + phone: "ST", + + street: "ST", + + city: "ST", + + state: "ST", + + postal_code: "ST", + + country: "ST", + + email: "ST", + + stock_symbol: "ST", + + stock_exchange: nil, + + ip_address: "ST", + + website: "ST", + + brand_relationship: nil, + + vertical: "ST", + + alt_business_id: "ST", + + alt_business_id_type: nil, + + universal_ein: "ST", + + reference_id: "ST", + + optional_attributes: {}, + + mock: false, + + identity_status: nil + ) + expect(instance_1.eql?(instance_2)).to eq(false) end end - describe 'test method "_deserialize"' do - instance = Freeclimb::SMSTenDLCBrand.new( - + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::SMSTenDLCBrand.new( account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + create_date: "2022-07-05T15:17:05Z" + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::SMSTenDLCBrand.new( + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, + + create_date: "2022-07-05T15:17:05Z" + ) + instance_2 = Freeclimb::SMSTenDLCBrand.new( + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, + + create_date: "2022-07-05T15:17:05Z" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::SMSTenDLCBrand.new( + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, + + create_date: "2022-07-05T15:17:05Z" ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of csp_id' do + + it "deserializes the data of csp_id" do expect(instance._deserialize("String", instance.csp_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of brand_id' do + + it "deserializes the data of brand_id" do expect(instance._deserialize("String", instance.brand_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of first_name' do + + it "deserializes the data of first_name" do expect(instance._deserialize("String", instance.first_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of last_name' do + + it "deserializes the data of last_name" do expect(instance._deserialize("String", instance.last_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of display_name' do + + it "deserializes the data of display_name" do expect(instance._deserialize("String", instance.display_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of company_name' do + + it "deserializes the data of company_name" do expect(instance._deserialize("String", instance.company_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of ein' do + + it "deserializes the data of ein" do expect(instance._deserialize("String", instance.ein)).to be_a_kind_of(String) end - - - it 'deserializes the data of ein_issuing_country' do + + it "deserializes the data of ein_issuing_country" do expect(instance._deserialize("String", instance.ein_issuing_country)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone' do + + it "deserializes the data of phone" do expect(instance._deserialize("String", instance.phone)).to be_a_kind_of(String) end - - - it 'deserializes the data of street' do + + it "deserializes the data of street" do expect(instance._deserialize("String", instance.street)).to be_a_kind_of(String) end - - - it 'deserializes the data of city' do + + it "deserializes the data of city" do expect(instance._deserialize("String", instance.city)).to be_a_kind_of(String) end - - - it 'deserializes the data of state' do + + it "deserializes the data of state" do expect(instance._deserialize("String", instance.state)).to be_a_kind_of(String) end - - - it 'deserializes the data of postal_code' do + + it "deserializes the data of postal_code" do expect(instance._deserialize("String", instance.postal_code)).to be_a_kind_of(String) end - - - it 'deserializes the data of country' do + + it "deserializes the data of country" do expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String) end - - - it 'deserializes the data of email' do + + it "deserializes the data of email" do expect(instance._deserialize("String", instance.email)).to be_a_kind_of(String) end - - - it 'deserializes the data of stock_symbol' do + + it "deserializes the data of stock_symbol" do expect(instance._deserialize("String", instance.stock_symbol)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of ip_address' do + + it "deserializes the data of ip_address" do expect(instance._deserialize("String", instance.ip_address)).to be_a_kind_of(String) end - - - it 'deserializes the data of website' do + + it "deserializes the data of website" do expect(instance._deserialize("String", instance.website)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of vertical' do + + it "deserializes the data of vertical" do expect(instance._deserialize("String", instance.vertical)).to be_a_kind_of(String) end - - - it 'deserializes the data of alt_business_id' do + + it "deserializes the data of alt_business_id" do expect(instance._deserialize("String", instance.alt_business_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of universal_ein' do + + it "deserializes the data of universal_ein" do expect(instance._deserialize("String", instance.universal_ein)).to be_a_kind_of(String) end - - - it 'deserializes the data of reference_id' do + + it "deserializes the data of reference_id" do expect(instance._deserialize("String", instance.reference_id)).to be_a_kind_of(String) end - - - - it 'deserializes the data of optional_attributes' do + + it "deserializes the data of optional_attributes" do expect(instance._deserialize("Hash", instance.optional_attributes)).to be_a_kind_of(Hash) end - - - - - it 'deserializes the data of mock' do + + it "deserializes the data of mock" do expect(instance._deserialize("Boolean", instance.mock)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of create_date' do + + it "deserializes the data of create_date" do expect(instance._deserialize("Time", instance.create_date)).to be_a_kind_of(Time) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + create_date: "2022-07-05T15:17:05Z" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + create_date: "2022-07-05T15:17:05Z" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + create_date: "2022-07-05T15:17:05Z" ) instance_2 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - - - - + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - + csp_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + ein: "TS", - - - - + ein_issuing_country: "TS", - - - - + phone: "TS", - - - - + street: "TS", - - - - + city: "TS", - - - - + state: "TS", - - - - + postal_code: "TS", - - - - + country: "TS", - - - - + email: "TS", - - - - + stock_symbol: "TS", - - - - + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - + ip_address: "TS", - - - - + website: "TS", - - - - + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - + vertical: "TS", - - - - + alt_business_id: "TS", - - - - + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - + universal_ein: "TS", - - - - + reference_id: "TS", - - - - - - optional_attributes: Hash.new(), - - + + optional_attributes: {}, + mock: true, - - - - + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - - create_date: "2022-07-05T15:17:05Z", - - + + create_date: "2022-07-05T15:17:05Z" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -3236,220 +1632,160 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCBrand.new( - - account_id: "TS", - - - - entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, - - - - csp_id: "TS", - - - - brand_id: "TS", - - - - first_name: "TS", - - - - last_name: "TS", - - - - display_name: "TS", - - - - company_name: "TS", - - - - ein: "TS", - - - - ein_issuing_country: "TS", - - - - phone: "TS", - - - - street: "TS", - - - - city: "TS", - - - - state: "TS", - - - - postal_code: "TS", - - - - country: "TS", - - - - email: "TS", - - - - stock_symbol: "TS", - - - - stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, - - - - ip_address: "TS", - - - - website: "TS", - - - - brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, - - - - vertical: "TS", - - - - alt_business_id: "TS", - - - - alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, - - - - universal_ein: "TS", - - - - reference_id: "TS", - - - optional_attributes: Hash.new(), - - - mock: true, - - - - identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, - - - - create_date: "2022-07-05T15:17:05Z", - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + entity_type: Freeclimb::SMSTenDLCBrandEntityType::PRIVATE_PROFIT, + + csp_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + ein: "TS", + + ein_issuing_country: "TS", + + phone: "TS", + + street: "TS", + + city: "TS", + + state: "TS", + + postal_code: "TS", + + country: "TS", + + email: "TS", + + stock_symbol: "TS", + + stock_exchange: Freeclimb::SMSTenDLCBrandStockExchange::NONE, + + ip_address: "TS", + + website: "TS", + + brand_relationship: Freeclimb::SMSTenDLCBrandRelationship::BASIC_ACCOUNT, + + vertical: "TS", + + alt_business_id: "TS", + + alt_business_id_type: Freeclimb::SMSTenDLCBrandAltBusinessIdType::NONE, + + universal_ein: "TS", + + reference_id: "TS", + + optional_attributes: {}, + + mock: true, + + identity_status: Freeclimb::SMSTenDLCBrandIdentityStatus::SELF_DECLARED, + + create_date: "2022-07-05T15:17:05Z" + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns entity_type in the form of hash' do + it "returns entity_type in the form of hash" do expect(instance._to_hash(instance.entity_type)).to eq(instance.entity_type) end - it 'returns csp_id in the form of hash' do + it "returns csp_id in the form of hash" do expect(instance._to_hash(instance.csp_id)).to eq(instance.csp_id) end - it 'returns brand_id in the form of hash' do + it "returns brand_id in the form of hash" do expect(instance._to_hash(instance.brand_id)).to eq(instance.brand_id) end - it 'returns first_name in the form of hash' do + it "returns first_name in the form of hash" do expect(instance._to_hash(instance.first_name)).to eq(instance.first_name) end - it 'returns last_name in the form of hash' do + it "returns last_name in the form of hash" do expect(instance._to_hash(instance.last_name)).to eq(instance.last_name) end - it 'returns display_name in the form of hash' do + it "returns display_name in the form of hash" do expect(instance._to_hash(instance.display_name)).to eq(instance.display_name) end - it 'returns company_name in the form of hash' do + it "returns company_name in the form of hash" do expect(instance._to_hash(instance.company_name)).to eq(instance.company_name) end - it 'returns ein in the form of hash' do + it "returns ein in the form of hash" do expect(instance._to_hash(instance.ein)).to eq(instance.ein) end - it 'returns ein_issuing_country in the form of hash' do + it "returns ein_issuing_country in the form of hash" do expect(instance._to_hash(instance.ein_issuing_country)).to eq(instance.ein_issuing_country) end - it 'returns phone in the form of hash' do + it "returns phone in the form of hash" do expect(instance._to_hash(instance.phone)).to eq(instance.phone) end - it 'returns street in the form of hash' do + it "returns street in the form of hash" do expect(instance._to_hash(instance.street)).to eq(instance.street) end - it 'returns city in the form of hash' do + it "returns city in the form of hash" do expect(instance._to_hash(instance.city)).to eq(instance.city) end - it 'returns state in the form of hash' do + it "returns state in the form of hash" do expect(instance._to_hash(instance.state)).to eq(instance.state) end - it 'returns postal_code in the form of hash' do + it "returns postal_code in the form of hash" do expect(instance._to_hash(instance.postal_code)).to eq(instance.postal_code) end - it 'returns country in the form of hash' do + it "returns country in the form of hash" do expect(instance._to_hash(instance.country)).to eq(instance.country) end - it 'returns email in the form of hash' do + it "returns email in the form of hash" do expect(instance._to_hash(instance.email)).to eq(instance.email) end - it 'returns stock_symbol in the form of hash' do + it "returns stock_symbol in the form of hash" do expect(instance._to_hash(instance.stock_symbol)).to eq(instance.stock_symbol) end - it 'returns stock_exchange in the form of hash' do + it "returns stock_exchange in the form of hash" do expect(instance._to_hash(instance.stock_exchange)).to eq(instance.stock_exchange) end - it 'returns ip_address in the form of hash' do + it "returns ip_address in the form of hash" do expect(instance._to_hash(instance.ip_address)).to eq(instance.ip_address) end - it 'returns website in the form of hash' do + it "returns website in the form of hash" do expect(instance._to_hash(instance.website)).to eq(instance.website) end - it 'returns brand_relationship in the form of hash' do + it "returns brand_relationship in the form of hash" do expect(instance._to_hash(instance.brand_relationship)).to eq(instance.brand_relationship) end - it 'returns vertical in the form of hash' do + it "returns vertical in the form of hash" do expect(instance._to_hash(instance.vertical)).to eq(instance.vertical) end - it 'returns alt_business_id in the form of hash' do + it "returns alt_business_id in the form of hash" do expect(instance._to_hash(instance.alt_business_id)).to eq(instance.alt_business_id) end - it 'returns alt_business_id_type in the form of hash' do + it "returns alt_business_id_type in the form of hash" do expect(instance._to_hash(instance.alt_business_id_type)).to eq(instance.alt_business_id_type) end - it 'returns universal_ein in the form of hash' do + it "returns universal_ein in the form of hash" do expect(instance._to_hash(instance.universal_ein)).to eq(instance.universal_ein) end - it 'returns reference_id in the form of hash' do + it "returns reference_id in the form of hash" do expect(instance._to_hash(instance.reference_id)).to eq(instance.reference_id) end - it 'returns optional_attributes in the form of hash' do + it "returns optional_attributes in the form of hash" do expect(instance._to_hash(instance.optional_attributes)).to eq(instance.optional_attributes) end - it 'returns mock in the form of hash' do + it "returns mock in the form of hash" do expect(instance._to_hash(instance.mock)).to eq(instance.mock) end - it 'returns identity_status in the form of hash' do + it "returns identity_status in the form of hash" do expect(instance._to_hash(instance.identity_status)).to eq(instance.identity_status) end - it 'returns create_date in the form of hash' do + it "returns create_date in the form of hash" do expect(instance._to_hash(instance.create_date)).to eq(instance.create_date) end end - end diff --git a/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb b/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb index 51ffdfe5..93aa6f53 100644 --- a/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +++ b/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandStockExchange @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCBrandStockExchange do let(:instance) { Freeclimb::SMSTenDLCBrandStockExchange.new } - describe 'test an instance of SMSTenDLCBrandStockExchange' do - it 'should create an instance of SMSTenDLCBrandStockExchange' do + describe "test an instance of SMSTenDLCBrandStockExchange" do + it "should create an instance of SMSTenDLCBrandStockExchange" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandStockExchange) end end - + describe 'test attribute "NONE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::NONE = "NONE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::NONE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("NONE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("NONE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NONE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::NONE expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "NASDAQ"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ = "NASDAQ" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("NASDAQ") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("NASDAQ") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NASDAQ" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::NASDAQ expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "NYSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::NYSE = "NYSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::NYSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("NYSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("NYSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NYSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::NYSE expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "AMEX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::AMEX = "AMEX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::AMEX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("AMEX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("AMEX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "AMEX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::AMEX expect(expectedValue).to eq(calculatedValue) @@ -92,15 +90,15 @@ end describe 'test attribute "AMX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::AMX = "AMX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::AMX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("AMX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("AMX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "AMX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::AMX expect(expectedValue).to eq(calculatedValue) @@ -108,15 +106,15 @@ end describe 'test attribute "ASX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::ASX = "ASX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::ASX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("ASX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("ASX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ASX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::ASX expect(expectedValue).to eq(calculatedValue) @@ -124,15 +122,15 @@ end describe 'test attribute "B3"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::B3 = "B3" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::B3 - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("B3") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("B3") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "B3" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::B3 expect(expectedValue).to eq(calculatedValue) @@ -140,15 +138,15 @@ end describe 'test attribute "BME"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::BME = "BME" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::BME - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("BME") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("BME") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "BME" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::BME expect(expectedValue).to eq(calculatedValue) @@ -156,15 +154,15 @@ end describe 'test attribute "BSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::BSE = "BSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::BSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("BSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("BSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "BSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::BSE expect(expectedValue).to eq(calculatedValue) @@ -172,15 +170,15 @@ end describe 'test attribute "FRA"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::FRA = "FRA" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::FRA - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("FRA") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("FRA") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "FRA" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::FRA expect(expectedValue).to eq(calculatedValue) @@ -188,15 +186,15 @@ end describe 'test attribute "ICEX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::ICEX = "ICEX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::ICEX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("ICEX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("ICEX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ICEX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::ICEX expect(expectedValue).to eq(calculatedValue) @@ -204,15 +202,15 @@ end describe 'test attribute "JPX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::JPX = "JPX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::JPX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("JPX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("JPX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "JPX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::JPX expect(expectedValue).to eq(calculatedValue) @@ -220,15 +218,15 @@ end describe 'test attribute "JSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::JSE = "JSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::JSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("JSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("JSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "JSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::JSE expect(expectedValue).to eq(calculatedValue) @@ -236,15 +234,15 @@ end describe 'test attribute "KRX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::KRX = "KRX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::KRX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("KRX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("KRX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "KRX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::KRX expect(expectedValue).to eq(calculatedValue) @@ -252,15 +250,15 @@ end describe 'test attribute "LON"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::LON = "LON" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::LON - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("LON") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("LON") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "LON" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::LON expect(expectedValue).to eq(calculatedValue) @@ -268,15 +266,15 @@ end describe 'test attribute "NSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::NSE = "NSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::NSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("NSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("NSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "NSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::NSE expect(expectedValue).to eq(calculatedValue) @@ -284,15 +282,15 @@ end describe 'test attribute "OMX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::OMX = "OMX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::OMX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("OMX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("OMX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "OMX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::OMX expect(expectedValue).to eq(calculatedValue) @@ -300,15 +298,15 @@ end describe 'test attribute "SEHK"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::SEHK = "SEHK" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::SEHK - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("SEHK") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("SEHK") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SEHK" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::SEHK expect(expectedValue).to eq(calculatedValue) @@ -316,15 +314,15 @@ end describe 'test attribute "SGX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::SGX = "SGX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::SGX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("SGX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("SGX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SGX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::SGX expect(expectedValue).to eq(calculatedValue) @@ -332,15 +330,15 @@ end describe 'test attribute "SSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::SSE = "SSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::SSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("SSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("SSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::SSE expect(expectedValue).to eq(calculatedValue) @@ -348,15 +346,15 @@ end describe 'test attribute "STO"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::STO = "STO" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::STO - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("STO") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("STO") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "STO" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::STO expect(expectedValue).to eq(calculatedValue) @@ -364,15 +362,15 @@ end describe 'test attribute "SWX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::SWX = "SWX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::SWX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("SWX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("SWX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SWX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::SWX expect(expectedValue).to eq(calculatedValue) @@ -380,15 +378,15 @@ end describe 'test attribute "SZSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::SZSE = "SZSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::SZSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("SZSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("SZSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "SZSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::SZSE expect(expectedValue).to eq(calculatedValue) @@ -396,15 +394,15 @@ end describe 'test attribute "TSX"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::TSX = "TSX" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::TSX - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("TSX") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("TSX") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "TSX" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::TSX expect(expectedValue).to eq(calculatedValue) @@ -412,15 +410,15 @@ end describe 'test attribute "TWSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::TWSE = "TWSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::TWSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("TWSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("TWSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "TWSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::TWSE expect(expectedValue).to eq(calculatedValue) @@ -428,15 +426,15 @@ end describe 'test attribute "VSE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::VSE = "VSE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::VSE - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("VSE") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("VSE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "VSE" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::VSE expect(expectedValue).to eq(calculatedValue) @@ -444,19 +442,18 @@ end describe 'test attribute "OTHER"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCBrandStockExchange::OTHER = "OTHER" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCBrandStockExchange::OTHER - calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::build_from_hash("OTHER") + calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange.build_from_hash("OTHER") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "OTHER" calculatedValue = Freeclimb::SMSTenDLCBrandStockExchange::OTHER expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_brands_list_result_spec.rb b/spec/models/sms_ten_dlc_brands_list_result_spec.rb index 2bb16136..da52cf81 100644 --- a/spec/models/sms_ten_dlc_brands_list_result_spec.rb +++ b/spec/models/sms_ten_dlc_brands_list_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCBrandsListResult @@ -21,541 +19,303 @@ describe Freeclimb::SMSTenDLCBrandsListResult do let(:instance) { Freeclimb::SMSTenDLCBrandsListResult.new } - describe 'test an instance of SMSTenDLCBrandsListResult' do - it 'should create an instance of SMSTenDLCBrandsListResult' do + describe "test an instance of SMSTenDLCBrandsListResult" do + it "should create an instance of SMSTenDLCBrandsListResult" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCBrandsListResult) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "brands"' do - it 'should work' do - + it "should work" do instance.brands = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.brands).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.brands).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCBrandsListResult' do - expect { instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCBrandsListResult.new( + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCBrandsListResult.new( - - ) - expect(instance.valid?).to eq(false) + brands: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCBrandsListResult" do + expect { + Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + brands: [], - - ) - instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + brands: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTenDLCBrandsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCBrandsListResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - brands: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + brands: [] ) instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - brands: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + brands: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of brands' do + + it "deserializes the data of brands" do expect(instance._deserialize("Array", instance.brands)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - brands: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns brands in the form of hash' do + it "returns brands in the form of hash" do expect(instance._to_hash(instance.brands)).to eq(instance.brands) end end - end diff --git a/spec/models/sms_ten_dlc_campaign_spec.rb b/spec/models/sms_ten_dlc_campaign_spec.rb index ea4b6989..014a9a8c 100644 --- a/spec/models/sms_ten_dlc_campaign_spec.rb +++ b/spec/models/sms_ten_dlc_campaign_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCCampaign @@ -21,3347 +19,1665 @@ describe Freeclimb::SMSTenDLCCampaign do let(:instance) { Freeclimb::SMSTenDLCCampaign.new } - describe 'test an instance of SMSTenDLCCampaign' do - it 'should create an instance of SMSTenDLCCampaign' do + describe "test an instance of SMSTenDLCCampaign" do + it "should create an instance of SMSTenDLCCampaign" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCCampaign) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test attribute "csp_id"' do - it 'should work' do - + it "should work" do instance.csp_id = "TEST_STRING" - expect(instance.csp_id).to eq("TEST_STRING") - - - + expect(instance.csp_id).to eq("TEST_STRING") end end describe 'test attribute "reseller_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.reseller_id = "T" * 8 - expect(instance.reseller_id).to eq("T" * 8) + expect(instance.reseller_id).to eq("T" * 8) end - it 'should not assign a value over maxLength' do - expect { instance.reseller_id = "T" * (8 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.reseller_id = "T" * (8 + 1) }.to raise_error(ArgumentError) end end - describe 'test attribute "status"' do - it 'assigns value ACTIVE' do + it "assigns value ACTIVE" do instance.status = Freeclimb::SMSTenDLCCampaignStatus::ACTIVE - expect(instance.status).to eq(Freeclimb::SMSTenDLCCampaignStatus::ACTIVE) + expect(instance.status).to eq(Freeclimb::SMSTenDLCCampaignStatus::ACTIVE) end - it 'assigns value EXPIRED' do + it "assigns value EXPIRED" do instance.status = Freeclimb::SMSTenDLCCampaignStatus::EXPIRED - expect(instance.status).to eq(Freeclimb::SMSTenDLCCampaignStatus::EXPIRED) + expect(instance.status).to eq(Freeclimb::SMSTenDLCCampaignStatus::EXPIRED) end end describe 'test attribute "create_date"' do - it 'should work' do + it "should work" do instance.create_date = "2022-07-05T15:17:05Z" - expect(instance.create_date).to eq("2022-07-05T15:17:05Z") - - - + expect(instance.create_date).to eq("2022-07-05T15:17:05Z") end end describe 'test attribute "auto_renewal"' do - it 'should work' do + it "should work" do instance.auto_renewal = false - expect(instance.auto_renewal).to eq(false) - - - + expect(instance.auto_renewal).to eq(false) end end describe 'test attribute "billed_date"' do - it 'should work' do + it "should work" do instance.billed_date = "2022-07-05T15:17:05Z" - expect(instance.billed_date).to eq("2022-07-05T15:17:05Z") - - - + expect(instance.billed_date).to eq("2022-07-05T15:17:05Z") end end describe 'test attribute "brand_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.brand_id = "T" * 8 - expect(instance.brand_id).to eq("T" * 8) + expect(instance.brand_id).to eq("T" * 8) end - it 'should not assign a value over maxLength' do - expect { instance.brand_id = "T" * (8 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.brand_id = "T" * (8 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "usecase"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.usecase = "T" * 20 - expect(instance.usecase).to eq("T" * 20) + expect(instance.usecase).to eq("T" * 20) end - it 'should not assign a value over maxLength' do - expect { instance.usecase = "T" * (20 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.usecase = "T" * (20 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sub_usecases"' do - it 'should work' do - + it "should work" do instance.sub_usecases = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.sub_usecases).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.sub_usecases).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test attribute "description"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.description = "T" * 4096 - expect(instance.description).to eq("T" * 4096) + expect(instance.description).to eq("T" * 4096) end - it 'should not assign a value over maxLength' do - expect { instance.description = "T" * (4096 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.description = "T" * (4096 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "embedded_link"' do - it 'should work' do + it "should work" do instance.embedded_link = false - expect(instance.embedded_link).to eq(false) - - - + expect(instance.embedded_link).to eq(false) end end describe 'test attribute "embedded_phone"' do - it 'should work' do + it "should work" do instance.embedded_phone = false - expect(instance.embedded_phone).to eq(false) - - - + expect(instance.embedded_phone).to eq(false) end end describe 'test attribute "affiliate_marketing"' do - it 'should work' do + it "should work" do instance.affiliate_marketing = false - expect(instance.affiliate_marketing).to eq(false) - - - + expect(instance.affiliate_marketing).to eq(false) end end describe 'test attribute "number_pool"' do - it 'should work' do + it "should work" do instance.number_pool = false - expect(instance.number_pool).to eq(false) - - - + expect(instance.number_pool).to eq(false) end end describe 'test attribute "age_gated"' do - it 'should work' do + it "should work" do instance.age_gated = false - expect(instance.age_gated).to eq(false) - - - + expect(instance.age_gated).to eq(false) end end describe 'test attribute "direct_lending"' do - it 'should work' do + it "should work" do instance.direct_lending = false - expect(instance.direct_lending).to eq(false) - - - + expect(instance.direct_lending).to eq(false) end end describe 'test attribute "subscriber_optin"' do - it 'should work' do + it "should work" do instance.subscriber_optin = false - expect(instance.subscriber_optin).to eq(false) - - - + expect(instance.subscriber_optin).to eq(false) end end describe 'test attribute "subscriber_optout"' do - it 'should work' do + it "should work" do instance.subscriber_optout = false - expect(instance.subscriber_optout).to eq(false) - - - + expect(instance.subscriber_optout).to eq(false) end end describe 'test attribute "subscriber_help"' do - it 'should work' do + it "should work" do instance.subscriber_help = false - expect(instance.subscriber_help).to eq(false) - - - + expect(instance.subscriber_help).to eq(false) end end describe 'test attribute "sample1"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample1 = "T" * 1024 - expect(instance.sample1).to eq("T" * 1024) + expect(instance.sample1).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample1 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample1 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample2"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample2 = "T" * 1024 - expect(instance.sample2).to eq("T" * 1024) + expect(instance.sample2).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample2 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample2 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample3"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample3 = "T" * 1024 - expect(instance.sample3).to eq("T" * 1024) + expect(instance.sample3).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample3 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample3 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample4"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample4 = "T" * 1024 - expect(instance.sample4).to eq("T" * 1024) + expect(instance.sample4).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample4 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample4 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample5"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample5 = "T" * 1024 - expect(instance.sample5).to eq("T" * 1024) + expect(instance.sample5).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample5 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample5 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "message_flow"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.message_flow = "T" * 2048 - expect(instance.message_flow).to eq("T" * 2048) + expect(instance.message_flow).to eq("T" * 2048) end - it 'should not assign a value over maxLength' do - expect { instance.message_flow = "T" * (2048 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.message_flow = "T" * (2048 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "help_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.help_message = "T" * 255 - expect(instance.help_message).to eq("T" * 255) + expect(instance.help_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.help_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.help_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optin_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optin_keywords = "T" * 255 - expect(instance.optin_keywords).to eq("T" * 255) + expect(instance.optin_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optin_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optin_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optout_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optout_keywords = "T" * 255 - expect(instance.optout_keywords).to eq("T" * 255) + expect(instance.optout_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optout_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optout_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "help_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.help_keywords = "T" * 255 - expect(instance.help_keywords).to eq("T" * 255) + expect(instance.help_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.help_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.help_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optin_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optin_message = "T" * 255 - expect(instance.optin_message).to eq("T" * 255) + expect(instance.optin_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optin_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optin_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optout_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optout_message = "T" * 255 - expect(instance.optout_message).to eq("T" * 255) + expect(instance.optout_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optout_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optout_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "reference_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.reference_id = "T" * 50 - expect(instance.reference_id).to eq("T" * 50) + expect(instance.reference_id).to eq("T" * 50) end - it 'should not assign a value over maxLength' do - expect { instance.reference_id = "T" * (50 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.reference_id = "T" * (50 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "mock"' do - it 'should work' do + it "should work" do instance.mock = false - expect(instance.mock).to eq(false) - - - + expect(instance.mock).to eq(false) end end describe 'test attribute "next_renewal_or_expiration_date"' do - it 'should work' do + it "should work" do instance.next_renewal_or_expiration_date = "2000-01-01" - expect(instance.next_renewal_or_expiration_date).to eq("2000-01-01") - - - + expect(instance.next_renewal_or_expiration_date).to eq("2000-01-01") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - csp_id: "TS", - - - - - reseller_id: "TS", - - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - auto_renewal: true, - - - - - billed_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - sub_usecases: Array.new(), - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCCampaign' do - expect { instance = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - csp_id: "TS", - - - - - reseller_id: "TS", - - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - auto_renewal: true, - - - - - billed_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - sub_usecases: Array.new(), - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - csp_id: "TS", - - - - - reseller_id: "TS", - - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - auto_renewal: true, - - - - - billed_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - sub_usecases: Array.new(), - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCCampaign.new( - + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - ) - expect(instance.valid?).to eq(true) - end + mock: true, - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCCampaign.new( - - ) - expect(instance.valid?).to eq(false) + next_renewal_or_expiration_date: "2000-01-01" + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCCampaign.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCCampaign" do + expect { + Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + + create_date: "2022-07-05T15:17:05Z", + auto_renewal: true, - - - - - - - + + billed_date: "2022-07-05T15:17:05Z", + brand_id: "TS", - - - - + usecase: "TS", - - - - - + sub_usecases: [], - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - - - ) - instance_2 = Freeclimb::SMSTenDLCCampaign.new( - + + next_renewal_or_expiration_date: "2000-01-01", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + + create_date: "2022-07-05T15:17:05Z", + auto_renewal: true, - - - - - - - + + billed_date: "2022-07-05T15:17:05Z", + brand_id: "TS", - - - - + usecase: "TS", - - - - - + sub_usecases: [], - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) + + next_renewal_or_expiration_date: "2000-01-01", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - csp_id: "TS", - - - - - reseller_id: "TS", - - - - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - - auto_renewal: true, - - - - - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - - sub_usecases: [], - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - reference_id: "TS", - - - - mock: true, - - - - - - + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTenDLCCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + auto_renewal: true, + + billed_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true, + + next_renewal_or_expiration_date: "2000-01-01" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCCampaign.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTenDLCCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + auto_renewal: true, + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true ) instance_2 = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "ST", - - - - - campaign_id: "ST", - - - - - csp_id: "ST", - - - - - reseller_id: "ST", - - - - - - - status: nil, - - - - - auto_renewal: false, - - - - - - - - brand_id: "ST", - - - - - usecase: "ST", - - - - - - sub_usecases: nil, - - - description: "ST", - - - - embedded_link: false, - - - - embedded_phone: false, - - - - affiliate_marketing: false, - - - - number_pool: false, - - - - age_gated: false, - - - - direct_lending: false, - - - - subscriber_optin: false, - - - - subscriber_optout: false, - - - - subscriber_help: false, - - - - - sample1: "ST", - - - - - sample2: "ST", - - - - - sample3: "ST", - - - - - sample4: "ST", - - - - - sample5: "ST", - - - - - message_flow: "ST", - - - - - help_message: "ST", - - - - - optin_keywords: "ST", - - - - - optout_keywords: "ST", - - - - - help_keywords: "ST", - - - - - optin_message: "ST", - - - - - optout_message: "ST", - - - - - reference_id: "ST", - - - - mock: false, - - - - - - + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + auto_renewal: true, + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true ) - expect(instance_1.eql?(instance_2)).to eq(false) + expect(instance_1.eql?(instance_2)).to eq(true) end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - csp_id: "TS", - - - - - reseller_id: "TS", - - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - auto_renewal: true, - - - - - billed_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - sub_usecases: Array.new(), - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + it "checks if objects are not equal" do + instance_1 = Freeclimb::SMSTenDLCCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + auto_renewal: true, + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true + ) + instance_2 = Freeclimb::SMSTenDLCCampaign.new( + account_id: "ST", + + campaign_id: "ST", + + csp_id: "ST", + + reseller_id: "ST", + + status: nil, + + auto_renewal: false, + + brand_id: "ST", + + usecase: "ST", + + sub_usecases: nil, + + description: "ST", + + embedded_link: false, + + embedded_phone: false, + + affiliate_marketing: false, + + number_pool: false, + + age_gated: false, + + direct_lending: false, + + subscriber_optin: false, + + subscriber_optout: false, + + subscriber_help: false, + + sample1: "ST", + + sample2: "ST", + + sample3: "ST", + + sample4: "ST", + + sample5: "ST", + + message_flow: "ST", + + help_message: "ST", + + optin_keywords: "ST", + + optout_keywords: "ST", + + help_keywords: "ST", + + optin_message: "ST", + + optout_message: "ST", + + reference_id: "ST", + + mock: false + ) + expect(instance_1.eql?(instance_2)).to eq(false) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::SMSTenDLCCampaign.new( - + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" ) - instance_2 = Freeclimb::SMSTenDLCCampaign.new( - + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - - mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - - ) - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) - end - end + mock: true, - describe 'test method "_deserialize"' do - instance = Freeclimb::SMSTenDLCCampaign.new( - + next_renewal_or_expiration_date: "2000-01-01" + ) + instance_2 = Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::SMSTenDLCCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + auto_renewal: true, + + billed_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true, + + next_renewal_or_expiration_date: "2000-01-01" ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of csp_id' do + + it "deserializes the data of csp_id" do expect(instance._deserialize("String", instance.csp_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of reseller_id' do + + it "deserializes the data of reseller_id" do expect(instance._deserialize("String", instance.reseller_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of create_date' do + + it "deserializes the data of create_date" do expect(instance._deserialize("Time", instance.create_date)).to be_a_kind_of(Time) end - - - - - it 'deserializes the data of auto_renewal' do + + it "deserializes the data of auto_renewal" do expect(instance._deserialize("Boolean", instance.auto_renewal)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of billed_date' do + it "deserializes the data of billed_date" do expect(instance._deserialize("Time", instance.billed_date)).to be_a_kind_of(Time) end - - - it 'deserializes the data of brand_id' do + + it "deserializes the data of brand_id" do expect(instance._deserialize("String", instance.brand_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of usecase' do + + it "deserializes the data of usecase" do expect(instance._deserialize("String", instance.usecase)).to be_a_kind_of(String) end - - - it 'deserializes the data of sub_usecases' do + + it "deserializes the data of sub_usecases" do expect(instance._deserialize("Array", instance.sub_usecases)).to be_a_kind_of(Array) end - - - it 'deserializes the data of description' do + + it "deserializes the data of description" do expect(instance._deserialize("String", instance.description)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of embedded_link' do + + it "deserializes the data of embedded_link" do expect(instance._deserialize("Boolean", instance.embedded_link)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of embedded_phone' do + + it "deserializes the data of embedded_phone" do expect(instance._deserialize("Boolean", instance.embedded_phone)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of affiliate_marketing' do + + it "deserializes the data of affiliate_marketing" do expect(instance._deserialize("Boolean", instance.affiliate_marketing)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of number_pool' do + + it "deserializes the data of number_pool" do expect(instance._deserialize("Boolean", instance.number_pool)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of age_gated' do + + it "deserializes the data of age_gated" do expect(instance._deserialize("Boolean", instance.age_gated)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of direct_lending' do + + it "deserializes the data of direct_lending" do expect(instance._deserialize("Boolean", instance.direct_lending)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_optin' do + + it "deserializes the data of subscriber_optin" do expect(instance._deserialize("Boolean", instance.subscriber_optin)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_optout' do + + it "deserializes the data of subscriber_optout" do expect(instance._deserialize("Boolean", instance.subscriber_optout)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_help' do + + it "deserializes the data of subscriber_help" do expect(instance._deserialize("Boolean", instance.subscriber_help)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of sample1' do + it "deserializes the data of sample1" do expect(instance._deserialize("String", instance.sample1)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample2' do + + it "deserializes the data of sample2" do expect(instance._deserialize("String", instance.sample2)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample3' do + + it "deserializes the data of sample3" do expect(instance._deserialize("String", instance.sample3)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample4' do + + it "deserializes the data of sample4" do expect(instance._deserialize("String", instance.sample4)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample5' do + + it "deserializes the data of sample5" do expect(instance._deserialize("String", instance.sample5)).to be_a_kind_of(String) end - - - it 'deserializes the data of message_flow' do + + it "deserializes the data of message_flow" do expect(instance._deserialize("String", instance.message_flow)).to be_a_kind_of(String) end - - - it 'deserializes the data of help_message' do + + it "deserializes the data of help_message" do expect(instance._deserialize("String", instance.help_message)).to be_a_kind_of(String) end - - - it 'deserializes the data of optin_keywords' do + + it "deserializes the data of optin_keywords" do expect(instance._deserialize("String", instance.optin_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of optout_keywords' do + + it "deserializes the data of optout_keywords" do expect(instance._deserialize("String", instance.optout_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of help_keywords' do + + it "deserializes the data of help_keywords" do expect(instance._deserialize("String", instance.help_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of optin_message' do + + it "deserializes the data of optin_message" do expect(instance._deserialize("String", instance.optin_message)).to be_a_kind_of(String) end - - - it 'deserializes the data of optout_message' do + + it "deserializes the data of optout_message" do expect(instance._deserialize("String", instance.optout_message)).to be_a_kind_of(String) end - - - it 'deserializes the data of reference_id' do + + it "deserializes the data of reference_id" do expect(instance._deserialize("String", instance.reference_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of mock' do + + it "deserializes the data of mock" do expect(instance._deserialize("Boolean", instance.mock)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of next_renewal_or_expiration_date' do + it "deserializes the data of next_renewal_or_expiration_date" do expect(instance._deserialize("Date", instance.next_renewal_or_expiration_date)).to be_a_kind_of(Date) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" ) instance_2 = Freeclimb::SMSTenDLCCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + csp_id: "TS", - - - - + reseller_id: "TS", - - - - + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - + auto_renewal: true, - - - - + billed_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - sub_usecases: Array.new(), - - - - + + sub_usecases: [], + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - + reference_id: "TS", - - - + mock: true, - - - - - next_renewal_or_expiration_date: "2000-01-01", - - + + next_renewal_or_expiration_date: "2000-01-01" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -3369,243 +1685,185 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCCampaign.new( - - account_id: "TS", - - - - campaign_id: "TS", - - - - csp_id: "TS", - - - - reseller_id: "TS", - - - - status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, - - - - create_date: "2022-07-05T15:17:05Z", - - auto_renewal: true, - - - - billed_date: "2022-07-05T15:17:05Z", - - - brand_id: "TS", - - - - usecase: "TS", - - - sub_usecases: Array.new(), - - - - description: "TS", - - - embedded_link: true, - - - embedded_phone: true, - - - affiliate_marketing: true, - - - number_pool: true, - - - age_gated: true, - - - direct_lending: true, - - - subscriber_optin: true, - - - subscriber_optout: true, - - - subscriber_help: true, - - - - sample1: "TS", - - - - sample2: "TS", - - - - sample3: "TS", - - - - sample4: "TS", - - - - sample5: "TS", - - - - message_flow: "TS", - - - - help_message: "TS", - - - - optin_keywords: "TS", - - - - optout_keywords: "TS", - - - - help_keywords: "TS", - - - - optin_message: "TS", - - - - optout_message: "TS", - - - - reference_id: "TS", - - - mock: true, - - - - next_renewal_or_expiration_date: "2000-01-01", - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + campaign_id: "TS", + + csp_id: "TS", + + reseller_id: "TS", + + status: Freeclimb::SMSTenDLCCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + auto_renewal: true, + + billed_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + sub_usecases: [], + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + reference_id: "TS", + + mock: true, + + next_renewal_or_expiration_date: "2000-01-01" + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns csp_id in the form of hash' do + it "returns csp_id in the form of hash" do expect(instance._to_hash(instance.csp_id)).to eq(instance.csp_id) end - it 'returns reseller_id in the form of hash' do + it "returns reseller_id in the form of hash" do expect(instance._to_hash(instance.reseller_id)).to eq(instance.reseller_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns create_date in the form of hash' do + it "returns create_date in the form of hash" do expect(instance._to_hash(instance.create_date)).to eq(instance.create_date) end - it 'returns auto_renewal in the form of hash' do + it "returns auto_renewal in the form of hash" do expect(instance._to_hash(instance.auto_renewal)).to eq(instance.auto_renewal) end - it 'returns billed_date in the form of hash' do + it "returns billed_date in the form of hash" do expect(instance._to_hash(instance.billed_date)).to eq(instance.billed_date) end - it 'returns brand_id in the form of hash' do + it "returns brand_id in the form of hash" do expect(instance._to_hash(instance.brand_id)).to eq(instance.brand_id) end - it 'returns usecase in the form of hash' do + it "returns usecase in the form of hash" do expect(instance._to_hash(instance.usecase)).to eq(instance.usecase) end - it 'returns sub_usecases in the form of hash' do + it "returns sub_usecases in the form of hash" do expect(instance._to_hash(instance.sub_usecases)).to eq(instance.sub_usecases) end - it 'returns description in the form of hash' do + it "returns description in the form of hash" do expect(instance._to_hash(instance.description)).to eq(instance.description) end - it 'returns embedded_link in the form of hash' do + it "returns embedded_link in the form of hash" do expect(instance._to_hash(instance.embedded_link)).to eq(instance.embedded_link) end - it 'returns embedded_phone in the form of hash' do + it "returns embedded_phone in the form of hash" do expect(instance._to_hash(instance.embedded_phone)).to eq(instance.embedded_phone) end - it 'returns affiliate_marketing in the form of hash' do + it "returns affiliate_marketing in the form of hash" do expect(instance._to_hash(instance.affiliate_marketing)).to eq(instance.affiliate_marketing) end - it 'returns number_pool in the form of hash' do + it "returns number_pool in the form of hash" do expect(instance._to_hash(instance.number_pool)).to eq(instance.number_pool) end - it 'returns age_gated in the form of hash' do + it "returns age_gated in the form of hash" do expect(instance._to_hash(instance.age_gated)).to eq(instance.age_gated) end - it 'returns direct_lending in the form of hash' do + it "returns direct_lending in the form of hash" do expect(instance._to_hash(instance.direct_lending)).to eq(instance.direct_lending) end - it 'returns subscriber_optin in the form of hash' do + it "returns subscriber_optin in the form of hash" do expect(instance._to_hash(instance.subscriber_optin)).to eq(instance.subscriber_optin) end - it 'returns subscriber_optout in the form of hash' do + it "returns subscriber_optout in the form of hash" do expect(instance._to_hash(instance.subscriber_optout)).to eq(instance.subscriber_optout) end - it 'returns subscriber_help in the form of hash' do + it "returns subscriber_help in the form of hash" do expect(instance._to_hash(instance.subscriber_help)).to eq(instance.subscriber_help) end - it 'returns sample1 in the form of hash' do + it "returns sample1 in the form of hash" do expect(instance._to_hash(instance.sample1)).to eq(instance.sample1) end - it 'returns sample2 in the form of hash' do + it "returns sample2 in the form of hash" do expect(instance._to_hash(instance.sample2)).to eq(instance.sample2) end - it 'returns sample3 in the form of hash' do + it "returns sample3 in the form of hash" do expect(instance._to_hash(instance.sample3)).to eq(instance.sample3) end - it 'returns sample4 in the form of hash' do + it "returns sample4 in the form of hash" do expect(instance._to_hash(instance.sample4)).to eq(instance.sample4) end - it 'returns sample5 in the form of hash' do + it "returns sample5 in the form of hash" do expect(instance._to_hash(instance.sample5)).to eq(instance.sample5) end - it 'returns message_flow in the form of hash' do + it "returns message_flow in the form of hash" do expect(instance._to_hash(instance.message_flow)).to eq(instance.message_flow) end - it 'returns help_message in the form of hash' do + it "returns help_message in the form of hash" do expect(instance._to_hash(instance.help_message)).to eq(instance.help_message) end - it 'returns optin_keywords in the form of hash' do + it "returns optin_keywords in the form of hash" do expect(instance._to_hash(instance.optin_keywords)).to eq(instance.optin_keywords) end - it 'returns optout_keywords in the form of hash' do + it "returns optout_keywords in the form of hash" do expect(instance._to_hash(instance.optout_keywords)).to eq(instance.optout_keywords) end - it 'returns help_keywords in the form of hash' do + it "returns help_keywords in the form of hash" do expect(instance._to_hash(instance.help_keywords)).to eq(instance.help_keywords) end - it 'returns optin_message in the form of hash' do + it "returns optin_message in the form of hash" do expect(instance._to_hash(instance.optin_message)).to eq(instance.optin_message) end - it 'returns optout_message in the form of hash' do + it "returns optout_message in the form of hash" do expect(instance._to_hash(instance.optout_message)).to eq(instance.optout_message) end - it 'returns reference_id in the form of hash' do + it "returns reference_id in the form of hash" do expect(instance._to_hash(instance.reference_id)).to eq(instance.reference_id) end - it 'returns mock in the form of hash' do + it "returns mock in the form of hash" do expect(instance._to_hash(instance.mock)).to eq(instance.mock) end - it 'returns next_renewal_or_expiration_date in the form of hash' do + it "returns next_renewal_or_expiration_date in the form of hash" do expect(instance._to_hash(instance.next_renewal_or_expiration_date)).to eq(instance.next_renewal_or_expiration_date) end end - end diff --git a/spec/models/sms_ten_dlc_campaign_status_spec.rb b/spec/models/sms_ten_dlc_campaign_status_spec.rb index 6ea61644..f773a7a3 100644 --- a/spec/models/sms_ten_dlc_campaign_status_spec.rb +++ b/spec/models/sms_ten_dlc_campaign_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCCampaignStatus @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCCampaignStatus do let(:instance) { Freeclimb::SMSTenDLCCampaignStatus.new } - describe 'test an instance of SMSTenDLCCampaignStatus' do - it 'should create an instance of SMSTenDLCCampaignStatus' do + describe "test an instance of SMSTenDLCCampaignStatus" do + it "should create an instance of SMSTenDLCCampaignStatus" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCCampaignStatus) end end - + describe 'test attribute "ACTIVE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCCampaignStatus::ACTIVE = "ACTIVE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCCampaignStatus::ACTIVE - calculatedValue = Freeclimb::SMSTenDLCCampaignStatus::build_from_hash("ACTIVE") + calculatedValue = Freeclimb::SMSTenDLCCampaignStatus.build_from_hash("ACTIVE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ACTIVE" calculatedValue = Freeclimb::SMSTenDLCCampaignStatus::ACTIVE expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "EXPIRED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCCampaignStatus::EXPIRED = "EXPIRED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCCampaignStatus::EXPIRED - calculatedValue = Freeclimb::SMSTenDLCCampaignStatus::build_from_hash("EXPIRED") + calculatedValue = Freeclimb::SMSTenDLCCampaignStatus.build_from_hash("EXPIRED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "EXPIRED" calculatedValue = Freeclimb::SMSTenDLCCampaignStatus::EXPIRED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb b/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb index c62dc019..6ffdd7f4 100644 --- a/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +++ b/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCCampaignsListResult @@ -21,541 +19,303 @@ describe Freeclimb::SMSTenDLCCampaignsListResult do let(:instance) { Freeclimb::SMSTenDLCCampaignsListResult.new } - describe 'test an instance of SMSTenDLCCampaignsListResult' do - it 'should create an instance of SMSTenDLCCampaignsListResult' do + describe "test an instance of SMSTenDLCCampaignsListResult" do + it "should create an instance of SMSTenDLCCampaignsListResult" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCCampaignsListResult) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "campaigns"' do - it 'should work' do - + it "should work" do instance.campaigns = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.campaigns).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.campaigns).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCCampaignsListResult' do - expect { instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCCampaignsListResult.new( + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - - ) - expect(instance.valid?).to eq(false) + campaigns: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCCampaignsListResult" do + expect { + Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + campaigns: [], - - ) - instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + campaigns: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTenDLCCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCCampaignsListResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] + ) + instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - campaigns: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - campaigns: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + campaigns: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaigns' do + + it "deserializes the data of campaigns" do expect(instance._deserialize("Array", instance.campaigns)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - campaigns: Array.new(), - - - + + campaigns: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - campaigns: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + campaigns: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns campaigns in the form of hash' do + it "returns campaigns in the form of hash" do expect(instance._to_hash(instance.campaigns)).to eq(instance.campaigns) end end - end diff --git a/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb b/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb index 431cf1c7..519e27de 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCPartnerCampaignBrand @@ -21,798 +19,412 @@ describe Freeclimb::SMSTenDLCPartnerCampaignBrand do let(:instance) { Freeclimb::SMSTenDLCPartnerCampaignBrand.new } - describe 'test an instance of SMSTenDLCPartnerCampaignBrand' do - it 'should create an instance of SMSTenDLCPartnerCampaignBrand' do + describe "test an instance of SMSTenDLCPartnerCampaignBrand" do + it "should create an instance of SMSTenDLCPartnerCampaignBrand" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCPartnerCampaignBrand) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "brand_id"' do - it 'should work' do - + it "should work" do instance.brand_id = "TEST_STRING" - expect(instance.brand_id).to eq("TEST_STRING") - - - + expect(instance.brand_id).to eq("TEST_STRING") end end describe 'test attribute "first_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.first_name = "T" * 100 - expect(instance.first_name).to eq("T" * 100) + expect(instance.first_name).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.first_name = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.first_name = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "last_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.last_name = "T" * 100 - expect(instance.last_name).to eq("T" * 100) + expect(instance.last_name).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.last_name = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.last_name = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "display_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.display_name = "T" * 255 - expect(instance.display_name).to eq("T" * 255) + expect(instance.display_name).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.display_name = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.display_name = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "company_name"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.company_name = "T" * 255 - expect(instance.company_name).to eq("T" * 255) + expect(instance.company_name).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.company_name = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.company_name = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "phone"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.phone = "T" * 20 - expect(instance.phone).to eq("T" * 20) + expect(instance.phone).to eq("T" * 20) end - it 'should not assign a value over maxLength' do - expect { instance.phone = "T" * (20 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.phone = "T" * (20 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "email"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.email = "T" * 100 - expect(instance.email).to eq("T" * 100) + expect(instance.email).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.email = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.email = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "website"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.website = "T" * 100 - expect(instance.website).to eq("T" * 100) + expect(instance.website).to eq("T" * 100) end - it 'should not assign a value over maxLength' do - expect { instance.website = "T" * (100 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.website = "T" * (100 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optional_attributes"' do - it 'should work' do - - testObject = Object.new() + it "should work" do + testObject = Object.new instance.optional_attributes = testObject expect(instance.optional_attributes).to eq(testObject) - - - end end describe 'test attribute "evp_vetting_score"' do - it 'should work' do - - + it "should work" do instance.evp_vetting_score = 1 expect(instance.evp_vetting_score).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaignBrand' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignBrand.new( account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + optional_attributes: {}, - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - ) - expect(instance.valid?).to eq(false) + evp_vetting_score: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaignBrand" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignBrand.new( account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - optional_attributes: Hash.new(), - - - + + optional_attributes: {}, + evp_vetting_score: 1, - - - - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignBrand.new( account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - optional_attributes: Hash.new(), - - - - - + + optional_attributes: {}, + evp_vetting_score: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 + ) + instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - optional_attributes: Hash.new(), - - - - evp_vetting_score: 2, - - - + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 2 ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "ST", - - - - - brand_id: "ST", - - - - - first_name: "ST", - - - - - last_name: "ST", - - - - - display_name: "ST", - - - - - company_name: "ST", - - - - - phone: "ST", - - - - - email: "ST", - - - - - website: "ST", - - - - - optional_attributes: Hash.new(), - - - - evp_vetting_score: 1, - - - + account_id: "ST", + + brand_id: "ST", + + first_name: "ST", + + last_name: "ST", + + display_name: "ST", + + company_name: "ST", + + phone: "ST", + + email: "ST", + + website: "ST", + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - - ) + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -821,364 +433,175 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - - brand_id: "TS", - - - - - first_name: "TS", - - - - - last_name: "TS", - - - - - display_name: "TS", - - - - - company_name: "TS", - - - - - phone: "TS", - - - - - email: "TS", - - - - - website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of brand_id' do + + it "deserializes the data of brand_id" do expect(instance._deserialize("String", instance.brand_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of first_name' do + + it "deserializes the data of first_name" do expect(instance._deserialize("String", instance.first_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of last_name' do + + it "deserializes the data of last_name" do expect(instance._deserialize("String", instance.last_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of display_name' do + + it "deserializes the data of display_name" do expect(instance._deserialize("String", instance.display_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of company_name' do + + it "deserializes the data of company_name" do expect(instance._deserialize("String", instance.company_name)).to be_a_kind_of(String) end - - - it 'deserializes the data of phone' do + + it "deserializes the data of phone" do expect(instance._deserialize("String", instance.phone)).to be_a_kind_of(String) end - - - it 'deserializes the data of email' do + + it "deserializes the data of email" do expect(instance._deserialize("String", instance.email)).to be_a_kind_of(String) end - - - it 'deserializes the data of website' do + + it "deserializes the data of website" do expect(instance._deserialize("String", instance.website)).to be_a_kind_of(String) end - - - - it 'deserializes the data of optional_attributes' do + + it "deserializes the data of optional_attributes" do expect(instance._deserialize("Hash", instance.optional_attributes)).to be_a_kind_of(Hash) end - - - it 'deserializes the data of evp_vetting_score' do + + it "deserializes the data of evp_vetting_score" do expect(instance._deserialize("Integer", instance.evp_vetting_score)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - account_id: "TS", - - - - + brand_id: "TS", - - - - + first_name: "TS", - - - - + last_name: "TS", - - - - + display_name: "TS", - - - - + company_name: "TS", - - - - + phone: "TS", - - - - + email: "TS", - - - - + website: "TS", - - - - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - - + + optional_attributes: {}, + + evp_vetting_score: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1186,81 +609,60 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( - - account_id: "TS", - - - - brand_id: "TS", - - - - first_name: "TS", - - - - last_name: "TS", - - - - display_name: "TS", - - - - company_name: "TS", - - - - phone: "TS", - - - - email: "TS", - - - - website: "TS", - - - optional_attributes: Hash.new(), - - - evp_vetting_score: 1, - - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + brand_id: "TS", + + first_name: "TS", + + last_name: "TS", + + display_name: "TS", + + company_name: "TS", + + phone: "TS", + + email: "TS", + + website: "TS", + + optional_attributes: {}, + + evp_vetting_score: 1 + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns brand_id in the form of hash' do + it "returns brand_id in the form of hash" do expect(instance._to_hash(instance.brand_id)).to eq(instance.brand_id) end - it 'returns first_name in the form of hash' do + it "returns first_name in the form of hash" do expect(instance._to_hash(instance.first_name)).to eq(instance.first_name) end - it 'returns last_name in the form of hash' do + it "returns last_name in the form of hash" do expect(instance._to_hash(instance.last_name)).to eq(instance.last_name) end - it 'returns display_name in the form of hash' do + it "returns display_name in the form of hash" do expect(instance._to_hash(instance.display_name)).to eq(instance.display_name) end - it 'returns company_name in the form of hash' do + it "returns company_name in the form of hash" do expect(instance._to_hash(instance.company_name)).to eq(instance.company_name) end - it 'returns phone in the form of hash' do + it "returns phone in the form of hash" do expect(instance._to_hash(instance.phone)).to eq(instance.phone) end - it 'returns email in the form of hash' do + it "returns email in the form of hash" do expect(instance._to_hash(instance.email)).to eq(instance.email) end - it 'returns website in the form of hash' do + it "returns website in the form of hash" do expect(instance._to_hash(instance.website)).to eq(instance.website) end - it 'returns optional_attributes in the form of hash' do + it "returns optional_attributes in the form of hash" do expect(instance._to_hash(instance.optional_attributes)).to eq(instance.optional_attributes) end - it 'returns evp_vetting_score in the form of hash' do + it "returns evp_vetting_score in the form of hash" do expect(instance._to_hash(instance.evp_vetting_score)).to eq(instance.evp_vetting_score) end end - end diff --git a/spec/models/sms_ten_dlc_partner_campaign_spec.rb b/spec/models/sms_ten_dlc_partner_campaign_spec.rb index 488ec831..1807925c 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCPartnerCampaign @@ -21,2761 +19,1380 @@ describe Freeclimb::SMSTenDLCPartnerCampaign do let(:instance) { Freeclimb::SMSTenDLCPartnerCampaign.new } - describe 'test an instance of SMSTenDLCPartnerCampaign' do - it 'should create an instance of SMSTenDLCPartnerCampaign' do + describe "test an instance of SMSTenDLCPartnerCampaign" do + it "should create an instance of SMSTenDLCPartnerCampaign" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCPartnerCampaign) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end - describe 'test attribute "status"' do - it 'assigns value ACTIVE' do + it "assigns value ACTIVE" do instance.status = Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE - expect(instance.status).to eq(Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE) + expect(instance.status).to eq(Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE) end - it 'assigns value EXPIRED' do + it "assigns value EXPIRED" do instance.status = Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED - expect(instance.status).to eq(Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED) + expect(instance.status).to eq(Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED) end end describe 'test attribute "create_date"' do - it 'should work' do + it "should work" do instance.create_date = "2022-07-05T15:17:05Z" - expect(instance.create_date).to eq("2022-07-05T15:17:05Z") - - - + expect(instance.create_date).to eq("2022-07-05T15:17:05Z") end end describe 'test attribute "brand_id"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.brand_id = "T" * 8 - expect(instance.brand_id).to eq("T" * 8) + expect(instance.brand_id).to eq("T" * 8) end - it 'should not assign a value over maxLength' do - expect { instance.brand_id = "T" * (8 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.brand_id = "T" * (8 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "usecase"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.usecase = "T" * 20 - expect(instance.usecase).to eq("T" * 20) + expect(instance.usecase).to eq("T" * 20) end - it 'should not assign a value over maxLength' do - expect { instance.usecase = "T" * (20 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.usecase = "T" * (20 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "description"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.description = "T" * 4096 - expect(instance.description).to eq("T" * 4096) + expect(instance.description).to eq("T" * 4096) end - it 'should not assign a value over maxLength' do - expect { instance.description = "T" * (4096 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.description = "T" * (4096 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "embedded_link"' do - it 'should work' do + it "should work" do instance.embedded_link = false - expect(instance.embedded_link).to eq(false) - - - + expect(instance.embedded_link).to eq(false) end end describe 'test attribute "embedded_phone"' do - it 'should work' do + it "should work" do instance.embedded_phone = false - expect(instance.embedded_phone).to eq(false) - - - + expect(instance.embedded_phone).to eq(false) end end describe 'test attribute "affiliate_marketing"' do - it 'should work' do + it "should work" do instance.affiliate_marketing = false - expect(instance.affiliate_marketing).to eq(false) - - - + expect(instance.affiliate_marketing).to eq(false) end end describe 'test attribute "number_pool"' do - it 'should work' do + it "should work" do instance.number_pool = false - expect(instance.number_pool).to eq(false) - - - + expect(instance.number_pool).to eq(false) end end describe 'test attribute "age_gated"' do - it 'should work' do + it "should work" do instance.age_gated = false - expect(instance.age_gated).to eq(false) - - - + expect(instance.age_gated).to eq(false) end end describe 'test attribute "direct_lending"' do - it 'should work' do + it "should work" do instance.direct_lending = false - expect(instance.direct_lending).to eq(false) - - - + expect(instance.direct_lending).to eq(false) end end describe 'test attribute "subscriber_optin"' do - it 'should work' do + it "should work" do instance.subscriber_optin = false - expect(instance.subscriber_optin).to eq(false) - - - + expect(instance.subscriber_optin).to eq(false) end end describe 'test attribute "subscriber_optout"' do - it 'should work' do + it "should work" do instance.subscriber_optout = false - expect(instance.subscriber_optout).to eq(false) - - - + expect(instance.subscriber_optout).to eq(false) end end describe 'test attribute "subscriber_help"' do - it 'should work' do + it "should work" do instance.subscriber_help = false - expect(instance.subscriber_help).to eq(false) - - - + expect(instance.subscriber_help).to eq(false) end end describe 'test attribute "sample1"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample1 = "T" * 1024 - expect(instance.sample1).to eq("T" * 1024) + expect(instance.sample1).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample1 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample1 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample2"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample2 = "T" * 1024 - expect(instance.sample2).to eq("T" * 1024) + expect(instance.sample2).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample2 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample2 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample3"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample3 = "T" * 1024 - expect(instance.sample3).to eq("T" * 1024) + expect(instance.sample3).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample3 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample3 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample4"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample4 = "T" * 1024 - expect(instance.sample4).to eq("T" * 1024) + expect(instance.sample4).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample4 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample4 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "sample5"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.sample5 = "T" * 1024 - expect(instance.sample5).to eq("T" * 1024) + expect(instance.sample5).to eq("T" * 1024) end - it 'should not assign a value over maxLength' do - expect { instance.sample5 = "T" * (1024 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.sample5 = "T" * (1024 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "message_flow"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.message_flow = "T" * 2048 - expect(instance.message_flow).to eq("T" * 2048) + expect(instance.message_flow).to eq("T" * 2048) end - it 'should not assign a value over maxLength' do - expect { instance.message_flow = "T" * (2048 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.message_flow = "T" * (2048 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "help_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.help_message = "T" * 255 - expect(instance.help_message).to eq("T" * 255) + expect(instance.help_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.help_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.help_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optin_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optin_keywords = "T" * 255 - expect(instance.optin_keywords).to eq("T" * 255) + expect(instance.optin_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optin_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optin_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optout_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optout_keywords = "T" * 255 - expect(instance.optout_keywords).to eq("T" * 255) + expect(instance.optout_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optout_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optout_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "help_keywords"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.help_keywords = "T" * 255 - expect(instance.help_keywords).to eq("T" * 255) + expect(instance.help_keywords).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.help_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.help_keywords = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optin_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optin_message = "T" * 255 - expect(instance.optin_message).to eq("T" * 255) + expect(instance.optin_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optin_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optin_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "optout_message"' do - it 'should assign a value of maxLength' do + it "should assign a value of maxLength" do instance.optout_message = "T" * 255 - expect(instance.optout_message).to eq("T" * 255) + expect(instance.optout_message).to eq("T" * 255) end - it 'should not assign a value over maxLength' do - expect { instance.optout_message = "T" * (255 + 1) }.to raise_error(ArgumentError) + it "should not assign a value over maxLength" do + expect { instance.optout_message = "T" * (255 + 1) }.to raise_error(ArgumentError) end end describe 'test attribute "brand"' do - it 'should work' do - - - + it "should work" do instance.brand = SMSTenDLCPartnerCampaignBrand.new expect(instance.brand).to be_instance_of(SMSTenDLCPartnerCampaignBrand) - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaign' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new, - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - - ) - expect(instance.valid?).to eq(true) - end + optout_message: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - ) - expect(instance.valid?).to eq(false) + brand: SMSTenDLCPartnerCampaignBrand.new + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - obj_SMSTenDLCPartnerCampaignBrand = SMSTenDLCPartnerCampaignBrand.new() - - instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - brand: obj_SMSTenDLCPartnerCampaignBrand, - - - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaign" do + expect { + Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - + + create_date: "2022-07-05T15:17:05Z", + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - brand: obj_SMSTenDLCPartnerCampaignBrand, - - - ) - expect(instance_1.eql?(instance_2)).to eq(true) + + brand: SMSTenDLCPartnerCampaignBrand.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - + + create_date: "2022-07-05T15:17:05Z", + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - - - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "ST", - - - - - campaign_id: "ST", - - - - - - - status: nil, - - - - - - brand_id: "ST", - - - - - usecase: "ST", - - - - - description: "ST", - - - - embedded_link: false, - - - - embedded_phone: false, - - - - affiliate_marketing: false, - - - - number_pool: false, - - - - age_gated: false, - - - - direct_lending: false, - - - - subscriber_optin: false, - - - - subscriber_optout: false, - - - - subscriber_help: false, - - - - - sample1: "ST", - - - - - sample2: "ST", - - - - - sample3: "ST", - - - - - sample4: "ST", - - - - - sample5: "ST", - - - - - message_flow: "ST", - - - - - help_message: "ST", - - - - - optin_keywords: "ST", - - - - - optout_keywords: "ST", - - - - - help_keywords: "ST", - - - - - optin_message: "ST", - - - - - optout_message: "ST", - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) + + brand: SMSTenDLCPartnerCampaignBrand.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - - describe 'test method "hash"' do - it 'calculates hash code' do + + describe 'test method "valid"' do + it "checks if properties are valid" do instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - - ) + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: SMSTenDLCPartnerCampaignBrand.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCPartnerCampaign.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_SMSTenDLCPartnerCampaignBrand = SMSTenDLCPartnerCampaignBrand.new + + instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: obj_SMSTenDLCPartnerCampaignBrand + ) + instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: obj_SMSTenDLCPartnerCampaignBrand + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: SMSTenDLCPartnerCampaignBrand.new + ) + instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "ST", + + campaign_id: "ST", + + status: nil, + + brand_id: "ST", + + usecase: "ST", + + description: "ST", + + embedded_link: false, + + embedded_phone: false, + + affiliate_marketing: false, + + number_pool: false, + + age_gated: false, + + direct_lending: false, + + subscriber_optin: false, + + subscriber_optout: false, + + subscriber_help: false, + + sample1: "ST", + + sample2: "ST", + + sample3: "ST", + + sample4: "ST", + + sample5: "ST", + + message_flow: "ST", + + help_message: "ST", + + optin_keywords: "ST", + + optout_keywords: "ST", + + help_keywords: "ST", + + optin_message: "ST", + + optout_message: "ST", + + brand: SMSTenDLCPartnerCampaignBrand.new + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: SMSTenDLCPartnerCampaignBrand.new + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - + + brand: SMSTenDLCPartnerCampaignBrand.new ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - + + brand: SMSTenDLCPartnerCampaignBrand.new ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) end end - describe 'test method "_deserialize"' do - instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - - create_date: "2022-07-05T15:17:05Z", - - - - brand_id: "TS", - - - - - usecase: "TS", - - - - - description: "TS", - - - - embedded_link: true, - - - - embedded_phone: true, - - - - affiliate_marketing: true, - - - - number_pool: true, - - - - age_gated: true, - - - - direct_lending: true, - - - - subscriber_optin: true, - - - - subscriber_optout: true, - - - - subscriber_help: true, - - - - - sample1: "TS", - - - - - sample2: "TS", - - - - - sample3: "TS", - - - - - sample4: "TS", - - - - - sample5: "TS", - - - - - message_flow: "TS", - - - - - help_message: "TS", - - - - - optin_keywords: "TS", - - - - - optout_keywords: "TS", - - - - - help_keywords: "TS", - - - - - optin_message: "TS", - - - - - optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new(), - + describe 'test method "_deserialize"' do + instance = Freeclimb::SMSTenDLCPartnerCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS", + + brand: SMSTenDLCPartnerCampaignBrand.new ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of create_date' do + + it "deserializes the data of create_date" do expect(instance._deserialize("Time", instance.create_date)).to be_a_kind_of(Time) end - - - it 'deserializes the data of brand_id' do + + it "deserializes the data of brand_id" do expect(instance._deserialize("String", instance.brand_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of usecase' do + + it "deserializes the data of usecase" do expect(instance._deserialize("String", instance.usecase)).to be_a_kind_of(String) end - - - it 'deserializes the data of description' do + + it "deserializes the data of description" do expect(instance._deserialize("String", instance.description)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of embedded_link' do + + it "deserializes the data of embedded_link" do expect(instance._deserialize("Boolean", instance.embedded_link)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of embedded_phone' do + + it "deserializes the data of embedded_phone" do expect(instance._deserialize("Boolean", instance.embedded_phone)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of affiliate_marketing' do + + it "deserializes the data of affiliate_marketing" do expect(instance._deserialize("Boolean", instance.affiliate_marketing)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of number_pool' do + + it "deserializes the data of number_pool" do expect(instance._deserialize("Boolean", instance.number_pool)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of age_gated' do + + it "deserializes the data of age_gated" do expect(instance._deserialize("Boolean", instance.age_gated)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of direct_lending' do + + it "deserializes the data of direct_lending" do expect(instance._deserialize("Boolean", instance.direct_lending)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_optin' do + + it "deserializes the data of subscriber_optin" do expect(instance._deserialize("Boolean", instance.subscriber_optin)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_optout' do + + it "deserializes the data of subscriber_optout" do expect(instance._deserialize("Boolean", instance.subscriber_optout)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of subscriber_help' do + + it "deserializes the data of subscriber_help" do expect(instance._deserialize("Boolean", instance.subscriber_help)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of sample1' do + it "deserializes the data of sample1" do expect(instance._deserialize("String", instance.sample1)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample2' do + + it "deserializes the data of sample2" do expect(instance._deserialize("String", instance.sample2)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample3' do + + it "deserializes the data of sample3" do expect(instance._deserialize("String", instance.sample3)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample4' do + + it "deserializes the data of sample4" do expect(instance._deserialize("String", instance.sample4)).to be_a_kind_of(String) end - - - it 'deserializes the data of sample5' do + + it "deserializes the data of sample5" do expect(instance._deserialize("String", instance.sample5)).to be_a_kind_of(String) end - - - it 'deserializes the data of message_flow' do + + it "deserializes the data of message_flow" do expect(instance._deserialize("String", instance.message_flow)).to be_a_kind_of(String) end - - - it 'deserializes the data of help_message' do + + it "deserializes the data of help_message" do expect(instance._deserialize("String", instance.help_message)).to be_a_kind_of(String) end - - - it 'deserializes the data of optin_keywords' do + + it "deserializes the data of optin_keywords" do expect(instance._deserialize("String", instance.optin_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of optout_keywords' do + + it "deserializes the data of optout_keywords" do expect(instance._deserialize("String", instance.optout_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of help_keywords' do + + it "deserializes the data of help_keywords" do expect(instance._deserialize("String", instance.help_keywords)).to be_a_kind_of(String) end - - - it 'deserializes the data of optin_message' do + + it "deserializes the data of optin_message" do expect(instance._deserialize("String", instance.optin_message)).to be_a_kind_of(String) end - - - it 'deserializes the data of optout_message' do + + it "deserializes the data of optout_message" do expect(instance._deserialize("String", instance.optout_message)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of brand' do + + it "deserializes the data of brand" do expect(instance._deserialize("Object", instance.brand)).to be_a_kind_of(SMSTenDLCPartnerCampaignBrand) end - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new, - + + brand: SMSTenDLCPartnerCampaignBrand.new ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: SMSTenDLCPartnerCampaignBrand.new, - + + brand: SMSTenDLCPartnerCampaignBrand.new ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - obj = SMSTenDLCPartnerCampaignBrand.new() - + it "creates equal hash for two equal objects" do + obj = SMSTenDLCPartnerCampaignBrand.new + instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: obj, - + + brand: obj ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - + create_date: "2022-07-05T15:17:05Z", - - - + brand_id: "TS", - - - - + usecase: "TS", - - - - + description: "TS", - - - + embedded_link: true, - - - + embedded_phone: true, - - - + affiliate_marketing: true, - - - + number_pool: true, - - - + age_gated: true, - - - + direct_lending: true, - - - + subscriber_optin: true, - - - + subscriber_optout: true, - - - + subscriber_help: true, - - - - + sample1: "TS", - - - - + sample2: "TS", - - - - + sample3: "TS", - - - - + sample4: "TS", - - - - + sample5: "TS", - - - - + message_flow: "TS", - - - - + help_message: "TS", - - - - + optin_keywords: "TS", - - - - + optout_keywords: "TS", - - - - + help_keywords: "TS", - - - - + optin_message: "TS", - - - - + optout_message: "TS", - - - - - - - brand: obj, - + + brand: obj ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -2783,197 +1400,148 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCPartnerCampaign.new( - - account_id: "TS", - - - - campaign_id: "TS", - - - - status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, - - - - create_date: "2022-07-05T15:17:05Z", - - - brand_id: "TS", - - - - usecase: "TS", - - - - description: "TS", - - - embedded_link: true, - - - embedded_phone: true, - - - affiliate_marketing: true, - - - number_pool: true, - - - age_gated: true, - - - direct_lending: true, - - - subscriber_optin: true, - - - subscriber_optout: true, - - - subscriber_help: true, - - - - sample1: "TS", - - - - sample2: "TS", - - - - sample3: "TS", - - - - sample4: "TS", - - - - sample5: "TS", - - - - message_flow: "TS", - - - - help_message: "TS", - - - - optin_keywords: "TS", - - - - optout_keywords: "TS", - - - - help_keywords: "TS", - - - - optin_message: "TS", - - - - optout_message: "TS", - - - - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + campaign_id: "TS", + + status: Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE, + + create_date: "2022-07-05T15:17:05Z", + + brand_id: "TS", + + usecase: "TS", + + description: "TS", + + embedded_link: true, + + embedded_phone: true, + + affiliate_marketing: true, + + number_pool: true, + + age_gated: true, + + direct_lending: true, + + subscriber_optin: true, + + subscriber_optout: true, + + subscriber_help: true, + + sample1: "TS", + + sample2: "TS", + + sample3: "TS", + + sample4: "TS", + + sample5: "TS", + + message_flow: "TS", + + help_message: "TS", + + optin_keywords: "TS", + + optout_keywords: "TS", + + help_keywords: "TS", + + optin_message: "TS", + + optout_message: "TS" + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end - it 'returns create_date in the form of hash' do + it "returns create_date in the form of hash" do expect(instance._to_hash(instance.create_date)).to eq(instance.create_date) end - it 'returns brand_id in the form of hash' do + it "returns brand_id in the form of hash" do expect(instance._to_hash(instance.brand_id)).to eq(instance.brand_id) end - it 'returns usecase in the form of hash' do + it "returns usecase in the form of hash" do expect(instance._to_hash(instance.usecase)).to eq(instance.usecase) end - it 'returns description in the form of hash' do + it "returns description in the form of hash" do expect(instance._to_hash(instance.description)).to eq(instance.description) end - it 'returns embedded_link in the form of hash' do + it "returns embedded_link in the form of hash" do expect(instance._to_hash(instance.embedded_link)).to eq(instance.embedded_link) end - it 'returns embedded_phone in the form of hash' do + it "returns embedded_phone in the form of hash" do expect(instance._to_hash(instance.embedded_phone)).to eq(instance.embedded_phone) end - it 'returns affiliate_marketing in the form of hash' do + it "returns affiliate_marketing in the form of hash" do expect(instance._to_hash(instance.affiliate_marketing)).to eq(instance.affiliate_marketing) end - it 'returns number_pool in the form of hash' do + it "returns number_pool in the form of hash" do expect(instance._to_hash(instance.number_pool)).to eq(instance.number_pool) end - it 'returns age_gated in the form of hash' do + it "returns age_gated in the form of hash" do expect(instance._to_hash(instance.age_gated)).to eq(instance.age_gated) end - it 'returns direct_lending in the form of hash' do + it "returns direct_lending in the form of hash" do expect(instance._to_hash(instance.direct_lending)).to eq(instance.direct_lending) end - it 'returns subscriber_optin in the form of hash' do + it "returns subscriber_optin in the form of hash" do expect(instance._to_hash(instance.subscriber_optin)).to eq(instance.subscriber_optin) end - it 'returns subscriber_optout in the form of hash' do + it "returns subscriber_optout in the form of hash" do expect(instance._to_hash(instance.subscriber_optout)).to eq(instance.subscriber_optout) end - it 'returns subscriber_help in the form of hash' do + it "returns subscriber_help in the form of hash" do expect(instance._to_hash(instance.subscriber_help)).to eq(instance.subscriber_help) end - it 'returns sample1 in the form of hash' do + it "returns sample1 in the form of hash" do expect(instance._to_hash(instance.sample1)).to eq(instance.sample1) end - it 'returns sample2 in the form of hash' do + it "returns sample2 in the form of hash" do expect(instance._to_hash(instance.sample2)).to eq(instance.sample2) end - it 'returns sample3 in the form of hash' do + it "returns sample3 in the form of hash" do expect(instance._to_hash(instance.sample3)).to eq(instance.sample3) end - it 'returns sample4 in the form of hash' do + it "returns sample4 in the form of hash" do expect(instance._to_hash(instance.sample4)).to eq(instance.sample4) end - it 'returns sample5 in the form of hash' do + it "returns sample5 in the form of hash" do expect(instance._to_hash(instance.sample5)).to eq(instance.sample5) end - it 'returns message_flow in the form of hash' do + it "returns message_flow in the form of hash" do expect(instance._to_hash(instance.message_flow)).to eq(instance.message_flow) end - it 'returns help_message in the form of hash' do + it "returns help_message in the form of hash" do expect(instance._to_hash(instance.help_message)).to eq(instance.help_message) end - it 'returns optin_keywords in the form of hash' do + it "returns optin_keywords in the form of hash" do expect(instance._to_hash(instance.optin_keywords)).to eq(instance.optin_keywords) end - it 'returns optout_keywords in the form of hash' do + it "returns optout_keywords in the form of hash" do expect(instance._to_hash(instance.optout_keywords)).to eq(instance.optout_keywords) end - it 'returns help_keywords in the form of hash' do + it "returns help_keywords in the form of hash" do expect(instance._to_hash(instance.help_keywords)).to eq(instance.help_keywords) end - it 'returns optin_message in the form of hash' do + it "returns optin_message in the form of hash" do expect(instance._to_hash(instance.optin_message)).to eq(instance.optin_message) end - it 'returns optout_message in the form of hash' do + it "returns optout_message in the form of hash" do expect(instance._to_hash(instance.optout_message)).to eq(instance.optout_message) end - it 'returns brand in the form of hash' do + it "returns brand in the form of hash" do expect(instance._to_hash(instance.brand)).to eq(instance.brand) end end - end diff --git a/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb b/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb index 54aa7dbb..8b33ea79 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCPartnerCampaignStatus @@ -21,22 +19,22 @@ describe Freeclimb::SMSTenDLCPartnerCampaignStatus do let(:instance) { Freeclimb::SMSTenDLCPartnerCampaignStatus.new } - describe 'test an instance of SMSTenDLCPartnerCampaignStatus' do - it 'should create an instance of SMSTenDLCPartnerCampaignStatus' do + describe "test an instance of SMSTenDLCPartnerCampaignStatus" do + it "should create an instance of SMSTenDLCPartnerCampaignStatus" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCPartnerCampaignStatus) end end - + describe 'test attribute "ACTIVE"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE = "ACTIVE" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE - calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::build_from_hash("ACTIVE") + calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus.build_from_hash("ACTIVE") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "ACTIVE" calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::ACTIVE expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "EXPIRED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED = "EXPIRED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED - calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::build_from_hash("EXPIRED") + calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus.build_from_hash("EXPIRED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "EXPIRED" calculatedValue = Freeclimb::SMSTenDLCPartnerCampaignStatus::EXPIRED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb b/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb index 5b692691..444fa63c 100644 --- a/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTenDLCPartnerCampaignsListResult @@ -21,541 +19,303 @@ describe Freeclimb::SMSTenDLCPartnerCampaignsListResult do let(:instance) { Freeclimb::SMSTenDLCPartnerCampaignsListResult.new } - describe 'test an instance of SMSTenDLCPartnerCampaignsListResult' do - it 'should create an instance of SMSTenDLCPartnerCampaignsListResult' do + describe "test an instance of SMSTenDLCPartnerCampaignsListResult" do + it "should create an instance of SMSTenDLCPartnerCampaignsListResult" do expect(instance).to be_instance_of(Freeclimb::SMSTenDLCPartnerCampaignsListResult) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "partner_campaigns"' do - it 'should work' do - + it "should work" do instance.partner_campaigns = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.partner_campaigns).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.partner_campaigns).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaignsListResult' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( + it "properly initializes with values" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - - ) - expect(instance.valid?).to eq(false) + partner_campaigns: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTenDLCPartnerCampaignsListResult" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + partner_campaigns: [], - - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + partner_campaigns: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] + ) + instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - partner_campaigns: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + partner_campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - partner_campaigns: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + partner_campaigns: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of partner_campaigns' do + + it "deserializes the data of partner_campaigns" do expect(instance._deserialize("Array", instance.partner_campaigns)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - partner_campaigns: Array.new(), - - - + + partner_campaigns: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - partner_campaigns: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + partner_campaigns: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns partner_campaigns in the form of hash' do + it "returns partner_campaigns in the form of hash" do expect(instance._to_hash(instance.partner_campaigns)).to eq(instance.partner_campaigns) end end - end diff --git a/spec/models/sms_toll_free_campaign_registration_status_spec.rb b/spec/models/sms_toll_free_campaign_registration_status_spec.rb index 3577046a..9bf782a9 100644 --- a/spec/models/sms_toll_free_campaign_registration_status_spec.rb +++ b/spec/models/sms_toll_free_campaign_registration_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTollFreeCampaignRegistrationStatus @@ -21,22 +19,22 @@ describe Freeclimb::SMSTollFreeCampaignRegistrationStatus do let(:instance) { Freeclimb::SMSTollFreeCampaignRegistrationStatus.new } - describe 'test an instance of SMSTollFreeCampaignRegistrationStatus' do - it 'should create an instance of SMSTollFreeCampaignRegistrationStatus' do + describe "test an instance of SMSTollFreeCampaignRegistrationStatus" do + it "should create an instance of SMSTollFreeCampaignRegistrationStatus" do expect(instance).to be_instance_of(Freeclimb::SMSTollFreeCampaignRegistrationStatus) end end - + describe 'test attribute "UNREGISTERED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED = "UNREGISTERED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED - calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::build_from_hash("UNREGISTERED") + calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus.build_from_hash("UNREGISTERED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "UNREGISTERED" calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "INITIATED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED = "INITIATED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED - calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::build_from_hash("INITIATED") + calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus.build_from_hash("INITIATED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "INITIATED" calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "PENDING"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING = "PENDING" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING - calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::build_from_hash("PENDING") + calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus.build_from_hash("PENDING") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "PENDING" calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "DECLINED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED = "DECLINED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED - calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::build_from_hash("DECLINED") + calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus.build_from_hash("DECLINED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "DECLINED" calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED expect(expectedValue).to eq(calculatedValue) @@ -92,19 +90,18 @@ end describe 'test attribute "REGISTERED"' do - it 'should work' do + it "should work" do expect { Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED = "REGISTERED" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED - calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::build_from_hash("REGISTERED") + calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus.build_from_hash("REGISTERED") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "REGISTERED" calculatedValue = Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/sms_toll_free_campaign_spec.rb b/spec/models/sms_toll_free_campaign_spec.rb index db3b82f3..1b2baafd 100644 --- a/spec/models/sms_toll_free_campaign_spec.rb +++ b/spec/models/sms_toll_free_campaign_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTollFreeCampaign @@ -21,548 +19,289 @@ describe Freeclimb::SMSTollFreeCampaign do let(:instance) { Freeclimb::SMSTollFreeCampaign.new } - describe 'test an instance of SMSTollFreeCampaign' do - it 'should create an instance of SMSTollFreeCampaign' do + describe "test an instance of SMSTollFreeCampaign" do + it "should create an instance of SMSTollFreeCampaign" do expect(instance).to be_instance_of(Freeclimb::SMSTollFreeCampaign) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test attribute "use_case"' do - it 'should work' do - + it "should work" do instance.use_case = "TEST_STRING" - expect(instance.use_case).to eq("TEST_STRING") - - - + expect(instance.use_case).to eq("TEST_STRING") end end - describe 'test attribute "registration_status"' do - it 'assigns value UNREGISTERED' do + it "assigns value UNREGISTERED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED) end - it 'assigns value INITIATED' do + it "assigns value INITIATED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED) end - it 'assigns value PENDING' do + it "assigns value PENDING" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING) end - it 'assigns value DECLINED' do + it "assigns value DECLINED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED) end - it 'assigns value REGISTERED' do + it "assigns value REGISTERED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED) end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaign' do - expect { instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTollFreeCampaign.new( - + it "properly initializes with values" do + expect { + Freeclimb::SMSTollFreeCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + date_updated: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTollFreeCampaign.new( - - ) - expect(instance.valid?).to eq(false) + revision: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - instance_1 = Freeclimb::SMSTollFreeCampaign.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaign" do + expect { + Freeclimb::SMSTollFreeCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - + date_created: "TS", - - - - + date_updated: "TS", - - - + revision: 1, - - - - ) - instance_2 = Freeclimb::SMSTollFreeCampaign.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTollFreeCampaign.new( account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - + date_created: "TS", - - - - + date_updated: "TS", - - - - - + revision: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTollFreeCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTollFreeCampaign.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTollFreeCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) + instance_2 = Freeclimb::SMSTollFreeCampaign.new( + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 2, - - - + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 2 ) instance_2 = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "ST", - - - - - campaign_id: "ST", - - - - - use_case: "ST", - - - - - - - registration_status: nil, - - - date_created: "ST", - - - - - date_updated: "ST", - - - - revision: 1, - - - + account_id: "ST", + + campaign_id: "ST", + + use_case: "ST", + + registration_status: nil, + + date_created: "ST", + + date_updated: "ST", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - - ) + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -571,236 +310,115 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - - campaign_id: "TS", - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - revision: 1, - - - + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of use_case' do + + it "deserializes the data of use_case" do expect(instance._deserialize("String", instance.use_case)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - - - - + campaign_id: "TS", - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -808,54 +426,40 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTollFreeCampaign.new( - - account_id: "TS", - - - - campaign_id: "TS", - - - - use_case: "TS", - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - date_created: "TS", - - - - date_updated: "TS", - - - revision: 1, - - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + campaign_id: "TS", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + revision: 1 + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns use_case in the form of hash' do + it "returns use_case in the form of hash" do expect(instance._to_hash(instance.use_case)).to eq(instance.use_case) end - it 'returns registration_status in the form of hash' do + it "returns registration_status in the form of hash" do expect(instance._to_hash(instance.registration_status)).to eq(instance.registration_status) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end end - end diff --git a/spec/models/sms_toll_free_campaigns_list_result_spec.rb b/spec/models/sms_toll_free_campaigns_list_result_spec.rb index 2ce3eeb5..15ada0a9 100644 --- a/spec/models/sms_toll_free_campaigns_list_result_spec.rb +++ b/spec/models/sms_toll_free_campaigns_list_result_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::SMSTollFreeCampaignsListResult @@ -21,541 +19,303 @@ describe Freeclimb::SMSTollFreeCampaignsListResult do let(:instance) { Freeclimb::SMSTollFreeCampaignsListResult.new } - describe 'test an instance of SMSTollFreeCampaignsListResult' do - it 'should create an instance of SMSTollFreeCampaignsListResult' do + describe "test an instance of SMSTollFreeCampaignsListResult" do + it "should create an instance of SMSTollFreeCampaignsListResult" do expect(instance).to be_instance_of(Freeclimb::SMSTollFreeCampaignsListResult) end end - + describe 'test attribute "total"' do - it 'should work' do - - + it "should work" do instance.total = 1 expect(instance.total).to eq(1) - - - end end describe 'test attribute "start"' do - it 'should work' do - - + it "should work" do instance.start = 1 expect(instance.start).to eq(1) - - - end end describe 'test attribute "_end"' do - it 'should work' do - - + it "should work" do instance._end = 1 expect(instance._end).to eq(1) - - - end end describe 'test attribute "page"' do - it 'should work' do - - + it "should work" do instance.page = 1 expect(instance.page).to eq(1) - - - end end describe 'test attribute "num_pages"' do - it 'should work' do - - + it "should work" do instance.num_pages = 1 expect(instance.num_pages).to eq(1) - - - end end describe 'test attribute "page_size"' do - it 'should work' do - - + it "should work" do instance.page_size = 1 expect(instance.page_size).to eq(1) - - - end end describe 'test attribute "next_page_uri"' do - it 'should work' do - + it "should work" do instance.next_page_uri = "TEST_STRING" - expect(instance.next_page_uri).to eq("TEST_STRING") - - - + expect(instance.next_page_uri).to eq("TEST_STRING") end end describe 'test attribute "brands"' do - it 'should work' do - + it "should work" do instance.brands = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.brands).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.brands).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaignsListResult' do - expect { instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::SMSTollFreeCampaignsListResult.new( + it "properly initializes with values" do + expect { + Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - ) - expect(instance.valid?).to eq(true) - end + next_page_uri: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - - ) - expect(instance.valid?).to eq(false) + brands: [] + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( + it "fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaignsListResult" do + expect { + Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - - + brands: [], - - ) - instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( - - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - + next_page_uri: "TS", - - - - - + brands: [], - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::SMSTollFreeCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::SMSTollFreeCampaignsListResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 2, - - - - start: 2, - - - - _end: 2, - - - - page: 2, - - - - num_pages: 2, - - - - page_size: 2, - - - - - next_page_uri: "TS", - - - - - - brands: [], - + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + brands: [] ) instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "ST", - - - - - - brands: nil, - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + brands: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - - ) + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -564,240 +324,133 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - - start: 1, - - - - _end: 1, - - - - page: 1, - - - - num_pages: 1, - - - - page_size: 1, - - - - - next_page_uri: "TS", - - - - brands: Array.new(), - - - + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] ) - it 'deserializes the data of total' do + it "deserializes the data of total" do expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of start' do + + it "deserializes the data of start" do expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of _end' do + + it "deserializes the data of _end" do expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page' do + + it "deserializes the data of page" do expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of num_pages' do + + it "deserializes the data of num_pages" do expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of page_size' do + + it "deserializes the data of page_size" do expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of next_page_uri' do + + it "deserializes the data of next_page_uri" do expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) end - - - it 'deserializes the data of brands' do + + it "deserializes the data of brands" do expect(instance._deserialize("Array", instance.brands)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( total: 1, - - - + start: 1, - - - + _end: 1, - - - + page: 1, - - - + num_pages: 1, - - - + page_size: 1, - - - - + next_page_uri: "TS", - - - - brands: Array.new(), - - - + + brands: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -805,55 +458,45 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - - - start: 1, - - - _end: 1, - - - page: 1, - - - num_pages: 1, - - - page_size: 1, - - - - next_page_uri: "TS", - - - brands: Array.new(), - - ) - it 'returns total in the form of hash' do + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + brands: [] + ) + it "returns total in the form of hash" do expect(instance._to_hash(instance.total)).to eq(instance.total) end - it 'returns start in the form of hash' do + it "returns start in the form of hash" do expect(instance._to_hash(instance.start)).to eq(instance.start) end - it 'returns _end in the form of hash' do + it "returns _end in the form of hash" do expect(instance._to_hash(instance._end)).to eq(instance._end) end - it 'returns page in the form of hash' do + it "returns page in the form of hash" do expect(instance._to_hash(instance.page)).to eq(instance.page) end - it 'returns num_pages in the form of hash' do + it "returns num_pages in the form of hash" do expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) end - it 'returns page_size in the form of hash' do + it "returns page_size in the form of hash" do expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) end - it 'returns next_page_uri in the form of hash' do + it "returns next_page_uri in the form of hash" do expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) end - it 'returns brands in the form of hash' do + it "returns brands in the form of hash" do expect(instance._to_hash(instance.brands)).to eq(instance.brands) end end - end diff --git a/spec/models/start_record_call_spec.rb b/spec/models/start_record_call_spec.rb index 2e0a9caa..ff355fef 100644 --- a/spec/models/start_record_call_spec.rb +++ b/spec/models/start_record_call_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::StartRecordCall @@ -21,10 +19,9 @@ describe Freeclimb::StartRecordCall do let(:instance) { Freeclimb::StartRecordCall.new } - describe 'test an instance of StartRecordCall' do - it 'should create an instance of StartRecordCall' do + describe "test an instance of StartRecordCall" do + it "should create an instance of StartRecordCall" do expect(instance).to be_instance_of(Freeclimb::StartRecordCall) end end - end diff --git a/spec/models/terminate_conference_spec.rb b/spec/models/terminate_conference_spec.rb index 2858a5ac..935e6292 100644 --- a/spec/models/terminate_conference_spec.rb +++ b/spec/models/terminate_conference_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TerminateConference @@ -21,10 +19,9 @@ describe Freeclimb::TerminateConference do let(:instance) { Freeclimb::TerminateConference.new } - describe 'test an instance of TerminateConference' do - it 'should create an instance of TerminateConference' do + describe "test an instance of TerminateConference" do + it "should create an instance of TerminateConference" do expect(instance).to be_instance_of(Freeclimb::TerminateConference) end end - end diff --git a/spec/models/tfn_campaign_spec.rb b/spec/models/tfn_campaign_spec.rb index a830b127..72043689 100644 --- a/spec/models/tfn_campaign_spec.rb +++ b/spec/models/tfn_campaign_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TFNCampaign @@ -21,694 +19,347 @@ describe Freeclimb::TFNCampaign do let(:instance) { Freeclimb::TFNCampaign.new } - describe 'test an instance of TFNCampaign' do - it 'should create an instance of TFNCampaign' do + describe "test an instance of TFNCampaign" do + it "should create an instance of TFNCampaign" do expect(instance).to be_instance_of(Freeclimb::TFNCampaign) end end - + describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a" - expect(instance.campaign_id).to eq("cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a") - - - - + expect(instance.campaign_id).to eq("cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a") end end describe 'test attribute "use_case"' do - it 'should work' do - + it "should work" do instance.use_case = "TEST_STRING" - expect(instance.use_case).to eq("TEST_STRING") - - - + expect(instance.use_case).to eq("TEST_STRING") end end - describe 'test attribute "registration_status"' do - it 'assigns value UNREGISTERED' do + it "assigns value UNREGISTERED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED) end - it 'assigns value INITIATED' do + it "assigns value INITIATED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED) end - it 'assigns value PENDING' do + it "assigns value PENDING" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING) end - it 'assigns value DECLINED' do + it "assigns value DECLINED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED) end - it 'assigns value REGISTERED' do + it "assigns value REGISTERED" do instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED - expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED) + expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED) end end describe 'test attribute "date_created"' do - it 'should work' do - + it "should work" do instance.date_created = "TEST_STRING" - expect(instance.date_created).to eq("TEST_STRING") - - - + expect(instance.date_created).to eq("TEST_STRING") end end describe 'test attribute "date_updated"' do - it 'should work' do - + it "should work" do instance.date_updated = "TEST_STRING" - expect(instance.date_updated).to eq("TEST_STRING") - - - + expect(instance.date_updated).to eq("TEST_STRING") end end describe 'test attribute "date_created_iso"' do - it 'should work' do - + it "should work" do instance.date_created_iso = "TEST_STRING" - expect(instance.date_created_iso).to eq("TEST_STRING") - - - + expect(instance.date_created_iso).to eq("TEST_STRING") end end describe 'test attribute "date_updated_iso"' do - it 'should work' do - + it "should work" do instance.date_updated_iso = "TEST_STRING" - expect(instance.date_updated_iso).to eq("TEST_STRING") - - - + expect(instance.date_updated_iso).to eq("TEST_STRING") end end describe 'test attribute "revision"' do - it 'should work' do - - + it "should work" do instance.revision = 1 expect(instance.revision).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::TFNCampaign' do - expect { instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::TFNCampaign.new( - + it "properly initializes with values" do + expect { + Freeclimb::TFNCampaign.new( account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + date_updated_iso: "TS", - skip 'checks if properties are invalid' do - instance = Freeclimb::TFNCampaign.new( - - ) - expect(instance.valid?).to eq(false) + revision: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - instance_1 = Freeclimb::TFNCampaign.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::TFNCampaign" do + expect { + Freeclimb::TFNCampaign.new( account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - + revision: 1, - - - - ) - instance_2 = Freeclimb::TFNCampaign.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TFNCampaign.new( account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - - + revision: 1, - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::TFNCampaign.new( + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::TFNCampaign.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::TFNCampaign.new( + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 + ) + instance_2 = Freeclimb::TFNCampaign.new( + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 2, - - - + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 2 ) instance_2 = Freeclimb::TFNCampaign.new( - - account_id: "ST", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a1", - - - - - - use_case: "ST", - - - - - - - registration_status: nil, - - - date_created: "ST", - - - - - date_updated: "ST", - - - - - date_created_iso: "ST", - - - - - date_updated_iso: "ST", - - - - revision: 1, - - - + account_id: "ST", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a1", + + use_case: "ST", + + registration_status: nil, + + date_created: "ST", + + date_updated: "ST", + + date_created_iso: "ST", + + date_updated_iso: "ST", + + revision: 1 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - - ) + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -717,303 +368,143 @@ describe 'test method "_deserialize"' do instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - - use_case: "TS", - - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - - date_created: "TS", - - - - - date_updated: "TS", - - - - - date_created_iso: "TS", - - - - - date_updated_iso: "TS", - - - - revision: 1, - - - + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 ) - it 'deserializes the data of account_id' do + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of campaign_id' do + + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of use_case' do + + it "deserializes the data of use_case" do expect(instance._deserialize("String", instance.use_case)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of date_created' do + + it "deserializes the data of date_created" do expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated' do + + it "deserializes the data of date_updated" do expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_created_iso' do + + it "deserializes the data of date_created_iso" do expect(instance._deserialize("String", instance.date_created_iso)).to be_a_kind_of(String) end - - - it 'deserializes the data of date_updated_iso' do + + it "deserializes the data of date_updated_iso" do expect(instance._deserialize("String", instance.date_updated_iso)).to be_a_kind_of(String) end - - - it 'deserializes the data of revision' do + + it "deserializes the data of revision" do expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) instance_2 = Freeclimb::TFNCampaign.new( - account_id: "TS", - - - - + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - + use_case: "TS", - - - - + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - + date_created: "TS", - - - - + date_updated: "TS", - - - - + date_created_iso: "TS", - - - - + date_updated_iso: "TS", - - - - revision: 1, - - - + + revision: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -1021,69 +512,50 @@ describe 'test method "_to_hash"' do instance = Freeclimb::TFNCampaign.new( - - account_id: "TS", - - - - campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", - - - - - use_case: "TS", - - - - registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, - - - - date_created: "TS", - - - - date_updated: "TS", - - - - date_created_iso: "TS", - - - - date_updated_iso: "TS", - - - revision: 1, - - ) - it 'returns account_id in the form of hash' do + account_id: "TS", + + campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + + use_case: "TS", + + registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED, + + date_created: "TS", + + date_updated: "TS", + + date_created_iso: "TS", + + date_updated_iso: "TS", + + revision: 1 + ) + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns campaign_id in the form of hash' do + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end - it 'returns use_case in the form of hash' do + it "returns use_case in the form of hash" do expect(instance._to_hash(instance.use_case)).to eq(instance.use_case) end - it 'returns registration_status in the form of hash' do + it "returns registration_status in the form of hash" do expect(instance._to_hash(instance.registration_status)).to eq(instance.registration_status) end - it 'returns date_created in the form of hash' do + it "returns date_created in the form of hash" do expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) end - it 'returns date_updated in the form of hash' do + it "returns date_updated in the form of hash" do expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) end - it 'returns date_created_iso in the form of hash' do + it "returns date_created_iso in the form of hash" do expect(instance._to_hash(instance.date_created_iso)).to eq(instance.date_created_iso) end - it 'returns date_updated_iso in the form of hash' do + it "returns date_updated_iso in the form of hash" do expect(instance._to_hash(instance.date_updated_iso)).to eq(instance.date_updated_iso) end - it 'returns revision in the form of hash' do + it "returns revision in the form of hash" do expect(instance._to_hash(instance.revision)).to eq(instance.revision) end end - end diff --git a/spec/models/tfn_spec.rb b/spec/models/tfn_spec.rb index 21d1bd4a..aaa17d9e 100644 --- a/spec/models/tfn_spec.rb +++ b/spec/models/tfn_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TFN @@ -21,144 +19,100 @@ describe Freeclimb::TFN do let(:instance) { Freeclimb::TFN.new } - describe 'test an instance of TFN' do - it 'should create an instance of TFN' do + describe "test an instance of TFN" do + it "should create an instance of TFN" do expect(instance).to be_instance_of(Freeclimb::TFN) end end - + describe 'test attribute "campaign_id"' do - it 'should work' do - + it "should work" do instance.campaign_id = "TEST_STRING" - expect(instance.campaign_id).to eq("TEST_STRING") - - - + expect(instance.campaign_id).to eq("TEST_STRING") end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::TFN' do - expect { instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::TFN.new( + campaign_id: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::TFN" do + expect { + Freeclimb::TFN.new( + campaign_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TFN.new( + campaign_id: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::TFN.new - skip 'checks if properties are invalid' do - instance = Freeclimb::TFN.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) instance_2 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) instance_2 = Freeclimb::TFN.new( - - campaign_id: "ST", - - - + campaign_id: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - - ) + campaign_id: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) instance_2 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -167,58 +121,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) - it 'deserializes the data of campaign_id' do + it "deserializes the data of campaign_id" do expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) instance_2 = Freeclimb::TFN.new( - - campaign_id: "TS", - - - + campaign_id: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -226,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::TFN.new( - - campaign_id: "TS", - - ) - it 'returns campaign_id in the form of hash' do + campaign_id: "TS" + ) + it "returns campaign_id in the form of hash" do expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id) end end - end diff --git a/spec/models/transcribe_reason_spec.rb b/spec/models/transcribe_reason_spec.rb index 46bb0113..5038fc53 100644 --- a/spec/models/transcribe_reason_spec.rb +++ b/spec/models/transcribe_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TranscribeReason @@ -21,22 +19,22 @@ describe Freeclimb::TranscribeReason do let(:instance) { Freeclimb::TranscribeReason.new } - describe 'test an instance of TranscribeReason' do - it 'should create an instance of TranscribeReason' do + describe "test an instance of TranscribeReason" do + it "should create an instance of TranscribeReason" do expect(instance).to be_instance_of(Freeclimb::TranscribeReason) end end - + describe 'test attribute "INTERNAL_ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeReason::INTERNAL_ERROR = "internalError" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeReason::INTERNAL_ERROR - calculatedValue = Freeclimb::TranscribeReason::build_from_hash("internalError") + calculatedValue = Freeclimb::TranscribeReason.build_from_hash("internalError") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "internalError" calculatedValue = Freeclimb::TranscribeReason::INTERNAL_ERROR expect(expectedValue).to eq(calculatedValue) @@ -44,15 +42,15 @@ end describe 'test attribute "HANGUP"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeReason::HANGUP = "hangup" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeReason::HANGUP - calculatedValue = Freeclimb::TranscribeReason::build_from_hash("hangup") + calculatedValue = Freeclimb::TranscribeReason.build_from_hash("hangup") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "hangup" calculatedValue = Freeclimb::TranscribeReason::HANGUP expect(expectedValue).to eq(calculatedValue) @@ -60,15 +58,15 @@ end describe 'test attribute "MAX_LENGTH"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeReason::MAX_LENGTH = "maxLength" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeReason::MAX_LENGTH - calculatedValue = Freeclimb::TranscribeReason::build_from_hash("maxLength") + calculatedValue = Freeclimb::TranscribeReason.build_from_hash("maxLength") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "maxLength" calculatedValue = Freeclimb::TranscribeReason::MAX_LENGTH expect(expectedValue).to eq(calculatedValue) @@ -76,15 +74,15 @@ end describe 'test attribute "DIGIT"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeReason::DIGIT = "digit" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeReason::DIGIT - calculatedValue = Freeclimb::TranscribeReason::build_from_hash("digit") + calculatedValue = Freeclimb::TranscribeReason.build_from_hash("digit") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "digit" calculatedValue = Freeclimb::TranscribeReason::DIGIT expect(expectedValue).to eq(calculatedValue) @@ -92,19 +90,18 @@ end describe 'test attribute "NO_INPUT"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeReason::NO_INPUT = "noInput" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeReason::NO_INPUT - calculatedValue = Freeclimb::TranscribeReason::build_from_hash("noInput") + calculatedValue = Freeclimb::TranscribeReason.build_from_hash("noInput") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "noInput" calculatedValue = Freeclimb::TranscribeReason::NO_INPUT expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/transcribe_term_reason_spec.rb b/spec/models/transcribe_term_reason_spec.rb index 79ee45aa..1c1c7a59 100644 --- a/spec/models/transcribe_term_reason_spec.rb +++ b/spec/models/transcribe_term_reason_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TranscribeTermReason @@ -21,22 +19,22 @@ describe Freeclimb::TranscribeTermReason do let(:instance) { Freeclimb::TranscribeTermReason.new } - describe 'test an instance of TranscribeTermReason' do - it 'should create an instance of TranscribeTermReason' do + describe "test an instance of TranscribeTermReason" do + it "should create an instance of TranscribeTermReason" do expect(instance).to be_instance_of(Freeclimb::TranscribeTermReason) end end - + describe 'test attribute "ERROR"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeTermReason::ERROR = "error" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeTermReason::ERROR - calculatedValue = Freeclimb::TranscribeTermReason::build_from_hash("error") + calculatedValue = Freeclimb::TranscribeTermReason.build_from_hash("error") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "error" calculatedValue = Freeclimb::TranscribeTermReason::ERROR expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "COMPLETED"' do - it 'should work' do + it "should work" do expect { Freeclimb::TranscribeTermReason::COMPLETED = "completed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::TranscribeTermReason::COMPLETED - calculatedValue = Freeclimb::TranscribeTermReason::build_from_hash("completed") + calculatedValue = Freeclimb::TranscribeTermReason.build_from_hash("completed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "completed" calculatedValue = Freeclimb::TranscribeTermReason::COMPLETED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/transcribe_utterance_record_spec.rb b/spec/models/transcribe_utterance_record_spec.rb index 4ac5eab3..d93636bf 100644 --- a/spec/models/transcribe_utterance_record_spec.rb +++ b/spec/models/transcribe_utterance_record_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TranscribeUtteranceRecord @@ -21,246 +19,158 @@ describe Freeclimb::TranscribeUtteranceRecord do let(:instance) { Freeclimb::TranscribeUtteranceRecord.new } - describe 'test an instance of TranscribeUtteranceRecord' do - it 'should create an instance of TranscribeUtteranceRecord' do + describe "test an instance of TranscribeUtteranceRecord" do + it "should create an instance of TranscribeUtteranceRecord" do expect(instance).to be_instance_of(Freeclimb::TranscribeUtteranceRecord) end end - + describe 'test attribute "save_recording"' do - it 'should work' do + it "should work" do instance.save_recording = false - expect(instance.save_recording).to eq(false) - - - + expect(instance.save_recording).to eq(false) end end describe 'test attribute "max_length_sec"' do - it 'should work' do + it "should work" do instance.max_length_sec = 60 expect(instance.max_length_sec).to eq(60) - - - - - end end describe 'test attribute "rcrd_termination_silence_time_ms"' do - it 'should work' do + it "should work" do instance.rcrd_termination_silence_time_ms = 3000 expect(instance.rcrd_termination_silence_time_ms).to eq(3000) - - - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::TranscribeUtteranceRecord.new( + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtteranceRecord' do - expect { instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtteranceRecord" do + expect { + Freeclimb::TranscribeUtteranceRecord.new( + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TranscribeUtteranceRecord.new( + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::TranscribeUtteranceRecord.new - skip 'checks if properties are invalid' do - instance = Freeclimb::TranscribeUtteranceRecord.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 ) instance_2 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60 - 1, - - - - rcrd_termination_silence_time_ms: 3000 - 1, - - - + save_recording: true, + + max_length_sec: 60 - 1, + + rcrd_termination_silence_time_ms: 3000 - 1 ) instance_2 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: false, - - - - max_length_sec: 60 - 2, - - - - rcrd_termination_silence_time_ms: 3000 - 2, - - - + save_recording: false, + + max_length_sec: 60 - 2, + + rcrd_termination_silence_time_ms: 3000 - 2 ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - - ) + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) instance_2 = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -269,105 +179,63 @@ describe 'test method "_deserialize"' do instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - - max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 ) - - - it 'deserializes the data of save_recording' do + + it "deserializes the data of save_recording" do expect(instance._deserialize("Boolean", instance.save_recording)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of max_length_sec' do + it "deserializes the data of max_length_sec" do expect(instance._deserialize("Integer", instance.max_length_sec)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of rcrd_termination_silence_time_ms' do + + it "deserializes the data of rcrd_termination_silence_time_ms" do expect(instance._deserialize("Integer", instance.rcrd_termination_silence_time_ms)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) instance_2 = Freeclimb::TranscribeUtteranceRecord.new( save_recording: true, - - - + max_length_sec: 60, - - - - rcrd_termination_silence_time_ms: 3000, - - - + + rcrd_termination_silence_time_ms: 3000 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -375,24 +243,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - - - max_length_sec: 60, - - - rcrd_termination_silence_time_ms: 3000, - - ) - it 'returns save_recording in the form of hash' do + save_recording: true, + + max_length_sec: 60, + + rcrd_termination_silence_time_ms: 3000 + ) + it "returns save_recording in the form of hash" do expect(instance._to_hash(instance.save_recording)).to eq(instance.save_recording) end - it 'returns max_length_sec in the form of hash' do + it "returns max_length_sec in the form of hash" do expect(instance._to_hash(instance.max_length_sec)).to eq(instance.max_length_sec) end - it 'returns rcrd_termination_silence_time_ms in the form of hash' do + it "returns rcrd_termination_silence_time_ms in the form of hash" do expect(instance._to_hash(instance.rcrd_termination_silence_time_ms)).to eq(instance.rcrd_termination_silence_time_ms) end end - end diff --git a/spec/models/transcribe_utterance_spec.rb b/spec/models/transcribe_utterance_spec.rb index ec9b358a..c756eb22 100644 --- a/spec/models/transcribe_utterance_spec.rb +++ b/spec/models/transcribe_utterance_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TranscribeUtterance @@ -21,433 +19,247 @@ describe Freeclimb::TranscribeUtterance do let(:instance) { Freeclimb::TranscribeUtterance.new } - describe 'test an instance of TranscribeUtterance' do - it 'should create an instance of TranscribeUtterance' do + describe "test an instance of TranscribeUtterance" do + it "should create an instance of TranscribeUtterance" do expect(instance).to be_instance_of(Freeclimb::TranscribeUtterance) end end - + describe 'test attribute "action_url"' do - it 'should work' do - + it "should work" do instance.action_url = "TEST_STRING" - expect(instance.action_url).to eq("TEST_STRING") - - - + expect(instance.action_url).to eq("TEST_STRING") end end describe 'test attribute "play_beep"' do - it 'should work' do + it "should work" do instance.play_beep = false - expect(instance.play_beep).to eq(false) - - - + expect(instance.play_beep).to eq(false) end end describe 'test attribute "record"' do - it 'should work' do - - - + it "should work" do instance.record = TranscribeUtteranceRecord.new expect(instance.record).to be_instance_of(TranscribeUtteranceRecord) - end end describe 'test attribute "privacy_for_logging"' do - it 'should work' do + it "should work" do instance.privacy_for_logging = false - expect(instance.privacy_for_logging).to eq(false) - - - + expect(instance.privacy_for_logging).to eq(false) end end describe 'test attribute "privacy_for_recording"' do - it 'should work' do + it "should work" do instance.privacy_for_recording = false - expect(instance.privacy_for_recording).to eq(false) - - - + expect(instance.privacy_for_recording).to eq(false) end end describe 'test attribute "prompts"' do - it 'should work' do - + it "should work" do instance.prompts = ["ELEMENT_1", "ELEMENT_2"] - expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) - - + expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"]) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - prompts: Array.new(), - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::TranscribeUtterance.new( + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtterance' do - expect { instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new, - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - prompts: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtterance" do + expect { + Freeclimb::TranscribeUtterance.new( + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::TranscribeUtterance.new( - + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TranscribeUtterance.new( + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", - - - + play_beep: true, - - - - - - + record: TranscribeUtteranceRecord.new, - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::TranscribeUtterance.new - skip 'checks if properties are invalid' do - instance = Freeclimb::TranscribeUtterance.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - obj_TranscribeUtteranceRecord = TranscribeUtteranceRecord.new() - - - - + it "checks if objects are equal" do + obj_TranscribeUtteranceRecord = TranscribeUtteranceRecord.new + instance_1 = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - record: obj_TranscribeUtteranceRecord, - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - - prompts: [], - + action_url: "TS", + + play_beep: true, + + record: obj_TranscribeUtteranceRecord, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] ) instance_2 = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - record: obj_TranscribeUtteranceRecord, - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - - prompts: [], - + action_url: "TS", + + play_beep: true, + + record: obj_TranscribeUtteranceRecord, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - record: TranscribeUtteranceRecord.new(), - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - - prompts: [], - + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] ) instance_2 = Freeclimb::TranscribeUtterance.new( - - action_url: "ST", - - - - play_beep: false, - - - - - - record: TranscribeUtteranceRecord.new(), - - - privacy_for_logging: false, - - - - privacy_for_recording: false, - - - - - - prompts: nil, - + action_url: "ST", + + play_beep: false, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: false, + + privacy_for_recording: false, + + prompts: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - prompts: Array.new(), - - - - ) + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - + + record: TranscribeUtteranceRecord.new, + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) instance_2 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - + + record: TranscribeUtteranceRecord.new, + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -456,196 +268,106 @@ describe 'test method "_deserialize"' do instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - - play_beep: true, - - - - - - - record: TranscribeUtteranceRecord.new(), - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - prompts: Array.new(), - - - + action_url: "TS", + + play_beep: true, + + record: TranscribeUtteranceRecord.new, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] ) - it 'deserializes the data of action_url' do + it "deserializes the data of action_url" do expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of play_beep' do + + it "deserializes the data of play_beep" do expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of record' do + + it "deserializes the data of record" do expect(instance._deserialize("Object", instance.record)).to be_a_kind_of(TranscribeUtteranceRecord) end - - - - it 'deserializes the data of privacy_for_logging' do + + it "deserializes the data of privacy_for_logging" do expect(instance._deserialize("Boolean", instance.privacy_for_logging)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of privacy_for_recording' do + + it "deserializes the data of privacy_for_recording" do expect(instance._deserialize("Boolean", instance.privacy_for_recording)).to be_a_kind_of(TrueClass) end - it 'deserializes the data of prompts' do + it "deserializes the data of prompts" do expect(instance._deserialize("Array", instance.prompts)).to be_a_kind_of(Array) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - + record: TranscribeUtteranceRecord.new, - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - + record: TranscribeUtteranceRecord.new, - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - obj = TranscribeUtteranceRecord.new() - - - - + it "creates equal hash for two equal objects" do + obj = TranscribeUtteranceRecord.new + instance_1 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - + record: obj, - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) instance_2 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - - - + play_beep: true, - - - - - - + record: obj, - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - prompts: Array.new(), - - - + + prompts: [] ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -653,42 +375,33 @@ describe 'test method "_to_hash"' do instance = Freeclimb::TranscribeUtterance.new( - - action_url: "TS", - - - play_beep: true, - - - - - privacy_for_logging: true, - - - privacy_for_recording: true, - - - prompts: Array.new(), - - ) - it 'returns action_url in the form of hash' do + action_url: "TS", + + play_beep: true, + + privacy_for_logging: true, + + privacy_for_recording: true, + + prompts: [] + ) + it "returns action_url in the form of hash" do expect(instance._to_hash(instance.action_url)).to eq(instance.action_url) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns record in the form of hash' do + it "returns record in the form of hash" do expect(instance._to_hash(instance.record)).to eq(instance.record) end - it 'returns privacy_for_logging in the form of hash' do + it "returns privacy_for_logging in the form of hash" do expect(instance._to_hash(instance.privacy_for_logging)).to eq(instance.privacy_for_logging) end - it 'returns privacy_for_recording in the form of hash' do + it "returns privacy_for_recording in the form of hash" do expect(instance._to_hash(instance.privacy_for_recording)).to eq(instance.privacy_for_recording) end - it 'returns prompts in the form of hash' do + it "returns prompts in the form of hash" do expect(instance._to_hash(instance.prompts)).to eq(instance.prompts) end end - end diff --git a/spec/models/transcribe_webhook_spec.rb b/spec/models/transcribe_webhook_spec.rb index 09f535bc..cff7f858 100644 --- a/spec/models/transcribe_webhook_spec.rb +++ b/spec/models/transcribe_webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::TranscribeWebhook @@ -21,2239 +19,1110 @@ describe Freeclimb::TranscribeWebhook do let(:instance) { Freeclimb::TranscribeWebhook.new } - describe 'test an instance of TranscribeWebhook' do - it 'should create an instance of TranscribeWebhook' do + describe "test an instance of TranscribeWebhook" do + it "should create an instance of TranscribeWebhook" do expect(instance).to be_instance_of(Freeclimb::TranscribeWebhook) end end - describe '.deserialize' do - it 'deserializes a json payload into instance of TranscribeWebhook' do + describe ".deserialize" do + it "deserializes a json payload into instance of TranscribeWebhook" do payload = '{ "requestType": "transcribe" }' expect(Freeclimb::TranscribeWebhook.deserialize(payload)).to be_instance_of(Freeclimb::TranscribeWebhook) end end - + describe 'test attribute "request_type"' do - it 'should work' do - + it "should work" do instance.request_type = "TEST_STRING" - expect(instance.request_type).to eq("TEST_STRING") - - - + expect(instance.request_type).to eq("TEST_STRING") end end describe 'test attribute "account_id"' do - it 'should work' do - + it "should work" do instance.account_id = "TEST_STRING" - expect(instance.account_id).to eq("TEST_STRING") - - - + expect(instance.account_id).to eq("TEST_STRING") end end describe 'test attribute "call_id"' do - it 'should work' do - + it "should work" do instance.call_id = "TEST_STRING" - expect(instance.call_id).to eq("TEST_STRING") - - - + expect(instance.call_id).to eq("TEST_STRING") end end describe 'test attribute "from"' do - it 'should work' do - + it "should work" do instance.from = "TEST_STRING" - expect(instance.from).to eq("TEST_STRING") - - - + expect(instance.from).to eq("TEST_STRING") end end describe 'test attribute "to"' do - it 'should work' do - + it "should work" do instance.to = "TEST_STRING" - expect(instance.to).to eq("TEST_STRING") - - - + expect(instance.to).to eq("TEST_STRING") end end describe 'test attribute "recording_id"' do - it 'should work' do - + it "should work" do instance.recording_id = "TEST_STRING" - expect(instance.recording_id).to eq("TEST_STRING") - - - + expect(instance.recording_id).to eq("TEST_STRING") end end describe 'test attribute "recording_url"' do - it 'should work' do - + it "should work" do instance.recording_url = "TEST_STRING" - expect(instance.recording_url).to eq("TEST_STRING") - - - + expect(instance.recording_url).to eq("TEST_STRING") end end describe 'test attribute "recording_size"' do - it 'should work' do - - + it "should work" do instance.recording_size = 1 expect(instance.recording_size).to eq(1) - - - end end describe 'test attribute "recording_format"' do - it 'should work' do - + it "should work" do instance.recording_format = "TEST_STRING" - expect(instance.recording_format).to eq("TEST_STRING") - - - + expect(instance.recording_format).to eq("TEST_STRING") end end describe 'test attribute "recording_duration_ms"' do - it 'should work' do - - + it "should work" do instance.recording_duration_ms = 1 expect(instance.recording_duration_ms).to eq(1) - - - end end - describe 'test attribute "term_reason"' do - it 'assigns value ERROR' do + it "assigns value ERROR" do instance.term_reason = Freeclimb::TranscribeTermReason::ERROR - expect(instance.term_reason).to eq(Freeclimb::TranscribeTermReason::ERROR) + expect(instance.term_reason).to eq(Freeclimb::TranscribeTermReason::ERROR) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.term_reason = Freeclimb::TranscribeTermReason::COMPLETED - expect(instance.term_reason).to eq(Freeclimb::TranscribeTermReason::COMPLETED) + expect(instance.term_reason).to eq(Freeclimb::TranscribeTermReason::COMPLETED) end end describe 'test attribute "record_term_reason"' do - it 'assigns value FINISH_KEY' do + it "assigns value FINISH_KEY" do instance.record_term_reason = Freeclimb::RecordUtteranceTermReason::FINISH_KEY - expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::FINISH_KEY) + expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::FINISH_KEY) end - it 'assigns value TIMEOUT' do + it "assigns value TIMEOUT" do instance.record_term_reason = Freeclimb::RecordUtteranceTermReason::TIMEOUT - expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::TIMEOUT) + expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::TIMEOUT) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.record_term_reason = Freeclimb::RecordUtteranceTermReason::HANGUP - expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::HANGUP) + expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::HANGUP) end - it 'assigns value MAX_LENGTH' do + it "assigns value MAX_LENGTH" do instance.record_term_reason = Freeclimb::RecordUtteranceTermReason::MAX_LENGTH - expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::MAX_LENGTH) + expect(instance.record_term_reason).to eq(Freeclimb::RecordUtteranceTermReason::MAX_LENGTH) end end describe 'test attribute "digit"' do - it 'should work' do - + it "should work" do instance.digit = "TEST_STRING" - expect(instance.digit).to eq("TEST_STRING") - - - + expect(instance.digit).to eq("TEST_STRING") end end describe 'test attribute "privacy_for_logging"' do - it 'should work' do + it "should work" do instance.privacy_for_logging = false - expect(instance.privacy_for_logging).to eq(false) - - - + expect(instance.privacy_for_logging).to eq(false) end end describe 'test attribute "privacy_for_recording"' do - it 'should work' do + it "should work" do instance.privacy_for_recording = false - expect(instance.privacy_for_recording).to eq(false) - - - + expect(instance.privacy_for_recording).to eq(false) end end - describe 'test attribute "barge_in_reason"' do - it 'assigns value NO_BARGE_IN' do + it "assigns value NO_BARGE_IN" do instance.barge_in_reason = Freeclimb::BargeInReason::NO_BARGE_IN - expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::NO_BARGE_IN) + expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::NO_BARGE_IN) end - it 'assigns value BARGE_IN_BY_DTMF' do + it "assigns value BARGE_IN_BY_DTMF" do instance.barge_in_reason = Freeclimb::BargeInReason::BARGE_IN_BY_DTMF - expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::BARGE_IN_BY_DTMF) + expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::BARGE_IN_BY_DTMF) end - it 'assigns value BARGE_IN_BY_ENERGY' do + it "assigns value BARGE_IN_BY_ENERGY" do instance.barge_in_reason = Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY - expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY) + expect(instance.barge_in_reason).to eq(Freeclimb::BargeInReason::BARGE_IN_BY_ENERGY) end end describe 'test attribute "barged_in_prompt_no"' do - it 'should work' do - - + it "should work" do instance.barged_in_prompt_no = 1 expect(instance.barged_in_prompt_no).to eq(1) - - - end end describe 'test attribute "barged_in_prompt_ms"' do - it 'should work' do - - + it "should work" do instance.barged_in_prompt_ms = 1 expect(instance.barged_in_prompt_ms).to eq(1) - - - end end describe 'test attribute "barged_in_prompt_loop_no"' do - it 'should work' do - - + it "should work" do instance.barged_in_prompt_loop_no = 1 expect(instance.barged_in_prompt_loop_no).to eq(1) - - - end end describe 'test attribute "barge_in_time_ms"' do - it 'should work' do - - + it "should work" do instance.barge_in_time_ms = 1 expect(instance.barge_in_time_ms).to eq(1) - - - end end describe 'test attribute "transcript"' do - it 'should work' do - + it "should work" do instance.transcript = "TEST_STRING" - expect(instance.transcript).to eq("TEST_STRING") - - - + expect(instance.transcript).to eq("TEST_STRING") end end - describe 'test attribute "transcribe_reason"' do - it 'assigns value INTERNAL_ERROR' do + it "assigns value INTERNAL_ERROR" do instance.transcribe_reason = Freeclimb::TranscribeReason::INTERNAL_ERROR - expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::INTERNAL_ERROR) + expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::INTERNAL_ERROR) end - it 'assigns value HANGUP' do + it "assigns value HANGUP" do instance.transcribe_reason = Freeclimb::TranscribeReason::HANGUP - expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::HANGUP) + expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::HANGUP) end - it 'assigns value MAX_LENGTH' do + it "assigns value MAX_LENGTH" do instance.transcribe_reason = Freeclimb::TranscribeReason::MAX_LENGTH - expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::MAX_LENGTH) + expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::MAX_LENGTH) end - it 'assigns value DIGIT' do + it "assigns value DIGIT" do instance.transcribe_reason = Freeclimb::TranscribeReason::DIGIT - expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::DIGIT) + expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::DIGIT) end - it 'assigns value NO_INPUT' do + it "assigns value NO_INPUT" do instance.transcribe_reason = Freeclimb::TranscribeReason::NO_INPUT - expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::NO_INPUT) + expect(instance.transcribe_reason).to eq(Freeclimb::TranscribeReason::NO_INPUT) end end describe 'test attribute "transcription_duration_ms"' do - it 'should work' do - - + it "should work" do instance.transcription_duration_ms = 1 expect(instance.transcription_duration_ms).to eq(1) - - - end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - recording_size: 1, - - - - - recording_format: "TS", - - - - recording_duration_ms: 1, - - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - digit: "TS", - - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - - barged_in_prompt_no: 1, - - - - barged_in_prompt_ms: 1, - - - - barged_in_prompt_loop_no: 1, - - - - barge_in_time_ms: 1, - - - - - transcript: "TS", - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::TranscribeWebhook' do - expect { instance = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - recording_size: 1, - - - - - recording_format: "TS", - - - - recording_duration_ms: 1, - - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - digit: "TS", - - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - - barged_in_prompt_no: 1, - - - - barged_in_prompt_ms: 1, - - - - barged_in_prompt_loop_no: 1, - - - - barge_in_time_ms: 1, - - - - - transcript: "TS", - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - recording_size: 1, - - - - - recording_format: "TS", - - - - recording_duration_ms: 1, - - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - digit: "TS", - - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - - barged_in_prompt_no: 1, - - - - barged_in_prompt_ms: 1, - - - - barged_in_prompt_loop_no: 1, - - - - barge_in_time_ms: 1, - - - - - transcript: "TS", - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - end - - describe 'test method "valid"' do - it 'checks if properties are valid' do - instance = Freeclimb::TranscribeWebhook.new( - + it "properly initializes with values" do + expect { + Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - - ) - expect(instance.valid?).to eq(true) - end + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - skip 'checks if properties are invalid' do - instance = Freeclimb::TranscribeWebhook.new( - - ) - expect(instance.valid?).to eq(false) + transcription_duration_ms: 1 + ) + }.not_to raise_error end - - end - - describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - - - - - - - - - - - - - - - - - - - - - - instance_1 = Freeclimb::TranscribeWebhook.new( - + it "fails to initialize with input argument that is not a hash in Freeclimb::TranscribeWebhook" do + expect { + Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - + transcription_duration_ms: 1, - - - - ) - instance_2 = Freeclimb::TranscribeWebhook.new( - + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - - - + recording_size: 1, - - + recording_format: "TS", - - - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - transcript: "TS", - - - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - - it 'checks if objects are not equal' do - instance_1 = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - recording_size: 2, - - - - - recording_format: "TS", - - - - recording_duration_ms: 2, - - - - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - digit: "TS", - - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - barged_in_prompt_no: 2, - - - - barged_in_prompt_ms: 2, - - - - barged_in_prompt_loop_no: 2, - - - - barge_in_time_ms: 2, - - - - + transcript: "TS", - - - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - transcription_duration_ms: 2, - - - - ) - instance_2 = Freeclimb::TranscribeWebhook.new( - - request_type: "ST", - - - - - account_id: "ST", - - - - - call_id: "ST", - - - - - from: "ST", - - - - - to: "ST", - - - - - recording_id: "ST", - - - - - recording_url: "ST", - - - - recording_size: 1, - - - - - recording_format: "ST", - - - - recording_duration_ms: 1, - - - - - - - term_reason: nil, - - - - - record_term_reason: nil, - - - digit: "ST", - - - - privacy_for_logging: false, - - - - privacy_for_recording: false, - - - - - - - barge_in_reason: nil, - - barged_in_prompt_no: 1, - - - - barged_in_prompt_ms: 1, - - - - barged_in_prompt_loop_no: 1, - - - - barge_in_time_ms: 1, - - - - - transcript: "ST", - - - - - - - transcribe_reason: nil, - + transcription_duration_ms: 1, - - - - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end - end - - describe 'test method "hash"' do - it 'calculates hash code' do - instance = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - - account_id: "TS", - - - - - call_id: "TS", - - - - - from: "TS", - - - - - to: "TS", - - - - - recording_id: "TS", - - - - - recording_url: "TS", - - - - recording_size: 1, - - - - - recording_format: "TS", - - - - recording_duration_ms: 1, - - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - - digit: "TS", - - - - privacy_for_logging: true, - - - - privacy_for_recording: true, - - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - - barged_in_prompt_no: 1, - - - - barged_in_prompt_ms: 1, - - - - barged_in_prompt_loop_no: 1, - - - - barge_in_time_ms: 1, - - - - - transcript: "TS", - - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - - ) - expect(instance.hash).to be_a_kind_of(Integer) + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::TranscribeWebhook.new( - + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) - instance_2 = Freeclimb::TranscribeWebhook.new( - + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::TranscribeWebhook.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) + instance_2 = Freeclimb::TranscribeWebhook.new( + request_type: "TS", - expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 1, + + recording_format: "TS", + + recording_duration_ms: 1, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 1 + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::TranscribeWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 2, + + recording_format: "TS", + + recording_duration_ms: 2, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 2, + + barged_in_prompt_ms: 2, + + barged_in_prompt_loop_no: 2, + + barge_in_time_ms: 2, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 2 + ) + instance_2 = Freeclimb::TranscribeWebhook.new( + request_type: "ST", + + account_id: "ST", + + call_id: "ST", + + from: "ST", + + to: "ST", + + recording_id: "ST", + + recording_url: "ST", + + recording_size: 1, + + recording_format: "ST", + + recording_duration_ms: 1, + + term_reason: nil, + + record_term_reason: nil, + + digit: "ST", + + privacy_for_logging: false, + + privacy_for_recording: false, + + barge_in_reason: nil, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "ST", + + transcribe_reason: nil, + + transcription_duration_ms: 1 + ) + expect(instance_1.eql?(instance_2)).to eq(false) end end - describe 'test method "_deserialize"' do - instance = Freeclimb::TranscribeWebhook.new( - + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::TranscribeWebhook.new( request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::TranscribeWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 1, + + recording_format: "TS", + + recording_duration_ms: 1, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 1 + ) + instance_2 = Freeclimb::TranscribeWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 1, + + recording_format: "TS", + + recording_duration_ms: 1, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 1 + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::TranscribeWebhook.new( + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 1, + + recording_format: "TS", + + recording_duration_ms: 1, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 1 ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - - it 'deserializes the data of account_id' do + + it "deserializes the data of account_id" do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of call_id' do + + it "deserializes the data of call_id" do expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of from' do + + it "deserializes the data of from" do expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String) end - - - it 'deserializes the data of to' do + + it "deserializes the data of to" do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_id' do + + it "deserializes the data of recording_id" do expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_url' do + + it "deserializes the data of recording_url" do expect(instance._deserialize("String", instance.recording_url)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_size' do + + it "deserializes the data of recording_size" do expect(instance._deserialize("Integer", instance.recording_size)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of recording_format' do + + it "deserializes the data of recording_format" do expect(instance._deserialize("String", instance.recording_format)).to be_a_kind_of(String) end - - - it 'deserializes the data of recording_duration_ms' do + + it "deserializes the data of recording_duration_ms" do expect(instance._deserialize("Integer", instance.recording_duration_ms)).to be_a_kind_of(Integer) end - - - - - - - it 'deserializes the data of digit' do + + it "deserializes the data of digit" do expect(instance._deserialize("String", instance.digit)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of privacy_for_logging' do + + it "deserializes the data of privacy_for_logging" do expect(instance._deserialize("Boolean", instance.privacy_for_logging)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of privacy_for_recording' do + + it "deserializes the data of privacy_for_recording" do expect(instance._deserialize("Boolean", instance.privacy_for_recording)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of barged_in_prompt_no' do + + it "deserializes the data of barged_in_prompt_no" do expect(instance._deserialize("Integer", instance.barged_in_prompt_no)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of barged_in_prompt_ms' do + + it "deserializes the data of barged_in_prompt_ms" do expect(instance._deserialize("Integer", instance.barged_in_prompt_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of barged_in_prompt_loop_no' do + + it "deserializes the data of barged_in_prompt_loop_no" do expect(instance._deserialize("Integer", instance.barged_in_prompt_loop_no)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of barge_in_time_ms' do + + it "deserializes the data of barge_in_time_ms" do expect(instance._deserialize("Integer", instance.barge_in_time_ms)).to be_a_kind_of(Integer) end - - - it 'deserializes the data of transcript' do + + it "deserializes the data of transcript" do expect(instance._deserialize("String", instance.transcript)).to be_a_kind_of(String) end - - - - - it 'deserializes the data of transcription_duration_ms' do + + it "deserializes the data of transcription_duration_ms" do expect(instance._deserialize("Integer", instance.transcription_duration_ms)).to be_a_kind_of(Integer) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::TranscribeWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::TranscribeWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - - - - - - - - - - - - - - - - - - - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::TranscribeWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) instance_2 = Freeclimb::TranscribeWebhook.new( - request_type: "TS", - - - - + account_id: "TS", - - - - + call_id: "TS", - - - - + from: "TS", - - - - + to: "TS", - - - - + recording_id: "TS", - - - - + recording_url: "TS", - - - + recording_size: 1, - - - - + recording_format: "TS", - - - + recording_duration_ms: 1, - - - - + term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - + digit: "TS", - - - + privacy_for_logging: true, - - - + privacy_for_recording: true, - - - - + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - + barged_in_prompt_no: 1, - - - + barged_in_prompt_ms: 1, - - - + barged_in_prompt_loop_no: 1, - - - + barge_in_time_ms: 1, - - - - + transcript: "TS", - - - - + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - - transcription_duration_ms: 1, - - - + + transcription_duration_ms: 1 ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -2261,158 +1130,120 @@ describe 'test method "_to_hash"' do instance = Freeclimb::TranscribeWebhook.new( - - request_type: "TS", - - - - account_id: "TS", - - - - call_id: "TS", - - - - from: "TS", - - - - to: "TS", - - - - recording_id: "TS", - - - - recording_url: "TS", - - - recording_size: 1, - - - - recording_format: "TS", - - - recording_duration_ms: 1, - - - - term_reason: Freeclimb::TranscribeTermReason::ERROR, - - - - record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, - - - - digit: "TS", - - - privacy_for_logging: true, - - - privacy_for_recording: true, - - - - barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, - - - barged_in_prompt_no: 1, - - - barged_in_prompt_ms: 1, - - - barged_in_prompt_loop_no: 1, - - - barge_in_time_ms: 1, - - - - transcript: "TS", - - - - transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, - - - transcription_duration_ms: 1, - - ) - it 'returns request_type in the form of hash' do + request_type: "TS", + + account_id: "TS", + + call_id: "TS", + + from: "TS", + + to: "TS", + + recording_id: "TS", + + recording_url: "TS", + + recording_size: 1, + + recording_format: "TS", + + recording_duration_ms: 1, + + term_reason: Freeclimb::TranscribeTermReason::ERROR, + + record_term_reason: Freeclimb::RecordUtteranceTermReason::FINISH_KEY, + + digit: "TS", + + privacy_for_logging: true, + + privacy_for_recording: true, + + barge_in_reason: Freeclimb::BargeInReason::NO_BARGE_IN, + + barged_in_prompt_no: 1, + + barged_in_prompt_ms: 1, + + barged_in_prompt_loop_no: 1, + + barge_in_time_ms: 1, + + transcript: "TS", + + transcribe_reason: Freeclimb::TranscribeReason::INTERNAL_ERROR, + + transcription_duration_ms: 1 + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end - it 'returns account_id in the form of hash' do + it "returns account_id in the form of hash" do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) end - it 'returns call_id in the form of hash' do + it "returns call_id in the form of hash" do expect(instance._to_hash(instance.call_id)).to eq(instance.call_id) end - it 'returns from in the form of hash' do + it "returns from in the form of hash" do expect(instance._to_hash(instance.from)).to eq(instance.from) end - it 'returns to in the form of hash' do + it "returns to in the form of hash" do expect(instance._to_hash(instance.to)).to eq(instance.to) end - it 'returns recording_id in the form of hash' do + it "returns recording_id in the form of hash" do expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id) end - it 'returns recording_url in the form of hash' do + it "returns recording_url in the form of hash" do expect(instance._to_hash(instance.recording_url)).to eq(instance.recording_url) end - it 'returns recording_size in the form of hash' do + it "returns recording_size in the form of hash" do expect(instance._to_hash(instance.recording_size)).to eq(instance.recording_size) end - it 'returns recording_format in the form of hash' do + it "returns recording_format in the form of hash" do expect(instance._to_hash(instance.recording_format)).to eq(instance.recording_format) end - it 'returns recording_duration_ms in the form of hash' do + it "returns recording_duration_ms in the form of hash" do expect(instance._to_hash(instance.recording_duration_ms)).to eq(instance.recording_duration_ms) end - it 'returns term_reason in the form of hash' do + it "returns term_reason in the form of hash" do expect(instance._to_hash(instance.term_reason)).to eq(instance.term_reason) end - it 'returns record_term_reason in the form of hash' do + it "returns record_term_reason in the form of hash" do expect(instance._to_hash(instance.record_term_reason)).to eq(instance.record_term_reason) end - it 'returns digit in the form of hash' do + it "returns digit in the form of hash" do expect(instance._to_hash(instance.digit)).to eq(instance.digit) end - it 'returns privacy_for_logging in the form of hash' do + it "returns privacy_for_logging in the form of hash" do expect(instance._to_hash(instance.privacy_for_logging)).to eq(instance.privacy_for_logging) end - it 'returns privacy_for_recording in the form of hash' do + it "returns privacy_for_recording in the form of hash" do expect(instance._to_hash(instance.privacy_for_recording)).to eq(instance.privacy_for_recording) end - it 'returns barge_in_reason in the form of hash' do + it "returns barge_in_reason in the form of hash" do expect(instance._to_hash(instance.barge_in_reason)).to eq(instance.barge_in_reason) end - it 'returns barged_in_prompt_no in the form of hash' do + it "returns barged_in_prompt_no in the form of hash" do expect(instance._to_hash(instance.barged_in_prompt_no)).to eq(instance.barged_in_prompt_no) end - it 'returns barged_in_prompt_ms in the form of hash' do + it "returns barged_in_prompt_ms in the form of hash" do expect(instance._to_hash(instance.barged_in_prompt_ms)).to eq(instance.barged_in_prompt_ms) end - it 'returns barged_in_prompt_loop_no in the form of hash' do + it "returns barged_in_prompt_loop_no in the form of hash" do expect(instance._to_hash(instance.barged_in_prompt_loop_no)).to eq(instance.barged_in_prompt_loop_no) end - it 'returns barge_in_time_ms in the form of hash' do + it "returns barge_in_time_ms in the form of hash" do expect(instance._to_hash(instance.barge_in_time_ms)).to eq(instance.barge_in_time_ms) end - it 'returns transcript in the form of hash' do + it "returns transcript in the form of hash" do expect(instance._to_hash(instance.transcript)).to eq(instance.transcript) end - it 'returns transcribe_reason in the form of hash' do + it "returns transcribe_reason in the form of hash" do expect(instance._to_hash(instance.transcribe_reason)).to eq(instance.transcribe_reason) end - it 'returns transcription_duration_ms in the form of hash' do + it "returns transcription_duration_ms in the form of hash" do expect(instance._to_hash(instance.transcription_duration_ms)).to eq(instance.transcription_duration_ms) end end - end diff --git a/spec/models/unpark_spec.rb b/spec/models/unpark_spec.rb index 2588ae29..119b9d4a 100644 --- a/spec/models/unpark_spec.rb +++ b/spec/models/unpark_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Unpark @@ -21,10 +19,9 @@ describe Freeclimb::Unpark do let(:instance) { Freeclimb::Unpark.new } - describe 'test an instance of Unpark' do - it 'should create an instance of Unpark' do + describe "test an instance of Unpark" do + it "should create an instance of Unpark" do expect(instance).to be_instance_of(Freeclimb::Unpark) end end - end diff --git a/spec/models/update_call_request_spec.rb b/spec/models/update_call_request_spec.rb index c02b4fae..36d7a903 100644 --- a/spec/models/update_call_request_spec.rb +++ b/spec/models/update_call_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::UpdateCallRequest @@ -21,144 +19,103 @@ describe Freeclimb::UpdateCallRequest do let(:instance) { Freeclimb::UpdateCallRequest.new } - describe 'test an instance of UpdateCallRequest' do - it 'should create an instance of UpdateCallRequest' do + describe "test an instance of UpdateCallRequest" do + it "should create an instance of UpdateCallRequest" do expect(instance).to be_instance_of(Freeclimb::UpdateCallRequest) end end - describe 'test attribute "status"' do - it 'assigns value CANCELED' do + it "assigns value CANCELED" do instance.status = Freeclimb::UpdateCallRequestStatus::CANCELED - expect(instance.status).to eq(Freeclimb::UpdateCallRequestStatus::CANCELED) + expect(instance.status).to eq(Freeclimb::UpdateCallRequestStatus::CANCELED) end - it 'assigns value COMPLETED' do + it "assigns value COMPLETED" do instance.status = Freeclimb::UpdateCallRequestStatus::COMPLETED - expect(instance.status).to eq(Freeclimb::UpdateCallRequestStatus::COMPLETED) + expect(instance.status).to eq(Freeclimb::UpdateCallRequestStatus::COMPLETED) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - - )}.not_to raise_error() - end - it 'fails to initialize with input argument that is not a hash in Freeclimb::UpdateCallRequest' do - expect { instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) - end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "properly initializes with values" do + expect { + Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus::CANCELED + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::UpdateCallRequest" do + expect { + Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus::CANCELED, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus::CANCELED, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::UpdateCallRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::UpdateCallRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::UpdateCallRequest.new( - - - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) instance_2 = Freeclimb::UpdateCallRequest.new( - - - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::UpdateCallRequest.new( - - - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) instance_2 = Freeclimb::UpdateCallRequest.new( - - - - status: nil, - + status: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - - ) + status: Freeclimb::UpdateCallRequestStatus::CANCELED + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) instance_2 = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -166,56 +123,33 @@ end describe 'test method "_deserialize"' do - instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) instance_2 = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - - + status: Freeclimb::UpdateCallRequestStatus::CANCELED ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -223,13 +157,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::UpdateCallRequest.new( - - status: Freeclimb::UpdateCallRequestStatus::CANCELED, - - ) - it 'returns status in the form of hash' do + status: Freeclimb::UpdateCallRequestStatus::CANCELED + ) + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end end - end diff --git a/spec/models/update_call_request_status_spec.rb b/spec/models/update_call_request_status_spec.rb index 65d48560..a30329d9 100644 --- a/spec/models/update_call_request_status_spec.rb +++ b/spec/models/update_call_request_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::UpdateCallRequestStatus @@ -21,22 +19,22 @@ describe Freeclimb::UpdateCallRequestStatus do let(:instance) { Freeclimb::UpdateCallRequestStatus.new } - describe 'test an instance of UpdateCallRequestStatus' do - it 'should create an instance of UpdateCallRequestStatus' do + describe "test an instance of UpdateCallRequestStatus" do + it "should create an instance of UpdateCallRequestStatus" do expect(instance).to be_instance_of(Freeclimb::UpdateCallRequestStatus) end end - + describe 'test attribute "CANCELED"' do - it 'should work' do + it "should work" do expect { Freeclimb::UpdateCallRequestStatus::CANCELED = "canceled" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::UpdateCallRequestStatus::CANCELED - calculatedValue = Freeclimb::UpdateCallRequestStatus::build_from_hash("canceled") + calculatedValue = Freeclimb::UpdateCallRequestStatus.build_from_hash("canceled") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "canceled" calculatedValue = Freeclimb::UpdateCallRequestStatus::CANCELED expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "COMPLETED"' do - it 'should work' do + it "should work" do expect { Freeclimb::UpdateCallRequestStatus::COMPLETED = "completed" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::UpdateCallRequestStatus::COMPLETED - calculatedValue = Freeclimb::UpdateCallRequestStatus::build_from_hash("completed") + calculatedValue = Freeclimb::UpdateCallRequestStatus.build_from_hash("completed") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "completed" calculatedValue = Freeclimb::UpdateCallRequestStatus::COMPLETED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/update_conference_participant_request_spec.rb b/spec/models/update_conference_participant_request_spec.rb index fc860767..fe19b41e 100644 --- a/spec/models/update_conference_participant_request_spec.rb +++ b/spec/models/update_conference_participant_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::UpdateConferenceParticipantRequest @@ -21,242 +19,158 @@ describe Freeclimb::UpdateConferenceParticipantRequest do let(:instance) { Freeclimb::UpdateConferenceParticipantRequest.new } - describe 'test an instance of UpdateConferenceParticipantRequest' do - it 'should create an instance of UpdateConferenceParticipantRequest' do + describe "test an instance of UpdateConferenceParticipantRequest" do + it "should create an instance of UpdateConferenceParticipantRequest" do expect(instance).to be_instance_of(Freeclimb::UpdateConferenceParticipantRequest) end end - + describe 'test attribute "talk"' do - it 'should work' do + it "should work" do instance.talk = false - expect(instance.talk).to eq(false) - - - + expect(instance.talk).to eq(false) end end describe 'test attribute "listen"' do - it 'should work' do + it "should work" do instance.listen = false - expect(instance.listen).to eq(false) - - - + expect(instance.listen).to eq(false) end end describe 'test attribute "dtmf_pass_through"' do - it 'should work' do + it "should work" do instance.dtmf_pass_through = false - expect(instance.dtmf_pass_through).to eq(false) - - - + expect(instance.dtmf_pass_through).to eq(false) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::UpdateConferenceParticipantRequest.new( + talk: true, + + listen: true, + + dtmf_pass_through: true + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::UpdateConferenceParticipantRequest' do - expect { instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::UpdateConferenceParticipantRequest" do + expect { + Freeclimb::UpdateConferenceParticipantRequest.new( + talk: true, + + listen: true, + + dtmf_pass_through: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::UpdateConferenceParticipantRequest.new( + talk: true, + + listen: true, + + dtmf_pass_through: true, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - + talk: true, + + listen: true, + + dtmf_pass_through: true ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::UpdateConferenceParticipantRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::UpdateConferenceParticipantRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - + talk: true, + + listen: true, + + dtmf_pass_through: true ) instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - + talk: true, + + listen: true, + + dtmf_pass_through: true ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - + talk: true, + + listen: true, + + dtmf_pass_through: true ) instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: false, - - - - listen: false, - - - - dtmf_pass_through: false, - - - + talk: false, + + listen: false, + + dtmf_pass_through: false ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - - ) + talk: true, + + listen: true, + + dtmf_pass_through: true + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -265,105 +179,64 @@ describe 'test method "_deserialize"' do instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - - listen: true, - - - - dtmf_pass_through: true, - - - + talk: true, + + listen: true, + + dtmf_pass_through: true ) - - - it 'deserializes the data of talk' do + + it "deserializes the data of talk" do expect(instance._deserialize("Boolean", instance.talk)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of listen' do + + it "deserializes the data of listen" do expect(instance._deserialize("Boolean", instance.listen)).to be_a_kind_of(TrueClass) end - - - it 'deserializes the data of dtmf_pass_through' do + + it "deserializes the data of dtmf_pass_through" do expect(instance._deserialize("Boolean", instance.dtmf_pass_through)).to be_a_kind_of(TrueClass) end end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, - - - + listen: true, - - - - dtmf_pass_through: true, - - - + + dtmf_pass_through: true ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -371,24 +244,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - - - listen: true, - - - dtmf_pass_through: true, - - ) - it 'returns talk in the form of hash' do + talk: true, + + listen: true, + + dtmf_pass_through: true + ) + it "returns talk in the form of hash" do expect(instance._to_hash(instance.talk)).to eq(instance.talk) end - it 'returns listen in the form of hash' do + it "returns listen in the form of hash" do expect(instance._to_hash(instance.listen)).to eq(instance.listen) end - it 'returns dtmf_pass_through in the form of hash' do + it "returns dtmf_pass_through in the form of hash" do expect(instance._to_hash(instance.dtmf_pass_through)).to eq(instance.dtmf_pass_through) end end - end diff --git a/spec/models/update_conference_request_spec.rb b/spec/models/update_conference_request_spec.rb index b4baea47..f81f1044 100644 --- a/spec/models/update_conference_request_spec.rb +++ b/spec/models/update_conference_request_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::UpdateConferenceRequest @@ -21,286 +19,173 @@ describe Freeclimb::UpdateConferenceRequest do let(:instance) { Freeclimb::UpdateConferenceRequest.new } - describe 'test an instance of UpdateConferenceRequest' do - it 'should create an instance of UpdateConferenceRequest' do + describe "test an instance of UpdateConferenceRequest" do + it "should create an instance of UpdateConferenceRequest" do expect(instance).to be_instance_of(Freeclimb::UpdateConferenceRequest) end end - + describe 'test attribute "_alias"' do - it 'should work' do - + it "should work" do instance._alias = "TEST_STRING" - expect(instance._alias).to eq("TEST_STRING") - - - + expect(instance._alias).to eq("TEST_STRING") end end - describe 'test attribute "play_beep"' do - it 'assigns value ALWAYS' do + it "assigns value ALWAYS" do instance.play_beep = Freeclimb::PlayBeep::ALWAYS - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS) end - it 'assigns value NEVER' do + it "assigns value NEVER" do instance.play_beep = Freeclimb::PlayBeep::NEVER - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER) end - it 'assigns value ENTRY_ONLY' do + it "assigns value ENTRY_ONLY" do instance.play_beep = Freeclimb::PlayBeep::ENTRY_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY) end - it 'assigns value EXIT_ONLY' do + it "assigns value EXIT_ONLY" do instance.play_beep = Freeclimb::PlayBeep::EXIT_ONLY - expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) + expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY) end end describe 'test attribute "status"' do - it 'assigns value EMPTY' do + it "assigns value EMPTY" do instance.status = Freeclimb::UpdateConferenceRequestStatus::EMPTY - expect(instance.status).to eq(Freeclimb::UpdateConferenceRequestStatus::EMPTY) + expect(instance.status).to eq(Freeclimb::UpdateConferenceRequestStatus::EMPTY) end - it 'assigns value TERMINATED' do + it "assigns value TERMINATED" do instance.status = Freeclimb::UpdateConferenceRequestStatus::TERMINATED - expect(instance.status).to eq(Freeclimb::UpdateConferenceRequestStatus::TERMINATED) + expect(instance.status).to eq(Freeclimb::UpdateConferenceRequestStatus::TERMINATED) end end describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::UpdateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::UpdateConferenceRequest' do - expect { instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::UpdateConferenceRequest" do + expect { + Freeclimb::UpdateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::UpdateConferenceRequest.new( + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::UpdateConferenceRequest.new - skip 'checks if properties are invalid' do - instance = Freeclimb::UpdateConferenceRequest.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - - - + it "checks if objects are equal" do instance_1 = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) instance_2 = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) instance_2 = Freeclimb::UpdateConferenceRequest.new( - - _alias: "ST", - - - - - - - play_beep: nil, - - - - - status: nil, - + _alias: "ST", + + play_beep: nil, + + status: nil ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - - ) + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) instance_2 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -309,114 +194,55 @@ describe 'test method "_deserialize"' do instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) - it 'deserializes the data of _alias' do + it "deserializes the data of _alias" do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) end - - - - - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - - - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) instance_2 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - - - - + play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - - + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -424,27 +250,20 @@ describe 'test method "_to_hash"' do instance = Freeclimb::UpdateConferenceRequest.new( - - _alias: "TS", - - - - play_beep: Freeclimb::PlayBeep::ALWAYS, - - - - status: Freeclimb::UpdateConferenceRequestStatus::EMPTY, - - ) - it 'returns _alias in the form of hash' do + _alias: "TS", + + play_beep: Freeclimb::PlayBeep::ALWAYS, + + status: Freeclimb::UpdateConferenceRequestStatus::EMPTY + ) + it "returns _alias in the form of hash" do expect(instance._to_hash(instance._alias)).to eq(instance._alias) end - it 'returns play_beep in the form of hash' do + it "returns play_beep in the form of hash" do expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end - it 'returns status in the form of hash' do + it "returns status in the form of hash" do expect(instance._to_hash(instance.status)).to eq(instance.status) end end - end diff --git a/spec/models/update_conference_request_status_spec.rb b/spec/models/update_conference_request_status_spec.rb index 4a4e3665..7b3c7c45 100644 --- a/spec/models/update_conference_request_status_spec.rb +++ b/spec/models/update_conference_request_status_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::UpdateConferenceRequestStatus @@ -21,22 +19,22 @@ describe Freeclimb::UpdateConferenceRequestStatus do let(:instance) { Freeclimb::UpdateConferenceRequestStatus.new } - describe 'test an instance of UpdateConferenceRequestStatus' do - it 'should create an instance of UpdateConferenceRequestStatus' do + describe "test an instance of UpdateConferenceRequestStatus" do + it "should create an instance of UpdateConferenceRequestStatus" do expect(instance).to be_instance_of(Freeclimb::UpdateConferenceRequestStatus) end end - + describe 'test attribute "EMPTY"' do - it 'should work' do + it "should work" do expect { Freeclimb::UpdateConferenceRequestStatus::EMPTY = "empty" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::UpdateConferenceRequestStatus::EMPTY - calculatedValue = Freeclimb::UpdateConferenceRequestStatus::build_from_hash("empty") + calculatedValue = Freeclimb::UpdateConferenceRequestStatus.build_from_hash("empty") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "empty" calculatedValue = Freeclimb::UpdateConferenceRequestStatus::EMPTY expect(expectedValue).to eq(calculatedValue) @@ -44,19 +42,18 @@ end describe 'test attribute "TERMINATED"' do - it 'should work' do + it "should work" do expect { Freeclimb::UpdateConferenceRequestStatus::TERMINATED = "terminated" }.not_to raise_error end - it 'should serialize to enum' do + it "should serialize to enum" do expectedValue = Freeclimb::UpdateConferenceRequestStatus::TERMINATED - calculatedValue = Freeclimb::UpdateConferenceRequestStatus::build_from_hash("terminated") + calculatedValue = Freeclimb::UpdateConferenceRequestStatus.build_from_hash("terminated") expect(expectedValue).to eq(calculatedValue) end - it 'should deserialize to string' do + it "should deserialize to string" do expectedValue = "terminated" calculatedValue = Freeclimb::UpdateConferenceRequestStatus::TERMINATED expect(expectedValue).to eq(calculatedValue) end end - end diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb index 6adb5e0f..a02f9c3b 100644 --- a/spec/models/webhook_spec.rb +++ b/spec/models/webhook_spec.rb @@ -1,18 +1,16 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" include Freeclimb # Unit tests for Freeclimb::Webhook @@ -21,134 +19,93 @@ describe Freeclimb::Webhook do let(:instance) { Freeclimb::Webhook.new } - describe 'test an instance of Webhook' do - it 'should create an instance of Webhook' do + describe "test an instance of Webhook" do + it "should create an instance of Webhook" do expect(instance).to be_instance_of(Freeclimb::Webhook) end end - describe 'test method "initialize"' do - it 'properly initializes with values' do - expect { instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - - )}.not_to raise_error() + it "properly initializes with values" do + expect { + Freeclimb::Webhook.new( + request_type: "TS" + ) + }.not_to raise_error end - it 'fails to initialize with input argument that is not a hash in Freeclimb::Webhook' do - expect { instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with input argument that is not a hash in Freeclimb::Webhook" do + expect { + Freeclimb::Webhook.new( + request_type: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end - it 'fails to initialize with invalid attribute' do - expect { instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - - invalid_attribute: true - )}.to raise_error(ArgumentError) + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::Webhook.new( + request_type: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) end end - + describe 'test method "valid"' do - it 'checks if properties are valid' do + it "checks if properties are valid" do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance.valid?).to eq(true) end + skip "checks if properties are invalid" do + instance = Freeclimb::Webhook.new - skip 'checks if properties are invalid' do - instance = Freeclimb::Webhook.new( - - ) expect(instance.valid?).to eq(false) end - end describe 'test method "eql?"' do - it 'checks if objects are equal' do - + it "checks if objects are equal" do instance_1 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) instance_2 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance_1.eql?(instance_2)).to eq(true) end - - it 'checks if objects are not equal' do + + it "checks if objects are not equal" do instance_1 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) instance_2 = Freeclimb::Webhook.new( - - request_type: "ST", - - - + request_type: "ST" ) expect(instance_1.eql?(instance_2)).to eq(false) end end - + describe 'test method "hash"' do - it 'calculates hash code' do + it "calculates hash code" do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - - ) + request_type: "TS" + ) expect(instance.hash).to be_a_kind_of(Integer) end end describe 'test method "build_from_hash"' do - it 'builds equivalent model from hash code' do + it "builds equivalent model from hash code" do instance_1 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) instance_2 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -157,58 +114,35 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) - it 'deserializes the data of request_type' do + it "deserializes the data of request_type" do expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String) end - - end describe 'test method "to_s"' do - it 'returns the string representation of the object' do + it "returns the string representation of the object" do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance.to_s).to eq(instance.to_hash.to_s) end end describe 'test method "to_hash"' do - it 'returns the object in the form of hash' do + it "returns the object in the form of hash" do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance.to_hash).to be_a_kind_of(Hash) end - it 'creates equal hash for two equal objects' do - + it "creates equal hash for two equal objects" do instance_1 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) instance_2 = Freeclimb::Webhook.new( - - request_type: "TS", - - - + request_type: "TS" ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -216,13 +150,10 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Webhook.new( - - request_type: "TS", - - ) - it 'returns request_type in the form of hash' do + request_type: "TS" + ) + it "returns request_type in the form of hash" do expect(instance._to_hash(instance.request_type)).to eq(instance.request_type) end end - end diff --git a/spec/quickstart_spec.rb b/spec/quickstart_spec.rb index d82f6560..1cc7cdd0 100644 --- a/spec/quickstart_spec.rb +++ b/spec/quickstart_spec.rb @@ -1,11 +1,11 @@ -require 'json' +require "json" describe "quickstart" do it "generates percl to say the text 'Hello, World!'" do - say = Freeclimb::Say.new(text: 'Hello, World!') - get_speech = Freeclimb::GetSpeech.new(action_url: 'https://example.com/update') + say = Freeclimb::Say.new(text: "Hello, World!") + get_speech = Freeclimb::GetSpeech.new(action_url: "https://example.com/update") script = Freeclimb::PerclScript.new(commands: [say, get_speech]) - json = script.to_json() + json = script.to_json expect(json).to eq("[{\"Say\":{\"text\":\"Hello, World!\",\"loop\":1}},{\"GetSpeech\":{\"actionUrl\":\"https://example.com/update\"}}]") end -end \ No newline at end of file +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0f9aef00..7aa7cb25 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,20 +1,18 @@ -=begin -#FreeClimb API - -#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. - -The version of the OpenAPI document: 1.0.0 -Contact: support@freeclimb.com -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.9.0 - -=end +# #FreeClimb API +# +# 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. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# # load the gem -require 'freeclimb' -require 'webmock/rspec' -require 'factory_bot' -require 'facets/string/camelcase' +require "freeclimb" +require "webmock/rspec" +require "factory_bot" +require "facets/string/camelcase" include WebMock::API @@ -60,59 +58,57 @@ mocks.verify_partial_doubles = true end -# The settings below are suggested to provide a good initial experience -# with RSpec, but feel free to customize to your heart's content. -=begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true - - # Allows RSpec to persist some state between runs in order to support - # the `--only-failures` and `--next-failure` CLI options. We recommend - # you configure your source control system to ignore this file. - config.example_status_persistence_file_path = "spec/examples.txt" - - # Limits the available syntax to the non-monkey patched syntax that is - # recommended. For more details, see: - # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ - # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode - config.disable_monkey_patching! - - # This setting enables warnings. It's recommended, but in some cases may - # be too noisy due to issues in dependencies. - config.warnings = true - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - if config.files_to_run.one? - # Use the documentation formatter for detailed output, - # unless a formatter has already been configured - # (e.g. via a command-line flag). - config.default_formatter = 'doc' - end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed -=end + # The settings below are suggested to provide a good initial experience + # with RSpec, but feel free to customize to your heart's content. + # # These two settings work together to allow you to limit a spec run + # # to individual examples or groups you care about by tagging them with + # # `:focus` metadata. When nothing is tagged with `:focus`, all examples + # # get run. + # config.filter_run :focus + # config.run_all_when_everything_filtered = true + # + # # Allows RSpec to persist some state between runs in order to support + # # the `--only-failures` and `--next-failure` CLI options. We recommend + # # you configure your source control system to ignore this file. + # config.example_status_persistence_file_path = "spec/examples.txt" + # + # # Limits the available syntax to the non-monkey patched syntax that is + # # recommended. For more details, see: + # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ + # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode + # config.disable_monkey_patching! + # + # # This setting enables warnings. It's recommended, but in some cases may + # # be too noisy due to issues in dependencies. + # config.warnings = true + # + # # Many RSpec users commonly either run the entire suite or an individual + # # file, and it's useful to allow more verbose output when running an + # # individual spec file. + # if config.files_to_run.one? + # # Use the documentation formatter for detailed output, + # # unless a formatter has already been configured + # # (e.g. via a command-line flag). + # config.default_formatter = 'doc' + # end + # + # # Print the 10 slowest examples and example groups at the + # # end of the spec run, to help surface which specs are running + # # particularly slow. + # config.profile_examples = 10 + # + # # Run specs in random order to surface order dependencies. If you find an + # # order dependency and want to debug it, you can fix the order by providing + # # the seed, which is printed after each run. + # # --seed 1234 + # config.order = :random + # + # # Seed global randomization in this process using the `--seed` CLI option. + # # Setting this allows you to use `--seed` to deterministically reproduce + # # test failures related to randomization by passing the same `--seed` value + # # as the one that triggered the failure. + # Kernel.srand config.seed config.include FactoryBot::Syntax::Methods @@ -123,48 +119,44 @@ Freeclimb.configure do |config| # Configure HTTP basic authorization: fc - config.username = 'TEST_ACCOUNT_ID' - config.password = 'TEST_API_KEY' + config.username = "TEST_ACCOUNT_ID" + config.password = "TEST_API_KEY" end # Prevents external http requests -WebMock.disable_net_connect!(:allow_localhost => true) - +WebMock.disable_net_connect!(allow_localhost: true) def build_value(sym) - begin - if (sym.to_s == 'direction') - 'inbound' - else - build(sym) - end - rescue => error - if error.message.include? "invalid value" - raise error - else - 'TEST_' + sym.to_s.upcase - end + if sym.to_s == "direction" + "inbound" + else + build(sym) + end +rescue => error + if error.message.include? "invalid value" + raise error + else + "TEST_" + sym.to_s.upcase end end def build_query_parameters(params) - params.to_hash.reduce({}) do |acc, (key, val)| - if (key.to_s == '_alias') - next_key = 'alias' - elsif (key.to_s == 'capabilities_ten_dlc') - next_key = 'capabilities.tenDLC' - elsif (key.to_s == 'capabilities_short_code') - next_key = 'capabilities.shortCode' - elsif (key.to_s == 'capabilities_voice') - next_key = 'capabilities.voice' - elsif (key.to_s == 'capabilities_sms') - next_key = 'capabilities.sms' - elsif (key.to_s == 'capabilities_toll_free') - next_key = 'capabilities.tollFree' + params.to_hash.each_with_object({}) do |(key, val), acc| + next_key = if key.to_s == "_alias" + "alias" + elsif key.to_s == "capabilities_ten_dlc" + "capabilities.tenDLC" + elsif key.to_s == "capabilities_short_code" + "capabilities.shortCode" + elsif key.to_s == "capabilities_voice" + "capabilities.voice" + elsif key.to_s == "capabilities_sms" + "capabilities.sms" + elsif key.to_s == "capabilities_toll_free" + "capabilities.tollFree" else - next_key = key.to_s.camelcase + key.to_s.camelcase end acc[next_key] = val - acc end -end \ No newline at end of file +end diff --git a/spec/utils/request_verifier_spec.rb b/spec/utils/request_verifier_spec.rb index 07a13c46..0090754d 100644 --- a/spec/utils/request_verifier_spec.rb +++ b/spec/utils/request_verifier_spec.rb @@ -1,21 +1,21 @@ -require 'spec_helper' +require "spec_helper" -describe 'RequestVerifier' do +describe "RequestVerifier" do before do - @request_verifier_object = Freeclimb::RequestVerifier.new() + @request_verifier_object = Freeclimb::RequestVerifier.new end - describe '#check_request_body' do - context 'Request Body is empty' do + describe "#check_request_body" do + context "Request Body is empty" do it 'throws "Request Body cannot be empty or null"' do - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - tolerance = 5 * 60 - request_body = "" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Request Body cannot be empty or null") - end + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + tolerance = 5 * 60 + request_body = "" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Request Body cannot be empty or null") + end end - context 'Request Body is nil' do + context "Request Body is nil" do it 'throws "Request Body cannot be empty or null"' do request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" @@ -26,17 +26,17 @@ end end - describe '#check_request_header' do - context 'signatures are not present' do + describe "#check_request_header" do + context "signatures are not present" do it 'throws "Error with request header, signatures are not present"' do - request_header = "t=1679944186," - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - tolerance = 5 * 60 - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Error with request header, signatures are not present") - end + request_header = "t=1679944186," + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + tolerance = 5 * 60 + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Error with request header, signatures are not present") + end end - context 'timestamp is not present' do + context "timestamp is not present" do it 'throws "Error with request header, timestamp is not present"' do request_header = "v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" @@ -45,7 +45,7 @@ expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Error with request header, timestamp is not present") end end - context 'Request header is empty' do + context "Request header is empty" do it 'throws "Error with request header, Request header is empty"' do request_header = "" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" @@ -56,17 +56,17 @@ end end - describe '#check_signing_secret' do - context 'Signing secret is empty' do + describe "#check_signing_secret" do + context "Signing secret is empty" do it 'throws "Signing secret cannot be empty or null"' do - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - signing_secret = "" - tolerance = 5 * 60 - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Signing secret cannot be empty or null") - end + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + signing_secret = "" + tolerance = 5 * 60 + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Signing secret cannot be empty or null") + end end - context 'Signing secret is nil' do + context "Signing secret is nil" do it 'throws "Signing secret cannot be empty or null"' do request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" signing_secret = nil @@ -77,17 +77,17 @@ end end - describe '#check_tolerance' do - context 'Tolerance value is a negative value' do + describe "#check_tolerance" do + context "Tolerance value is a negative value" do it 'throws "Tolerance value must be a positive integer"' do - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - tolerance = -5 - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Tolerance value must be a positive integer") - end + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + tolerance = -5 + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Tolerance value must be a positive integer") + end end - context 'Tolerance value is 0' do + context "Tolerance value is 0" do it 'throws "Tolerance value must be a positive integer"' do request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" @@ -96,7 +96,7 @@ expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Tolerance value must be a positive integer") end end - context 'Tolerance value is NaN' do + context "Tolerance value is NaN" do it 'throws "Tolerance value must be a positive integer"' do request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" @@ -107,43 +107,42 @@ end end - describe '#verify_tolerance' do - context 'Request plus tolerance is not less than the current datetime' do + describe "#verify_tolerance" do + context "Request plus tolerance is not less than the current datetime" do it 'throws "Request time exceeded tolerance threshold. Request: 1900871395, CurrentTime: currentTimeValue, tolerance, toleranceValue"' do - currentTime = DateTime.now.strftime('%s').to_i - timeCalculation = currentTime - (6 * 60) - request_header = "t=#{timeCalculation},v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - tolerance = (5 * 60) - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Request time exceeded tolerance threshold. Request: #{timeCalculation}" + ", CurrentTime: " + currentTime.to_s + ", tolerance: " + tolerance.to_s) - end + currentTime = DateTime.now.strftime("%s").to_i + timeCalculation = currentTime - (6 * 60) + request_header = "t=#{timeCalculation},v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + tolerance = (5 * 60) + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Request time exceeded tolerance threshold. Request: #{timeCalculation}" + ", CurrentTime: " + currentTime.to_s + ", tolerance: " + tolerance.to_s) + end end end - describe '#verify_signature' do - context 'Signature request is unverified, signing secret does not exist in signatures, potential typo' do + describe "#verify_signature" do + context "Signature request is unverified, signing secret does not exist in signatures, potential typo" do it 'throws "Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret"' do - currentTime = DateTime.now.strftime('%s').to_i - request_header = "t=#{currentTime},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794" - tolerance = (5 * 60) - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret") - end + currentTime = DateTime.now.strftime("%s").to_i + request_header = "t=#{currentTime},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794" + tolerance = (5 * 60) + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.to raise_error("Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret") + end end end - describe '#verify_request_signature' do - context 'Request is valid' do - it 'No errors are thrown' do - request_header = "t=2130000000,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=6835006e70c9b9f610e8fb3a8b36b52b3f28c12d0a2dab75091c46ca7ec11b20" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - tolerance = (5 * 60) - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.not_to raise_error - end + describe "#verify_request_signature" do + context "Request is valid" do + it "No errors are thrown" do + request_header = "t=2130000000,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=6835006e70c9b9f610e8fb3a8b36b52b3f28c12d0a2dab75091c46ca7ec11b20" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + tolerance = (5 * 60) + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + expect { Freeclimb::RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) }.not_to raise_error + end end end - -end \ No newline at end of file +end diff --git a/spec/utils/signature_information_spec.rb b/spec/utils/signature_information_spec.rb index 75181070..a30aea7e 100644 --- a/spec/utils/signature_information_spec.rb +++ b/spec/utils/signature_information_spec.rb @@ -1,24 +1,24 @@ -require 'spec_helper' +require "spec_helper" $time_stamp = 1679944186 $FIXNUM_MAX = (2**(0.size * 8 - 2) - 1) -describe 'SignatureInformation' do +describe "SignatureInformation" do before do @request_header = "t=#{$time_stamp},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" @signature_information_object = Freeclimb::SignatureInformation.new(@request_header) end - describe '#is_request_time_valid' do - context 'request time is within tolerance threshold' do - it 'returns true' do - @time_calculation = DateTime.now.strftime('%s').to_i - @request_header = "t=#{@time_calculation},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" - @signature_information_object = Freeclimb::SignatureInformation.new(@request_header) - tolerance = 5 * 60 - expect(@signature_information_object.is_request_time_valid(tolerance)).to be true - end + describe "#is_request_time_valid" do + context "request time is within tolerance threshold" do + it "returns true" do + @time_calculation = DateTime.now.strftime("%s").to_i + @request_header = "t=#{@time_calculation},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + @signature_information_object = Freeclimb::SignatureInformation.new(@request_header) + tolerance = 5 * 60 + expect(@signature_information_object.is_request_time_valid(tolerance)).to be true + end end - context 'request time is not within tolerance threshold' do - it 'returns false since it does not match condition of request time being within tolerance threshold' do - @time_calculation = DateTime.now.strftime('%s').to_i - (600 * 60) + context "request time is not within tolerance threshold" do + it "returns false since it does not match condition of request time being within tolerance threshold" do + @time_calculation = DateTime.now.strftime("%s").to_i - (600 * 60) @request_header = "t=#{@time_calculation},v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" @signature_information_object = Freeclimb::SignatureInformation.new(@request_header) tolerance = 500 * 60 @@ -26,16 +26,16 @@ end end end - describe '#is_signature_safe' do - context 'signingSecret exists in signature array' do - it 'returns true' do - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" - signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - expect(@signature_information_object.is_signature_safe(request_body, signing_secret)).to be true - end + describe "#is_signature_safe" do + context "signingSecret exists in signature array" do + it "returns true" do + request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" + expect(@signature_information_object.is_signature_safe(request_body, signing_secret)).to be true + end end - context 'signingSecret does not exists in signature array' do - it 'returns false since it does not match condition of signingSecret being within signature array' do + context "signingSecret does not exists in signature array" do + it "returns false since it does not match condition of signingSecret being within signature array" do request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794" expect(@signature_information_object.is_signature_safe(request_body, signing_secret)).to be false From 37b292a92747d62187cc4fbfdbbbe397931615b4 Mon Sep 17 00:00:00 2001 From: Ajevan M Date: Thu, 20 Feb 2025 16:48:23 -0500 Subject: [PATCH 2/4] Resolve dependabot issues --- Gemfile.lock | 6 +----- README.md | 8 ++++---- lib/freeclimb/version.rb | 2 +- package.json | 2 +- yarn.lock | 9 +++++++++ 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0ded2c33..ef1b5fae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - freeclimb (5.1.0) + freeclimb (5.1.1) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -103,8 +103,6 @@ GEM rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.4.0) - rubocop (~> 1.61) ruby-progressbar (1.13.0) securerandom (0.4.1) standard (1.45.0) @@ -151,8 +149,6 @@ DEPENDENCIES pry-byebug rake (~> 13.0.6) rspec (~> 3.6, >= 3.6.0) - rubocop (~> 1.71.1) - rubocop-rspec standard webmock (~> 3.14) diff --git a/README.md b/README.md index d0768554..9de371b4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 5.1.0 +- Package version: 5.1.1 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) @@ -15,7 +15,7 @@ For more information, please visit [https://www.freeclimb.com/support/](https:// Add this to the Gemfile: - gem 'freeclimb', '~> 5.1.0' + gem 'freeclimb', '~> 5.1.1' and run from your terminal @@ -44,9 +44,9 @@ gem build freeclimb.gemspec Then either install the gem locally: ```shell -gem install ./freeclimb-5.1.0.gem +gem install ./freeclimb-5.1.1.gem ``` -(for development, run `gem install --dev ./freeclimb-5.1.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./freeclimb-5.1.1.gem` to install the development dependencies) ## Getting Started diff --git a/lib/freeclimb/version.rb b/lib/freeclimb/version.rb index 901c27a1..cc3da049 100644 --- a/lib/freeclimb/version.rb +++ b/lib/freeclimb/version.rb @@ -9,5 +9,5 @@ # module Freeclimb - VERSION = "5.1.0" + VERSION = "5.1.1" end diff --git a/package.json b/package.json index 89ae542f..fbb48549 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "dependencies": { "@stoplight/prism-cli": "5.6.0", "fast-xml-parser": "^4.5.0", - "jsonpath-plus": "^10.0.0" + "jsonpath-plus": "^10.3.0" }, "resolutions": { "@stoplight/json": "3.20.0", diff --git a/yarn.lock b/yarn.lock index 05c53766..d3626ee0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -792,6 +792,15 @@ jsonpath-plus@^10.0.0, jsonpath-plus@^10.1.0, jsonpath-plus@^7.2.0: "@jsep-plugin/regex" "^1.0.4" jsep "^1.4.0" +jsonpath-plus@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz#59e22e4fa2298c68dfcd70659bb47f0cad525238" + integrity sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA== + dependencies: + "@jsep-plugin/assignment" "^1.3.0" + "@jsep-plugin/regex" "^1.0.4" + jsep "^1.4.0" + liquid-json@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/liquid-json/-/liquid-json-0.3.1.tgz#9155a18136d8a6b2615e5f16f9a2448ab6b50eea" From 2266c07c4c20a384b47fc2c66c59d089e1dd68f1 Mon Sep 17 00:00:00 2001 From: Ajevan M Date: Thu, 20 Feb 2025 16:49:48 -0500 Subject: [PATCH 3/4] Add new changelog entry --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ff0e58..582ce567 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm None + + +## [5.1.1] - 2025-02-18 + +### Changed + +- Make statusCallbackURL property mandatory for CreateConference +- Introduce standard gem package for formatting our Ruby SDK files + ## [5.1.0] - 2025-02-05 @@ -16,7 +25,6 @@ None ### Added - CampaignTFN and MessageResultsAllOfTfn models -- Introduce standard gem package for formatting our Ruby SDK files From 18c05c389f42844f1c10ceee626d7427c0410afc Mon Sep 17 00:00:00 2001 From: Ajevan M Date: Fri, 21 Feb 2025 16:46:05 -0500 Subject: [PATCH 4/4] Bump Ruby SDK version up --- CHANGELOG.md | 2 +- Gemfile.lock | 2 +- README.md | 8 ++++---- lib/freeclimb/version.rb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 582ce567..03166845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ None -## [5.1.1] - 2025-02-18 +## [5.2.0] - 2025-02-18 ### Changed diff --git a/Gemfile.lock b/Gemfile.lock index ef1b5fae..7467e10c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - freeclimb (5.1.1) + freeclimb (5.2.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 9de371b4..48f5cf4e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 5.1.1 +- Package version: 5.2.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) @@ -15,7 +15,7 @@ For more information, please visit [https://www.freeclimb.com/support/](https:// Add this to the Gemfile: - gem 'freeclimb', '~> 5.1.1' + gem 'freeclimb', '~> 5.2.0' and run from your terminal @@ -44,9 +44,9 @@ gem build freeclimb.gemspec Then either install the gem locally: ```shell -gem install ./freeclimb-5.1.1.gem +gem install ./freeclimb-5.2.0.gem ``` -(for development, run `gem install --dev ./freeclimb-5.1.1.gem` to install the development dependencies) +(for development, run `gem install --dev ./freeclimb-5.2.0.gem` to install the development dependencies) ## Getting Started diff --git a/lib/freeclimb/version.rb b/lib/freeclimb/version.rb index cc3da049..5b36a834 100644 --- a/lib/freeclimb/version.rb +++ b/lib/freeclimb/version.rb @@ -9,5 +9,5 @@ # module Freeclimb - VERSION = "5.1.1" + VERSION = "5.2.0" end