From e96a8c1447fa3ace5ccbd8a46df6161f7c58e306 Mon Sep 17 00:00:00 2001 From: Ajevan M Date: Wed, 24 Jul 2024 14:48:52 -0500 Subject: [PATCH] Fix test files and SDK file auto-generation --- .openapi-generator/FILES | 8 +- Gemfile.lock | 2 +- README.md | 11 +- docs/SMSTenDLCCampaign.md | 2 +- docs/TranscribeUtterance.md | 2 +- docs/TranscribeUtteranceAllOf.md | 28 ++ docs/TranscribeUtteranceAllOfRecord.md | 22 + lib/freeclimb.rb | 5 +- lib/freeclimb/models/account_request.rb | 1 + lib/freeclimb/models/account_result.rb | 1 + lib/freeclimb/models/account_result_all_of.rb | 1 + lib/freeclimb/models/add_to_conference.rb | 1 + .../models/add_to_conference_all_of.rb | 1 + lib/freeclimb/models/application_list.rb | 1 + .../models/application_list_all_of.rb | 1 + lib/freeclimb/models/application_request.rb | 1 + lib/freeclimb/models/application_result.rb | 1 + .../models/application_result_all_of.rb | 1 + lib/freeclimb/models/available_number.rb | 1 + lib/freeclimb/models/available_number_list.rb | 1 + .../models/available_number_list_all_of.rb | 1 + .../models/buy_incoming_number_request.rb | 1 + lib/freeclimb/models/call_list.rb | 1 + lib/freeclimb/models/call_list_all_of.rb | 1 + lib/freeclimb/models/call_result.rb | 1 + lib/freeclimb/models/call_result_all_of.rb | 1 + lib/freeclimb/models/capabilities.rb | 1 + lib/freeclimb/models/conference_list.rb | 1 + .../models/conference_list_all_of.rb | 1 + .../models/conference_participant_list.rb | 1 + .../conference_participant_list_all_of.rb | 1 + .../models/conference_participant_result.rb | 1 + .../conference_participant_result_all_of.rb | 1 + lib/freeclimb/models/conference_result.rb | 1 + .../models/conference_result_all_of.rb | 1 + lib/freeclimb/models/create_conference.rb | 1 + .../models/create_conference_all_of.rb | 1 + .../models/create_conference_request.rb | 1 + lib/freeclimb/models/create_web_rtc_token.rb | 1 + lib/freeclimb/models/dequeue.rb | 2 + lib/freeclimb/models/enqueue.rb | 1 + lib/freeclimb/models/enqueue_all_of.rb | 1 + lib/freeclimb/models/filter_logs_request.rb | 1 + lib/freeclimb/models/get_digits.rb | 1 + lib/freeclimb/models/get_digits_all_of.rb | 1 + lib/freeclimb/models/get_speech.rb | 1 + lib/freeclimb/models/get_speech_all_of.rb | 1 + lib/freeclimb/models/hangup.rb | 1 + lib/freeclimb/models/hangup_all_of.rb | 1 + lib/freeclimb/models/incoming_number_list.rb | 1 + .../models/incoming_number_list_all_of.rb | 1 + .../models/incoming_number_request.rb | 1 + .../models/incoming_number_result.rb | 1 + .../models/incoming_number_result_all_of.rb | 1 + lib/freeclimb/models/log_list.rb | 1 + lib/freeclimb/models/log_list_all_of.rb | 1 + lib/freeclimb/models/log_result.rb | 1 + lib/freeclimb/models/make_call_request.rb | 1 + lib/freeclimb/models/message_request.rb | 1 + .../models/message_request_all_of.rb | 1 + lib/freeclimb/models/message_result.rb | 1 + lib/freeclimb/models/message_result_all_of.rb | 1 + lib/freeclimb/models/messages_list.rb | 1 + lib/freeclimb/models/messages_list_all_of.rb | 1 + .../models/mutable_resource_model.rb | 1 + lib/freeclimb/models/out_dial.rb | 1 + lib/freeclimb/models/out_dial_all_of.rb | 1 + lib/freeclimb/models/pagination_model.rb | 1 + lib/freeclimb/models/park.rb | 1 + lib/freeclimb/models/park_all_of.rb | 1 + lib/freeclimb/models/pause.rb | 1 + lib/freeclimb/models/pause_all_of.rb | 1 + lib/freeclimb/models/percl_command.rb | 1 + lib/freeclimb/models/percl_script.rb | 1 + lib/freeclimb/models/play.rb | 1 + lib/freeclimb/models/play_all_of.rb | 1 + lib/freeclimb/models/play_early_media.rb | 1 + .../models/play_early_media_all_of.rb | 1 + lib/freeclimb/models/queue_list.rb | 1 + lib/freeclimb/models/queue_list_all_of.rb | 1 + lib/freeclimb/models/queue_member.rb | 1 + lib/freeclimb/models/queue_member_list.rb | 1 + .../models/queue_member_list_all_of.rb | 1 + lib/freeclimb/models/queue_request.rb | 1 + lib/freeclimb/models/queue_result.rb | 1 + lib/freeclimb/models/queue_result_all_of.rb | 1 + lib/freeclimb/models/record_utterance.rb | 1 + .../models/record_utterance_all_of.rb | 1 + lib/freeclimb/models/recording_list.rb | 1 + lib/freeclimb/models/recording_list_all_of.rb | 1 + lib/freeclimb/models/recording_result.rb | 1 + .../models/recording_result_all_of.rb | 1 + lib/freeclimb/models/redirect.rb | 1 + lib/freeclimb/models/redirect_all_of.rb | 1 + lib/freeclimb/models/reject.rb | 1 + lib/freeclimb/models/reject_all_of.rb | 1 + .../models/remove_from_conference.rb | 2 + .../models/remove_from_conference_all_of.rb | 228 ---------- lib/freeclimb/models/say.rb | 1 + lib/freeclimb/models/say_all_of.rb | 1 + lib/freeclimb/models/send_digits.rb | 1 + lib/freeclimb/models/send_digits_all_of.rb | 1 + lib/freeclimb/models/set_listen.rb | 1 + lib/freeclimb/models/set_listen_all_of.rb | 1 + lib/freeclimb/models/set_talk.rb | 1 + lib/freeclimb/models/set_talk_all_of.rb | 1 + lib/freeclimb/models/sms.rb | 1 + lib/freeclimb/models/sms_all_of.rb | 1 + lib/freeclimb/models/sms_ten_dlc_brand.rb | 1 + .../models/sms_ten_dlc_brands_list_result.rb | 1 + .../sms_ten_dlc_brands_list_result_all_of.rb | 1 + lib/freeclimb/models/sms_ten_dlc_campaign.rb | 1 + .../sms_ten_dlc_campaigns_list_result.rb | 1 + ...ms_ten_dlc_campaigns_list_result_all_of.rb | 1 + .../models/sms_ten_dlc_partner_campaign.rb | 1 + .../sms_ten_dlc_partner_campaign_brand.rb | 1 + ...s_ten_dlc_partner_campaigns_list_result.rb | 1 + ...lc_partner_campaigns_list_result_all_of.rb | 1 + .../models/sms_toll_free_campaign.rb | 1 + .../sms_toll_free_campaigns_list_result.rb | 1 + ..._toll_free_campaigns_list_result_all_of.rb | 1 + lib/freeclimb/models/start_record_call.rb | 2 + lib/freeclimb/models/terminate_conference.rb | 2 + lib/freeclimb/models/tfn.rb | 1 + lib/freeclimb/models/transcribe_utterance.rb | 19 +- ...l_of.rb => transcribe_utterance_all_of.rb} | 92 +++- ... => transcribe_utterance_all_of_record.rb} | 7 +- lib/freeclimb/models/unpark.rb | 2 + lib/freeclimb/models/update_call_request.rb | 1 + .../update_conference_participant_request.rb | 1 + .../models/update_conference_request.rb | 1 + lib/freeclimb/version.rb | 2 +- openapi.json | 411 +++++------------- spec/api/default_api_spec.rb | 171 +++++--- spec/models/account_request_spec.rb | 34 +- spec/models/account_result_spec.rb | 132 +++--- spec/models/add_to_conference_spec.rb | 70 +-- spec/models/application_list_spec.rb | 262 ++++++----- spec/models/application_request_spec.rb | 59 +-- spec/models/application_result_spec.rb | 120 ++--- spec/models/available_number_list_spec.rb | 262 ++++++----- spec/models/available_number_spec.rb | 66 +-- .../buy_incoming_number_request_spec.rb | 40 +- spec/models/call_list_spec.rb | 262 ++++++----- spec/models/call_result_spec.rb | 245 +++++------ spec/models/capabilities_spec.rb | 54 +-- spec/models/conference_list_spec.rb | 262 ++++++----- .../conference_participant_list_spec.rb | 262 ++++++----- .../conference_participant_result_spec.rb | 105 ++--- spec/models/conference_result_spec.rb | 147 +++---- spec/models/create_conference_request_spec.rb | 60 +-- spec/models/create_conference_spec.rb | 66 +-- spec/models/create_web_rtc_token_spec.rb | 74 +--- spec/models/enqueue_spec.rb | 47 +- spec/models/filter_logs_request_spec.rb | 30 +- spec/models/get_digits_spec.rb | 206 ++++----- spec/models/get_speech_spec.rb | 248 +++++------ spec/models/hangup_spec.rb | 29 +- spec/models/incoming_number_list_spec.rb | 262 ++++++----- spec/models/incoming_number_request_spec.rb | 39 +- spec/models/incoming_number_result_spec.rb | 154 +++---- spec/models/log_list_spec.rb | 262 ++++++----- spec/models/log_result_spec.rb | 101 ++--- spec/models/make_call_request_spec.rb | 107 ++--- spec/models/message_request_spec.rb | 104 ++--- spec/models/message_result_spec.rb | 152 +++---- spec/models/messages_list_spec.rb | 262 ++++++----- spec/models/mutable_resource_model_spec.rb | 75 +--- spec/models/out_dial_spec.rb | 120 ++--- spec/models/pagination_model_spec.rb | 245 +++++------ spec/models/park_spec.rb | 41 +- spec/models/pause_spec.rb | 61 +-- spec/models/percl_command_spec.rb | 29 +- spec/models/percl_script_spec.rb | 41 +- spec/models/play_early_media_spec.rb | 30 +- spec/models/play_spec.rb | 71 +-- spec/models/queue_list_spec.rb | 262 ++++++----- spec/models/queue_member_list_spec.rb | 262 ++++++----- spec/models/queue_member_spec.rb | 111 ++--- spec/models/queue_request_spec.rb | 65 +-- spec/models/queue_result_spec.rb | 203 ++++----- spec/models/record_utterance_spec.rb | 122 ++---- spec/models/recording_list_spec.rb | 262 ++++++----- spec/models/recording_result_spec.rb | 131 ++---- spec/models/redirect_spec.rb | 30 +- spec/models/reject_spec.rb | 29 +- spec/models/remove_from_conference_spec.rb | 11 + spec/models/say_spec.rb | 76 +--- spec/models/send_digits_spec.rb | 71 +-- spec/models/set_listen_spec.rb | 29 +- spec/models/set_talk_spec.rb | 29 +- spec/models/sms_spec.rb | 47 +- spec/models/sms_ten_dlc_brand_spec.rb | 166 ++----- .../sms_ten_dlc_brands_list_result_spec.rb | 262 ++++++----- spec/models/sms_ten_dlc_campaign_spec.rb | 188 ++------ .../sms_ten_dlc_campaigns_list_result_spec.rb | 262 ++++++----- ...sms_ten_dlc_partner_campaign_brand_spec.rb | 101 ++--- .../sms_ten_dlc_partner_campaign_spec.rb | 167 ++----- ..._dlc_partner_campaigns_list_result_spec.rb | 262 ++++++----- spec/models/sms_toll_free_campaign_spec.rb | 96 +--- ...ms_toll_free_campaigns_list_result_spec.rb | 262 ++++++----- spec/models/terminate_conference_spec.rb | 11 + spec/models/tfn_spec.rb | 30 +- ...ranscribe_utterance_all_of_record_spec.rb} | 140 +++--- spec/models/transcribe_utterance_spec.rb | 168 ++----- spec/models/update_call_request_spec.rb | 41 +- ...ate_conference_participant_request_spec.rb | 34 +- spec/models/update_conference_request_spec.rb | 61 ++- 208 files changed, 3892 insertions(+), 6531 deletions(-) create mode 100644 docs/TranscribeUtteranceAllOf.md create mode 100644 docs/TranscribeUtteranceAllOfRecord.md delete mode 100644 lib/freeclimb/models/remove_from_conference_all_of.rb rename lib/freeclimb/models/{terminate_conference_all_of.rb => transcribe_utterance_all_of.rb} (69%) rename lib/freeclimb/models/{transcribe_utterance_record.rb => transcribe_utterance_all_of_record.rb} (97%) rename spec/models/{transcribe_utterance_record_spec.rb => transcribe_utterance_all_of_record_spec.rb} (55%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 2085948c..eafc4093 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -139,7 +139,8 @@ docs/StartRecordCall.md docs/TFN.md docs/TerminateConference.md docs/TranscribeUtterance.md -docs/TranscribeUtteranceRecord.md +docs/TranscribeUtteranceAllOf.md +docs/TranscribeUtteranceAllOfRecord.md docs/Unpark.md docs/UpdateCallRequest.md docs/UpdateCallRequestStatus.md @@ -287,7 +288,8 @@ lib/freeclimb/models/start_record_call.rb lib/freeclimb/models/terminate_conference.rb lib/freeclimb/models/tfn.rb lib/freeclimb/models/transcribe_utterance.rb -lib/freeclimb/models/transcribe_utterance_record.rb +lib/freeclimb/models/transcribe_utterance_all_of.rb +lib/freeclimb/models/transcribe_utterance_all_of_record.rb lib/freeclimb/models/unpark.rb lib/freeclimb/models/update_call_request.rb lib/freeclimb/models/update_call_request_status.rb @@ -295,7 +297,7 @@ lib/freeclimb/models/update_conference_participant_request.rb lib/freeclimb/models/update_conference_request.rb lib/freeclimb/models/update_conference_request_status.rb lib/freeclimb/version.rb +spec/api/default_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/create_web_rtc_token_spec.rb spec/spec_helper.rb diff --git a/Gemfile.lock b/Gemfile.lock index b9c0bd22..27587f0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - freeclimb (4.6.0) + freeclimb (4.6.1) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 4c6b1e0d..3dfcf525 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: 4.6.0 +- Package version: 4.6.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', '~> 4.6.0' + gem 'freeclimb', '~> 4.6.1' and run from your terminal @@ -44,9 +44,9 @@ gem build freeclimb.gemspec Then either install the gem locally: ```shell -gem install ./freeclimb-4.6.0.gem +gem install ./freeclimb-4.6.1.gem ``` -(for development, run `gem install --dev ./freeclimb-4.6.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./freeclimb-4.6.1.gem` to install the development dependencies) ## Getting Started @@ -294,7 +294,8 @@ Class | Method | HTTP request | Description - [Freeclimb::TFN](docs/TFN.md) - [Freeclimb::TerminateConference](docs/TerminateConference.md) - [Freeclimb::TranscribeUtterance](docs/TranscribeUtterance.md) - - [Freeclimb::TranscribeUtteranceRecord](docs/TranscribeUtteranceRecord.md) + - [Freeclimb::TranscribeUtteranceAllOf](docs/TranscribeUtteranceAllOf.md) + - [Freeclimb::TranscribeUtteranceAllOfRecord](docs/TranscribeUtteranceAllOfRecord.md) - [Freeclimb::Unpark](docs/Unpark.md) - [Freeclimb::UpdateCallRequest](docs/UpdateCallRequest.md) - [Freeclimb::UpdateCallRequestStatus](docs/UpdateCallRequestStatus.md) diff --git a/docs/SMSTenDLCCampaign.md b/docs/SMSTenDLCCampaign.md index 2d18de4a..e620e5c9 100644 --- a/docs/SMSTenDLCCampaign.md +++ b/docs/SMSTenDLCCampaign.md @@ -82,7 +82,7 @@ instance = Freeclimb::SMSTenDLCCampaign.new( optout_message: null, reference_id: null, mock: null, - next_renewal_or_expiration_date: Fri Dec 31 19:00:00 EST 1999 + next_renewal_or_expiration_date: Fri Dec 31 18:00:00 CST 1999 ) ``` diff --git a/docs/TranscribeUtterance.md b/docs/TranscribeUtterance.md index 40994e60..c347306f 100644 --- a/docs/TranscribeUtterance.md +++ b/docs/TranscribeUtterance.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **action_url** | **String** | | | | **play_beep** | **Boolean** | | [optional][default to false] | -| **record** | [**TranscribeUtteranceRecord**](TranscribeUtteranceRecord.md) | | [optional] | +| **record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] | | **privacy_for_logging** | **Boolean** | | [optional][default to false] | | **privacy_for_recording** | **Boolean** | | [optional][default to false] | | **prompts** | **Array<Object>** | | [optional] | diff --git a/docs/TranscribeUtteranceAllOf.md b/docs/TranscribeUtteranceAllOf.md new file mode 100644 index 00000000..7d45c157 --- /dev/null +++ b/docs/TranscribeUtteranceAllOf.md @@ -0,0 +1,28 @@ +# Freeclimb::TranscribeUtteranceAllOf + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action_url** | **String** | | | +| **play_beep** | **Boolean** | | [optional][default to false] | +| **record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] | +| **privacy_for_logging** | **Boolean** | | [optional][default to false] | +| **privacy_for_recording** | **Boolean** | | [optional][default to false] | +| **prompts** | **Array<Object>** | | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::TranscribeUtteranceAllOf.new( + action_url: null, + play_beep: null, + record: null, + privacy_for_logging: null, + privacy_for_recording: null, + prompts: null +) +``` + diff --git a/docs/TranscribeUtteranceAllOfRecord.md b/docs/TranscribeUtteranceAllOfRecord.md new file mode 100644 index 00000000..313c2628 --- /dev/null +++ b/docs/TranscribeUtteranceAllOfRecord.md @@ -0,0 +1,22 @@ +# Freeclimb::TranscribeUtteranceAllOfRecord + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **save_recording** | **Boolean** | | [optional][default to false] | +| **max_length_sec** | **Integer** | | [optional][default to 60] | +| **rcrd_termination_silence_time_ms** | **Integer** | | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( + save_recording: null, + max_length_sec: null, + rcrd_termination_silence_time_ms: null +) +``` + diff --git a/lib/freeclimb.rb b/lib/freeclimb.rb index 063922d3..1b91627c 100644 --- a/lib/freeclimb.rb +++ b/lib/freeclimb.rb @@ -128,8 +128,8 @@ require 'freeclimb/models/set_talk_all_of' require 'freeclimb/models/sms_all_of' require 'freeclimb/models/tfn' -require 'freeclimb/models/transcribe_utterance' -require 'freeclimb/models/transcribe_utterance_record' +require 'freeclimb/models/transcribe_utterance_all_of' +require 'freeclimb/models/transcribe_utterance_all_of_record' require 'freeclimb/models/update_call_request' require 'freeclimb/models/update_call_request_status' require 'freeclimb/models/update_conference_participant_request' @@ -158,6 +158,7 @@ require 'freeclimb/models/sms' require 'freeclimb/models/start_record_call' require 'freeclimb/models/terminate_conference' +require 'freeclimb/models/transcribe_utterance' require 'freeclimb/models/unpark' # APIs diff --git a/lib/freeclimb/models/account_request.rb b/lib/freeclimb/models/account_request.rb index bd82c125..75d8312d 100644 --- a/lib/freeclimb/models/account_request.rb +++ b/lib/freeclimb/models/account_request.rb @@ -90,6 +90,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/account_result.rb b/lib/freeclimb/models/account_result.rb index 916a4f28..8b76bfc7 100644 --- a/lib/freeclimb/models/account_result.rb +++ b/lib/freeclimb/models/account_result.rb @@ -188,6 +188,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/account_result_all_of.rb b/lib/freeclimb/models/account_result_all_of.rb index 36eced8c..8ebfed6f 100644 --- a/lib/freeclimb/models/account_result_all_of.rb +++ b/lib/freeclimb/models/account_result_all_of.rb @@ -138,6 +138,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/add_to_conference.rb b/lib/freeclimb/models/add_to_conference.rb index d2118c91..08d5353f 100644 --- a/lib/freeclimb/models/add_to_conference.rb +++ b/lib/freeclimb/models/add_to_conference.rb @@ -184,6 +184,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/add_to_conference_all_of.rb b/lib/freeclimb/models/add_to_conference_all_of.rb index 5638674e..76afd942 100644 --- a/lib/freeclimb/models/add_to_conference_all_of.rb +++ b/lib/freeclimb/models/add_to_conference_all_of.rb @@ -171,6 +171,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/application_list.rb b/lib/freeclimb/models/application_list.rb index 6e0fb86d..8240262c 100644 --- a/lib/freeclimb/models/application_list.rb +++ b/lib/freeclimb/models/application_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/application_list_all_of.rb b/lib/freeclimb/models/application_list_all_of.rb index 73eb5c15..1b1283e8 100644 --- a/lib/freeclimb/models/application_list_all_of.rb +++ b/lib/freeclimb/models/application_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/application_request.rb b/lib/freeclimb/models/application_request.rb index da3f7b45..ef6a7631 100644 --- a/lib/freeclimb/models/application_request.rb +++ b/lib/freeclimb/models/application_request.rb @@ -139,6 +139,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/application_result.rb b/lib/freeclimb/models/application_result.rb index 6afaaec0..b56fd152 100644 --- a/lib/freeclimb/models/application_result.rb +++ b/lib/freeclimb/models/application_result.rb @@ -210,6 +210,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/application_result_all_of.rb b/lib/freeclimb/models/application_result_all_of.rb index 6edfdaa5..a1608fa7 100644 --- a/lib/freeclimb/models/application_result_all_of.rb +++ b/lib/freeclimb/models/application_result_all_of.rb @@ -160,6 +160,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/available_number.rb b/lib/freeclimb/models/available_number.rb index ada71237..71601067 100644 --- a/lib/freeclimb/models/available_number.rb +++ b/lib/freeclimb/models/available_number.rb @@ -138,6 +138,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/available_number_list.rb b/lib/freeclimb/models/available_number_list.rb index ef23e043..57bdfd25 100644 --- a/lib/freeclimb/models/available_number_list.rb +++ b/lib/freeclimb/models/available_number_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/available_number_list_all_of.rb b/lib/freeclimb/models/available_number_list_all_of.rb index 5f02a7b9..9e0ee366 100644 --- a/lib/freeclimb/models/available_number_list_all_of.rb +++ b/lib/freeclimb/models/available_number_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/buy_incoming_number_request.rb b/lib/freeclimb/models/buy_incoming_number_request.rb index 66522fe6..0f360e9b 100644 --- a/lib/freeclimb/models/buy_incoming_number_request.rb +++ b/lib/freeclimb/models/buy_incoming_number_request.rb @@ -105,6 +105,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/call_list.rb b/lib/freeclimb/models/call_list.rb index d75fd522..1e0b9480 100644 --- a/lib/freeclimb/models/call_list.rb +++ b/lib/freeclimb/models/call_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/call_list_all_of.rb b/lib/freeclimb/models/call_list_all_of.rb index 0b5d1cfe..ba559786 100644 --- a/lib/freeclimb/models/call_list_all_of.rb +++ b/lib/freeclimb/models/call_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/call_result.rb b/lib/freeclimb/models/call_result.rb index a6ce4399..888be49c 100644 --- a/lib/freeclimb/models/call_result.rb +++ b/lib/freeclimb/models/call_result.rb @@ -267,6 +267,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/call_result_all_of.rb b/lib/freeclimb/models/call_result_all_of.rb index 9ce787a2..98a79be2 100644 --- a/lib/freeclimb/models/call_result_all_of.rb +++ b/lib/freeclimb/models/call_result_all_of.rb @@ -217,6 +217,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/capabilities.rb b/lib/freeclimb/models/capabilities.rb index a2b8988d..e0227b8e 100644 --- a/lib/freeclimb/models/capabilities.rb +++ b/lib/freeclimb/models/capabilities.rb @@ -121,6 +121,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_list.rb b/lib/freeclimb/models/conference_list.rb index 1eb1ac36..098c1dc2 100644 --- a/lib/freeclimb/models/conference_list.rb +++ b/lib/freeclimb/models/conference_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_list_all_of.rb b/lib/freeclimb/models/conference_list_all_of.rb index a2680ed0..62373eaf 100644 --- a/lib/freeclimb/models/conference_list_all_of.rb +++ b/lib/freeclimb/models/conference_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_participant_list.rb b/lib/freeclimb/models/conference_participant_list.rb index a137067f..59216bc1 100644 --- a/lib/freeclimb/models/conference_participant_list.rb +++ b/lib/freeclimb/models/conference_participant_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_participant_list_all_of.rb b/lib/freeclimb/models/conference_participant_list_all_of.rb index 7c8812f7..5375572f 100644 --- a/lib/freeclimb/models/conference_participant_list_all_of.rb +++ b/lib/freeclimb/models/conference_participant_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_participant_result.rb b/lib/freeclimb/models/conference_participant_result.rb index 0eb5255f..ea737173 100644 --- a/lib/freeclimb/models/conference_participant_result.rb +++ b/lib/freeclimb/models/conference_participant_result.rb @@ -180,6 +180,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_participant_result_all_of.rb b/lib/freeclimb/models/conference_participant_result_all_of.rb index 7c52cab9..9a7f17d5 100644 --- a/lib/freeclimb/models/conference_participant_result_all_of.rb +++ b/lib/freeclimb/models/conference_participant_result_all_of.rb @@ -130,6 +130,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_result.rb b/lib/freeclimb/models/conference_result.rb index a12421fa..0e87e23e 100644 --- a/lib/freeclimb/models/conference_result.rb +++ b/lib/freeclimb/models/conference_result.rb @@ -220,6 +220,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/conference_result_all_of.rb b/lib/freeclimb/models/conference_result_all_of.rb index f2521746..8aacc2db 100644 --- a/lib/freeclimb/models/conference_result_all_of.rb +++ b/lib/freeclimb/models/conference_result_all_of.rb @@ -170,6 +170,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/create_conference.rb b/lib/freeclimb/models/create_conference.rb index c0aa661d..f7d989fd 100644 --- a/lib/freeclimb/models/create_conference.rb +++ b/lib/freeclimb/models/create_conference.rb @@ -151,6 +151,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/create_conference_all_of.rb b/lib/freeclimb/models/create_conference_all_of.rb index 69aeec69..d49f1b58 100644 --- a/lib/freeclimb/models/create_conference_all_of.rb +++ b/lib/freeclimb/models/create_conference_all_of.rb @@ -138,6 +138,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/create_conference_request.rb b/lib/freeclimb/models/create_conference_request.rb index 75c525b2..09235b51 100644 --- a/lib/freeclimb/models/create_conference_request.rb +++ b/lib/freeclimb/models/create_conference_request.rb @@ -123,6 +123,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/create_web_rtc_token.rb b/lib/freeclimb/models/create_web_rtc_token.rb index 139b7bbd..6643733c 100644 --- a/lib/freeclimb/models/create_web_rtc_token.rb +++ b/lib/freeclimb/models/create_web_rtc_token.rb @@ -117,6 +117,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method with validation diff --git a/lib/freeclimb/models/dequeue.rb b/lib/freeclimb/models/dequeue.rb index c2a64cf1..d1b55e69 100644 --- a/lib/freeclimb/models/dequeue.rb +++ b/lib/freeclimb/models/dequeue.rb @@ -77,6 +77,8 @@ def list_invalid_properties # @return true if the model is valid def valid? + + true end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/enqueue.rb b/lib/freeclimb/models/enqueue.rb index 994884c1..5871ba54 100644 --- a/lib/freeclimb/models/enqueue.rb +++ b/lib/freeclimb/models/enqueue.rb @@ -137,6 +137,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/enqueue_all_of.rb b/lib/freeclimb/models/enqueue_all_of.rb index 3cb4406f..8d301125 100644 --- a/lib/freeclimb/models/enqueue_all_of.rb +++ b/lib/freeclimb/models/enqueue_all_of.rb @@ -124,6 +124,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/filter_logs_request.rb b/lib/freeclimb/models/filter_logs_request.rb index 79dd31aa..66c121bc 100644 --- a/lib/freeclimb/models/filter_logs_request.rb +++ b/lib/freeclimb/models/filter_logs_request.rb @@ -83,6 +83,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/get_digits.rb b/lib/freeclimb/models/get_digits.rb index cfe4bb5f..b60b023b 100644 --- a/lib/freeclimb/models/get_digits.rb +++ b/lib/freeclimb/models/get_digits.rb @@ -186,6 +186,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/get_digits_all_of.rb b/lib/freeclimb/models/get_digits_all_of.rb index 313871f6..cb684715 100644 --- a/lib/freeclimb/models/get_digits_all_of.rb +++ b/lib/freeclimb/models/get_digits_all_of.rb @@ -173,6 +173,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/get_speech.rb b/lib/freeclimb/models/get_speech.rb index 3eded7d1..577b778a 100644 --- a/lib/freeclimb/models/get_speech.rb +++ b/lib/freeclimb/models/get_speech.rb @@ -232,6 +232,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/get_speech_all_of.rb b/lib/freeclimb/models/get_speech_all_of.rb index 04656502..8e7821a1 100644 --- a/lib/freeclimb/models/get_speech_all_of.rb +++ b/lib/freeclimb/models/get_speech_all_of.rb @@ -219,6 +219,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/hangup.rb b/lib/freeclimb/models/hangup.rb index fd97add0..1844d5d8 100644 --- a/lib/freeclimb/models/hangup.rb +++ b/lib/freeclimb/models/hangup.rb @@ -92,6 +92,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/hangup_all_of.rb b/lib/freeclimb/models/hangup_all_of.rb index 6c4ffeb0..d4a51e77 100644 --- a/lib/freeclimb/models/hangup_all_of.rb +++ b/lib/freeclimb/models/hangup_all_of.rb @@ -79,6 +79,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/incoming_number_list.rb b/lib/freeclimb/models/incoming_number_list.rb index 6a2ca6dc..4a8b6b0f 100644 --- a/lib/freeclimb/models/incoming_number_list.rb +++ b/lib/freeclimb/models/incoming_number_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/incoming_number_list_all_of.rb b/lib/freeclimb/models/incoming_number_list_all_of.rb index d1917d39..59f7f54f 100644 --- a/lib/freeclimb/models/incoming_number_list_all_of.rb +++ b/lib/freeclimb/models/incoming_number_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/incoming_number_request.rb b/lib/freeclimb/models/incoming_number_request.rb index 7324a547..6233cc60 100644 --- a/lib/freeclimb/models/incoming_number_request.rb +++ b/lib/freeclimb/models/incoming_number_request.rb @@ -100,6 +100,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/incoming_number_result.rb b/lib/freeclimb/models/incoming_number_result.rb index 3ec76e6a..fd4c6303 100644 --- a/lib/freeclimb/models/incoming_number_result.rb +++ b/lib/freeclimb/models/incoming_number_result.rb @@ -250,6 +250,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/incoming_number_result_all_of.rb b/lib/freeclimb/models/incoming_number_result_all_of.rb index 583d7555..32ba4326 100644 --- a/lib/freeclimb/models/incoming_number_result_all_of.rb +++ b/lib/freeclimb/models/incoming_number_result_all_of.rb @@ -198,6 +198,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/log_list.rb b/lib/freeclimb/models/log_list.rb index a4a762cf..0b403724 100644 --- a/lib/freeclimb/models/log_list.rb +++ b/lib/freeclimb/models/log_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/log_list_all_of.rb b/lib/freeclimb/models/log_list_all_of.rb index 488b3134..4a6fb8b2 100644 --- a/lib/freeclimb/models/log_list_all_of.rb +++ b/lib/freeclimb/models/log_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/log_result.rb b/lib/freeclimb/models/log_result.rb index b2c2106c..28e1274c 100644 --- a/lib/freeclimb/models/log_result.rb +++ b/lib/freeclimb/models/log_result.rb @@ -139,6 +139,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/make_call_request.rb b/lib/freeclimb/models/make_call_request.rb index da54430e..b558a75f 100644 --- a/lib/freeclimb/models/make_call_request.rb +++ b/lib/freeclimb/models/make_call_request.rb @@ -188,6 +188,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/message_request.rb b/lib/freeclimb/models/message_request.rb index d13fa881..a916a2c5 100644 --- a/lib/freeclimb/models/message_request.rb +++ b/lib/freeclimb/models/message_request.rb @@ -189,6 +189,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/message_request_all_of.rb b/lib/freeclimb/models/message_request_all_of.rb index db9b54ef..6bb66729 100644 --- a/lib/freeclimb/models/message_request_all_of.rb +++ b/lib/freeclimb/models/message_request_all_of.rb @@ -137,6 +137,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/message_result.rb b/lib/freeclimb/models/message_result.rb index 39a71439..94ed0b7d 100644 --- a/lib/freeclimb/models/message_result.rb +++ b/lib/freeclimb/models/message_result.rb @@ -242,6 +242,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/message_result_all_of.rb b/lib/freeclimb/models/message_result_all_of.rb index 1814d418..4eee8dd1 100644 --- a/lib/freeclimb/models/message_result_all_of.rb +++ b/lib/freeclimb/models/message_result_all_of.rb @@ -192,6 +192,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/messages_list.rb b/lib/freeclimb/models/messages_list.rb index d842ce47..259aaa74 100644 --- a/lib/freeclimb/models/messages_list.rb +++ b/lib/freeclimb/models/messages_list.rb @@ -160,6 +160,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/messages_list_all_of.rb b/lib/freeclimb/models/messages_list_all_of.rb index 8ebeb875..7fb6d361 100644 --- a/lib/freeclimb/models/messages_list_all_of.rb +++ b/lib/freeclimb/models/messages_list_all_of.rb @@ -82,6 +82,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/mutable_resource_model.rb b/lib/freeclimb/models/mutable_resource_model.rb index 87805804..8b19d2ac 100644 --- a/lib/freeclimb/models/mutable_resource_model.rb +++ b/lib/freeclimb/models/mutable_resource_model.rb @@ -112,6 +112,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/out_dial.rb b/lib/freeclimb/models/out_dial.rb index cd3adacd..189c9f40 100644 --- a/lib/freeclimb/models/out_dial.rb +++ b/lib/freeclimb/models/out_dial.rb @@ -206,6 +206,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/out_dial_all_of.rb b/lib/freeclimb/models/out_dial_all_of.rb index da4cbc79..ef721bd0 100644 --- a/lib/freeclimb/models/out_dial_all_of.rb +++ b/lib/freeclimb/models/out_dial_all_of.rb @@ -193,6 +193,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/pagination_model.rb b/lib/freeclimb/models/pagination_model.rb index 846c132d..45c6170f 100644 --- a/lib/freeclimb/models/pagination_model.rb +++ b/lib/freeclimb/models/pagination_model.rb @@ -140,6 +140,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/park.rb b/lib/freeclimb/models/park.rb index f1017e5b..25d50aaa 100644 --- a/lib/freeclimb/models/park.rb +++ b/lib/freeclimb/models/park.rb @@ -122,6 +122,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/park_all_of.rb b/lib/freeclimb/models/park_all_of.rb index dc0dae32..5411e754 100644 --- a/lib/freeclimb/models/park_all_of.rb +++ b/lib/freeclimb/models/park_all_of.rb @@ -109,6 +109,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/pause.rb b/lib/freeclimb/models/pause.rb index fd09d944..feee416e 100644 --- a/lib/freeclimb/models/pause.rb +++ b/lib/freeclimb/models/pause.rb @@ -96,6 +96,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/pause_all_of.rb b/lib/freeclimb/models/pause_all_of.rb index a840e8b3..0df54f27 100644 --- a/lib/freeclimb/models/pause_all_of.rb +++ b/lib/freeclimb/models/pause_all_of.rb @@ -83,6 +83,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/percl_command.rb b/lib/freeclimb/models/percl_command.rb index da72d63e..6544034a 100644 --- a/lib/freeclimb/models/percl_command.rb +++ b/lib/freeclimb/models/percl_command.rb @@ -85,6 +85,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/percl_script.rb b/lib/freeclimb/models/percl_script.rb index 3d72ca35..ba04ad0b 100644 --- a/lib/freeclimb/models/percl_script.rb +++ b/lib/freeclimb/models/percl_script.rb @@ -82,6 +82,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/play.rb b/lib/freeclimb/models/play.rb index 5237afa9..5356ecf6 100644 --- a/lib/freeclimb/models/play.rb +++ b/lib/freeclimb/models/play.rb @@ -118,6 +118,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/play_all_of.rb b/lib/freeclimb/models/play_all_of.rb index 795e130c..c1968d07 100644 --- a/lib/freeclimb/models/play_all_of.rb +++ b/lib/freeclimb/models/play_all_of.rb @@ -105,6 +105,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/play_early_media.rb b/lib/freeclimb/models/play_early_media.rb index f49f1854..16a26aca 100644 --- a/lib/freeclimb/models/play_early_media.rb +++ b/lib/freeclimb/models/play_early_media.rb @@ -96,6 +96,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/play_early_media_all_of.rb b/lib/freeclimb/models/play_early_media_all_of.rb index 1ccb5981..996ec75a 100644 --- a/lib/freeclimb/models/play_early_media_all_of.rb +++ b/lib/freeclimb/models/play_early_media_all_of.rb @@ -83,6 +83,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_list.rb b/lib/freeclimb/models/queue_list.rb index 864af1e4..93029861 100644 --- a/lib/freeclimb/models/queue_list.rb +++ b/lib/freeclimb/models/queue_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_list_all_of.rb b/lib/freeclimb/models/queue_list_all_of.rb index d901fd8c..b3bae50a 100644 --- a/lib/freeclimb/models/queue_list_all_of.rb +++ b/lib/freeclimb/models/queue_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_member.rb b/lib/freeclimb/models/queue_member.rb index f6c8319e..eab2d67b 100644 --- a/lib/freeclimb/models/queue_member.rb +++ b/lib/freeclimb/models/queue_member.rb @@ -120,6 +120,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_member_list.rb b/lib/freeclimb/models/queue_member_list.rb index 13dd8320..07c18205 100644 --- a/lib/freeclimb/models/queue_member_list.rb +++ b/lib/freeclimb/models/queue_member_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_member_list_all_of.rb b/lib/freeclimb/models/queue_member_list_all_of.rb index c3d7c319..bddf3d9b 100644 --- a/lib/freeclimb/models/queue_member_list_all_of.rb +++ b/lib/freeclimb/models/queue_member_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_request.rb b/lib/freeclimb/models/queue_request.rb index 961765a8..80bf09da 100644 --- a/lib/freeclimb/models/queue_request.rb +++ b/lib/freeclimb/models/queue_request.rb @@ -92,6 +92,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_result.rb b/lib/freeclimb/models/queue_result.rb index ec2e32b8..610c7946 100644 --- a/lib/freeclimb/models/queue_result.rb +++ b/lib/freeclimb/models/queue_result.rb @@ -190,6 +190,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/queue_result_all_of.rb b/lib/freeclimb/models/queue_result_all_of.rb index 78f80be5..ce0245cf 100644 --- a/lib/freeclimb/models/queue_result_all_of.rb +++ b/lib/freeclimb/models/queue_result_all_of.rb @@ -140,6 +140,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/record_utterance.rb b/lib/freeclimb/models/record_utterance.rb index 0aa77d5f..22092b3b 100644 --- a/lib/freeclimb/models/record_utterance.rb +++ b/lib/freeclimb/models/record_utterance.rb @@ -162,6 +162,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/record_utterance_all_of.rb b/lib/freeclimb/models/record_utterance_all_of.rb index 49a39bbb..7aa37aa6 100644 --- a/lib/freeclimb/models/record_utterance_all_of.rb +++ b/lib/freeclimb/models/record_utterance_all_of.rb @@ -149,6 +149,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/recording_list.rb b/lib/freeclimb/models/recording_list.rb index 39e09a50..e43e4f67 100644 --- a/lib/freeclimb/models/recording_list.rb +++ b/lib/freeclimb/models/recording_list.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/recording_list_all_of.rb b/lib/freeclimb/models/recording_list_all_of.rb index d837a501..731e8557 100644 --- a/lib/freeclimb/models/recording_list_all_of.rb +++ b/lib/freeclimb/models/recording_list_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/recording_result.rb b/lib/freeclimb/models/recording_result.rb index b93da0b8..76d7b7c8 100644 --- a/lib/freeclimb/models/recording_result.rb +++ b/lib/freeclimb/models/recording_result.rb @@ -170,6 +170,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/recording_result_all_of.rb b/lib/freeclimb/models/recording_result_all_of.rb index f8964bf3..d535b614 100644 --- a/lib/freeclimb/models/recording_result_all_of.rb +++ b/lib/freeclimb/models/recording_result_all_of.rb @@ -120,6 +120,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/redirect.rb b/lib/freeclimb/models/redirect.rb index 5a14fa77..85407d5a 100644 --- a/lib/freeclimb/models/redirect.rb +++ b/lib/freeclimb/models/redirect.rb @@ -96,6 +96,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/redirect_all_of.rb b/lib/freeclimb/models/redirect_all_of.rb index 744960bd..34b02242 100644 --- a/lib/freeclimb/models/redirect_all_of.rb +++ b/lib/freeclimb/models/redirect_all_of.rb @@ -83,6 +83,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/reject.rb b/lib/freeclimb/models/reject.rb index 4dfff91c..752e3e42 100644 --- a/lib/freeclimb/models/reject.rb +++ b/lib/freeclimb/models/reject.rb @@ -92,6 +92,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/reject_all_of.rb b/lib/freeclimb/models/reject_all_of.rb index 5e4abf74..abcfd3e0 100644 --- a/lib/freeclimb/models/reject_all_of.rb +++ b/lib/freeclimb/models/reject_all_of.rb @@ -79,6 +79,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/remove_from_conference.rb b/lib/freeclimb/models/remove_from_conference.rb index 320a9e6b..634c9ab9 100644 --- a/lib/freeclimb/models/remove_from_conference.rb +++ b/lib/freeclimb/models/remove_from_conference.rb @@ -77,6 +77,8 @@ def list_invalid_properties # @return true if the model is valid def valid? + + true end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/remove_from_conference_all_of.rb b/lib/freeclimb/models/remove_from_conference_all_of.rb deleted file mode 100644 index 50b8da3a..00000000 --- a/lib/freeclimb/models/remove_from_conference_all_of.rb +++ /dev/null @@ -1,228 +0,0 @@ -=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 'date' -require 'time' - -module Freeclimb - class RemoveFromConferenceAllOf - # ID of the Call leg to be removed from the Conference. The Call must be in a Conference or an error will be triggered. - attr_accessor :call_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'call_id' => :'callId' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'call_id' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::RemoveFromConferenceAllOf` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::RemoveFromConferenceAllOf`. 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?(:'call_id') - self.call_id = attributes[:'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 = Array.new - if @call_id.nil? - invalid_properties.push('invalid value for "call_id", call_id 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 @call_id.nil? - false - else - 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 && - call_id == o.call_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [call_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Freeclimb.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/freeclimb/models/say.rb b/lib/freeclimb/models/say.rb index c550cf4e..b054a2ee 100644 --- a/lib/freeclimb/models/say.rb +++ b/lib/freeclimb/models/say.rb @@ -131,6 +131,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/say_all_of.rb b/lib/freeclimb/models/say_all_of.rb index 2067a509..3142164b 100644 --- a/lib/freeclimb/models/say_all_of.rb +++ b/lib/freeclimb/models/say_all_of.rb @@ -118,6 +118,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/send_digits.rb b/lib/freeclimb/models/send_digits.rb index 9786cc39..a316b149 100644 --- a/lib/freeclimb/models/send_digits.rb +++ b/lib/freeclimb/models/send_digits.rb @@ -118,6 +118,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/send_digits_all_of.rb b/lib/freeclimb/models/send_digits_all_of.rb index 6c2663c6..d6ab17d0 100644 --- a/lib/freeclimb/models/send_digits_all_of.rb +++ b/lib/freeclimb/models/send_digits_all_of.rb @@ -105,6 +105,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/set_listen.rb b/lib/freeclimb/models/set_listen.rb index 39430c98..89d91f8f 100644 --- a/lib/freeclimb/models/set_listen.rb +++ b/lib/freeclimb/models/set_listen.rb @@ -92,6 +92,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/set_listen_all_of.rb b/lib/freeclimb/models/set_listen_all_of.rb index 6400d170..5b22fecd 100644 --- a/lib/freeclimb/models/set_listen_all_of.rb +++ b/lib/freeclimb/models/set_listen_all_of.rb @@ -79,6 +79,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/set_talk.rb b/lib/freeclimb/models/set_talk.rb index 13603095..2349978d 100644 --- a/lib/freeclimb/models/set_talk.rb +++ b/lib/freeclimb/models/set_talk.rb @@ -92,6 +92,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/set_talk_all_of.rb b/lib/freeclimb/models/set_talk_all_of.rb index 61d2c551..5f014df4 100644 --- a/lib/freeclimb/models/set_talk_all_of.rb +++ b/lib/freeclimb/models/set_talk_all_of.rb @@ -79,6 +79,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms.rb b/lib/freeclimb/models/sms.rb index fda54e21..8cf364e2 100644 --- a/lib/freeclimb/models/sms.rb +++ b/lib/freeclimb/models/sms.rb @@ -137,6 +137,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_all_of.rb b/lib/freeclimb/models/sms_all_of.rb index a1c4254d..6dd2fb65 100644 --- a/lib/freeclimb/models/sms_all_of.rb +++ b/lib/freeclimb/models/sms_all_of.rb @@ -124,6 +124,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_brand.rb b/lib/freeclimb/models/sms_ten_dlc_brand.rb index b105b17a..958810b1 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brand.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brand.rb @@ -551,6 +551,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method checking allowed values (enum). 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 1233b531..92041dd0 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb b/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb index 28ab19fd..9819eb94 100644 --- a/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb +++ b/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_campaign.rb b/lib/freeclimb/models/sms_ten_dlc_campaign.rb index 28168414..a6c73f70 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaign.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaign.rb @@ -586,6 +586,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method with validation 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 fcbea5ff..e2e385b2 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb b/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb index 0979de36..7463fb67 100644 --- a/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb +++ b/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb index bfb36881..93b34850 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb @@ -490,6 +490,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method checking allowed values (enum). 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 4412e3ed..5a835b67 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb @@ -228,6 +228,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method with validation 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 2fb333c1..55bf8e20 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 @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb b/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb index 6dfbc48a..b477ac68 100644 --- a/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb +++ b/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_toll_free_campaign.rb b/lib/freeclimb/models/sms_toll_free_campaign.rb index 281c8bdf..03605311 100644 --- a/lib/freeclimb/models/sms_toll_free_campaign.rb +++ b/lib/freeclimb/models/sms_toll_free_campaign.rb @@ -188,6 +188,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method checking allowed values (enum). 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 c16b2dfa..02b6190e 100644 --- a/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +++ b/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb @@ -159,6 +159,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb b/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb index e0fc4ffa..cce6ba6b 100644 --- a/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb +++ b/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb @@ -81,6 +81,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/start_record_call.rb b/lib/freeclimb/models/start_record_call.rb index 549d1432..cf160a8d 100644 --- a/lib/freeclimb/models/start_record_call.rb +++ b/lib/freeclimb/models/start_record_call.rb @@ -77,6 +77,8 @@ def list_invalid_properties # @return true if the model is valid def valid? + + true end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/terminate_conference.rb b/lib/freeclimb/models/terminate_conference.rb index 035d93db..bae554d8 100644 --- a/lib/freeclimb/models/terminate_conference.rb +++ b/lib/freeclimb/models/terminate_conference.rb @@ -77,6 +77,8 @@ def list_invalid_properties # @return true if the model is valid def valid? + + true end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/tfn.rb b/lib/freeclimb/models/tfn.rb index e2ca4a68..997c4616 100644 --- a/lib/freeclimb/models/tfn.rb +++ b/lib/freeclimb/models/tfn.rb @@ -84,6 +84,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/transcribe_utterance.rb b/lib/freeclimb/models/transcribe_utterance.rb index 2e93b925..1239d59a 100644 --- a/lib/freeclimb/models/transcribe_utterance.rb +++ b/lib/freeclimb/models/transcribe_utterance.rb @@ -14,7 +14,6 @@ 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. class TranscribeUtterance < PerclCommand attr_accessor :action_url @@ -40,9 +39,9 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -50,7 +49,7 @@ def self.openapi_types { :'action_url' => :'String', :'play_beep' => :'Boolean', - :'record' => :'TranscribeUtteranceRecord', + :'record' => :'TranscribeUtteranceAllOfRecord', :'privacy_for_logging' => :'Boolean', :'privacy_for_recording' => :'Boolean', :'prompts' => :'Array' @@ -66,7 +65,8 @@ def self.openapi_nullable # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'PerclCommand' + :'PerclCommand', + :'TranscribeUtteranceAllOf' ] end @@ -85,6 +85,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'action_url') self.action_url = attributes[:'action_url'] end @@ -122,7 +125,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 = super if @action_url.nil? invalid_properties.push('invalid value for "action_url", action_url cannot be nil.') end @@ -149,6 +152,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. @@ -161,7 +165,7 @@ def ==(o) record == o.record && privacy_for_logging == o.privacy_for_logging && privacy_for_recording == o.privacy_for_recording && - prompts == o.prompts + prompts == o.prompts && super(o) end # @see the `==` method @@ -188,6 +192,7 @@ 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) 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) diff --git a/lib/freeclimb/models/terminate_conference_all_of.rb b/lib/freeclimb/models/transcribe_utterance_all_of.rb similarity index 69% rename from lib/freeclimb/models/terminate_conference_all_of.rb rename to lib/freeclimb/models/transcribe_utterance_all_of.rb index 3012468c..a63e56f5 100644 --- a/lib/freeclimb/models/terminate_conference_all_of.rb +++ b/lib/freeclimb/models/transcribe_utterance_all_of.rb @@ -14,14 +14,29 @@ require 'time' module Freeclimb - class TerminateConferenceAllOf - # ID of the conference to terminate. - attr_accessor :conference_id + # 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. + class TranscribeUtteranceAllOf + attr_accessor :action_url + + attr_accessor :play_beep + + attr_accessor :record + + attr_accessor :privacy_for_logging + + attr_accessor :privacy_for_recording + + attr_accessor :prompts # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'conference_id' => :'conferenceId' + :'action_url' => :'actionUrl', + :'play_beep' => :'playBeep', + :'record' => :'record', + :'privacy_for_logging' => :'privacyForLogging', + :'privacy_for_recording' => :'privacyForRecording', + :'prompts' => :'prompts' } end @@ -33,7 +48,12 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'conference_id' => :'String' + :'action_url' => :'String', + :'play_beep' => :'Boolean', + :'record' => :'TranscribeUtteranceAllOfRecord', + :'privacy_for_logging' => :'Boolean', + :'privacy_for_recording' => :'Boolean', + :'prompts' => :'Array' } end @@ -47,19 +67,47 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TerminateConferenceAllOf` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeUtteranceAllOf` 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TerminateConferenceAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TranscribeUtteranceAllOf`. 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?(:'conference_id') - self.conference_id = attributes[:'conference_id'] + if attributes.key?(:'action_url') + self.action_url = attributes[:'action_url'] + end + + if attributes.key?(:'play_beep') + self.play_beep = attributes[:'play_beep'] + else + self.play_beep = false + end + + if attributes.key?(:'record') + self.record = attributes[:'record'] + end + + if attributes.key?(:'privacy_for_logging') + self.privacy_for_logging = attributes[:'privacy_for_logging'] + else + self.privacy_for_logging = false + end + + if attributes.key?(:'privacy_for_recording') + self.privacy_for_recording = attributes[:'privacy_for_recording'] + else + self.privacy_for_recording = false + end + + if attributes.key?(:'prompts') + if (value = attributes[:'prompts']).is_a?(Array) + self.prompts = value + end end end @@ -67,8 +115,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @conference_id.nil? - invalid_properties.push('invalid value for "conference_id", conference_id cannot be nil.') + if @action_url.nil? + invalid_properties.push('invalid value for "action_url", action_url cannot be nil.') end invalid_properties @@ -78,11 +126,22 @@ def list_invalid_properties # @return true if the model is valid def valid? - if @conference_id.nil? + if @action_url.nil? + false + elsif @play_beep.nil? + false + elsif @record.nil? + false + elsif @privacy_for_logging.nil? + false + elsif @privacy_for_recording.nil? + false + elsif @prompts.nil? false else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. @@ -90,7 +149,12 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - conference_id == o.conference_id + 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 end # @see the `==` method @@ -102,7 +166,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [conference_id].hash + [action_url, play_beep, record, privacy_for_logging, privacy_for_recording, prompts].hash end # Builds the object from hash diff --git a/lib/freeclimb/models/transcribe_utterance_record.rb b/lib/freeclimb/models/transcribe_utterance_all_of_record.rb similarity index 97% rename from lib/freeclimb/models/transcribe_utterance_record.rb rename to lib/freeclimb/models/transcribe_utterance_all_of_record.rb index e3918bee..7f1a027e 100644 --- a/lib/freeclimb/models/transcribe_utterance_record.rb +++ b/lib/freeclimb/models/transcribe_utterance_all_of_record.rb @@ -14,7 +14,7 @@ require 'time' module Freeclimb - class TranscribeUtteranceRecord + class TranscribeUtteranceAllOfRecord attr_accessor :save_recording attr_accessor :max_length_sec @@ -54,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeUtteranceRecord` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TranscribeUtteranceAllOfRecord` 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)) - 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 + fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TranscribeUtteranceAllOfRecord`. 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 } @@ -118,6 +118,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Custom attribute writer method with validation diff --git a/lib/freeclimb/models/unpark.rb b/lib/freeclimb/models/unpark.rb index 19aea9f6..f5dc65cf 100644 --- a/lib/freeclimb/models/unpark.rb +++ b/lib/freeclimb/models/unpark.rb @@ -77,6 +77,8 @@ def list_invalid_properties # @return true if the model is valid def valid? + + true end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/update_call_request.rb b/lib/freeclimb/models/update_call_request.rb index 7da2b647..9711d698 100644 --- a/lib/freeclimb/models/update_call_request.rb +++ b/lib/freeclimb/models/update_call_request.rb @@ -82,6 +82,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/update_conference_participant_request.rb b/lib/freeclimb/models/update_conference_participant_request.rb index de716463..1ab017ad 100644 --- a/lib/freeclimb/models/update_conference_participant_request.rb +++ b/lib/freeclimb/models/update_conference_participant_request.rb @@ -90,6 +90,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/models/update_conference_request.rb b/lib/freeclimb/models/update_conference_request.rb index 0090e574..a7fcacbb 100644 --- a/lib/freeclimb/models/update_conference_request.rb +++ b/lib/freeclimb/models/update_conference_request.rb @@ -100,6 +100,7 @@ def valid? else list_invalid_properties.length() == 0 end + end # Checks equality by comparing each attribute. diff --git a/lib/freeclimb/version.rb b/lib/freeclimb/version.rb index c1818a36..4a955306 100644 --- a/lib/freeclimb/version.rb +++ b/lib/freeclimb/version.rb @@ -11,5 +11,5 @@ =end module Freeclimb - VERSION = '4.6.0' + VERSION = '4.6.1' end diff --git a/openapi.json b/openapi.json index 7891b4d6..8881f6f8 100644 --- a/openapi.json +++ b/openapi.json @@ -83,16 +83,8 @@ "schemas": { "AccountStatus": { "type": "string", - "enum": [ - "closed", - "suspended", - "active" - ], - "x-enum-varnames": [ - "CLOSED", - "SUSPENDED", - "ACTIVE" - ], + "enum": ["closed", "suspended", "active"], + "x-enum-varnames": ["CLOSED", "SUSPENDED", "ACTIVE"], "x-enum": true, "description": "The status of this account. It is one of: active, suspended, or closed.", "nullable": true @@ -100,44 +92,24 @@ "AccountType": { "type": "string", "description": "The type of this account. It is one of: trial or full.", - "enum": [ - "trial", - "full" - ], + "enum": ["trial", "full"], "x-enum": true, - "x-enum-varnames": [ - "TRIAL", - "FULL" - ], + "x-enum-varnames": ["TRIAL", "FULL"], "nullable": true }, "AnsweredBy": { "type": "string", "nullable": true, - "enum": [ - "human", - "machine" - ], - "x-enum-varnames": [ - "HUMAN", - "MACHINE" - ], + "enum": ["human", "machine"], + "x-enum-varnames": ["HUMAN", "MACHINE"], "x-enum": true, "description": "If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise." }, "CallDirection": { "type": "string", "nullable": true, - "enum": [ - "inbound", - "outboundAPI", - "outboundDial" - ], - "x-enum-varnames": [ - "INBOUND", - "OUTBOUND_API", - "OUTBOUND_DIAL" - ], + "enum": ["inbound", "outboundAPI", "outboundDial"], + "x-enum-varnames": ["INBOUND", "OUTBOUND_API", "OUTBOUND_DIAL"], "x-enum": true, "description": "Direction of the Call. `inbound` for Calls into FreeClimb, `outboundAPI` for Calls initiated via the REST API, `outboundDial` for Calls initiated by the `OutDial` PerCL command." }, @@ -170,18 +142,8 @@ "ConferenceStatus": { "type": "string", "nullable": true, - "enum": [ - "empty", - "populated", - "inProgress", - "terminated" - ], - "x-enum-varnames": [ - "EMPTY", - "POPULATED", - "IN_PROGRESS", - "TERMINATED" - ], + "enum": ["empty", "populated", "inProgress", "terminated"], + "x-enum-varnames": ["EMPTY", "POPULATED", "IN_PROGRESS", "TERMINATED"], "x-enum": true, "description": "The status of the Conference. One of: creating, empty, populated, inProgress, or terminated." }, @@ -245,28 +207,16 @@ }, "GrammarType": { "type": "string", - "enum": [ - "URL", - "BUILTIN" - ], + "enum": ["URL", "BUILTIN"], "nullable": true, - "x-enum-varnames": [ - "URL", - "BUILT_IN" - ], + "x-enum-varnames": ["URL", "BUILT_IN"], "x-enum": true, "description": "The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files." }, "IfMachine": { "type": "string", - "enum": [ - "redirect", - "hangup" - ], - "x-enum-varnames": [ - "REDIRECT", - "HANGUP" - ], + "enum": ["redirect", "hangup"], + "x-enum-varnames": ["REDIRECT", "HANGUP"], "x-enum": true, "description": "Specifies how FreeClimb should handle this OutDial if an answering machine answers the Call. Valid values: `redirect` invokes the ifMachineUrl for instructions. `hangup` hangs up the Call. The ifMachineUrl will not be invoked." }, @@ -332,42 +282,22 @@ }, "LogLevel": { "type": "string", - "enum": [ - "info", - "warning", - "error" - ], + "enum": ["info", "warning", "error"], "nullable": true, - "x-enum-varnames": [ - "INFO", - "WARNING", - "ERROR" - ], + "x-enum-varnames": ["INFO", "WARNING", "ERROR"], "x-enum": true, "description": "Level of the log. Possible values are info, warning, and error." }, "MachineType": { "type": "string", - "enum": [ - "answeringMachine", - "faxMachine" - ], - "x-enum-varnames": [ - "ANSWERING_MACHINE", - "FAX_MACHINE" - ], + "enum": ["answeringMachine", "faxMachine"], + "x-enum-varnames": ["ANSWERING_MACHINE", "FAX_MACHINE"], "x-enum": true }, "MessageDirection": { "type": "string", - "enum": [ - "inbound", - "outbound" - ], - "x-enum-varnames": [ - "INBOUND", - "OUTBOUND" - ], + "enum": ["inbound", "outbound"], + "x-enum-varnames": ["INBOUND", "OUTBOUND"], "x-enum": true }, "MessageStatus": { @@ -405,18 +335,8 @@ "PlayBeep": { "type": "string", "nullable": true, - "enum": [ - "always", - "never", - "entryOnly", - "exitOnly" - ], - "x-enum-varnames": [ - "ALWAYS", - "NEVER", - "ENTRY_ONLY", - "EXIT_ONLY" - ], + "enum": ["always", "never", "entryOnly", "exitOnly"], + "x-enum-varnames": ["ALWAYS", "NEVER", "ENTRY_ONLY", "EXIT_ONLY"], "x-enum": true, "description": "Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` ", "default": "always", @@ -424,34 +344,14 @@ }, "QueueResultStatus": { "type": "string", - "enum": [ - "queueFull", - "dequeued", - "hangup", - "systemError" - ], - "x-enum-varnames": [ - "QUEUE_FULL", - "DEQUEUED", - "HANGUP", - "SYSTEM_ERROR" - ], + "enum": ["queueFull", "dequeued", "hangup", "systemError"], + "x-enum-varnames": ["QUEUE_FULL", "DEQUEUED", "HANGUP", "SYSTEM_ERROR"], "x-enum": true }, "RecordUtteranceTermReason": { "type": "string", - "enum": [ - "finishKey", - "timeout", - "hangup", - "maxLength" - ], - "x-enum-varnames": [ - "FINISH_KEY", - "TIMEOUT", - "HANGUP", - "MAX_LENGTH" - ], + "enum": ["finishKey", "timeout", "hangup", "maxLength"], + "x-enum-varnames": ["FINISH_KEY", "TIMEOUT", "HANGUP", "MAX_LENGTH"], "x-enum": true }, "RequestType": { @@ -510,27 +410,15 @@ }, "UpdateCallRequestStatus": { "type": "string", - "enum": [ - "canceled", - "completed" - ], - "x-enum-varnames": [ - "CANCELED", - "COMPLETED" - ], + "enum": ["canceled", "completed"], + "x-enum-varnames": ["CANCELED", "COMPLETED"], "x-enum": true, "description": "Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress." }, "UpdateConferenceRequestStatus": { "type": "string", - "enum": [ - "empty", - "terminated" - ], - "x-enum-varnames": [ - "EMPTY", - "TERMINATED" - ], + "enum": ["empty", "terminated"], + "x-enum-varnames": ["EMPTY", "TERMINATED"], "x-enum": true, "description": "New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.**" }, @@ -599,9 +487,7 @@ }, { "type": "object", - "required": [ - "conferenceId" - ], + "required": ["conferenceId"], "properties": { "allowCallControl": { "description": "If `true`, Call control will be enabled for this Participant's Call leg.", @@ -653,9 +539,7 @@ }, { "type": "object", - "required": [ - "actionUrl" - ], + "required": ["actionUrl"], "properties": { "actionUrl": { "description": " 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. ", @@ -708,11 +592,7 @@ }, { "type": "object", - "required": [ - "queueId", - "waitUrl", - "actionUrl" - ], + "required": ["queueId", "waitUrl", "actionUrl"], "properties": { "actionUrl": { "description": "A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up.", @@ -746,9 +626,7 @@ }, { "type": "object", - "required": [ - "actionUrl" - ], + "required": ["actionUrl"], "properties": { "actionUrl": { "description": "When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL.", @@ -804,10 +682,7 @@ }, { "type": "object", - "required": [ - "actionUrl", - "grammarFile" - ], + "required": ["actionUrl", "grammarFile"], "properties": { "actionUrl": { "description": "When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call.", @@ -960,10 +835,7 @@ }, { "type": "object", - "required": [ - "waitUrl", - "actionUrl" - ], + "required": ["waitUrl", "actionUrl"], "properties": { "waitUrl": { "description": "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.", @@ -992,9 +864,7 @@ }, { "type": "object", - "required": [ - "length" - ], + "required": ["length"], "properties": { "length": { "description": "Length in milliseconds. FreeClimb will wait silently before continuing on.", @@ -1012,9 +882,7 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [ - "file" - ], + "required": ["file"], "type": "object", "properties": { "file": { @@ -1041,9 +909,7 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [ - "file" - ], + "required": ["file"], "type": "object", "properties": { "file": { @@ -1063,9 +929,7 @@ "x-is-uri": true }, { - "required": [ - "actionUrl" - ], + "required": ["actionUrl"], "type": "object", "properties": { "actionUrl": { @@ -1110,9 +974,7 @@ "x-is-uri": true }, { - "required": [ - "actionUrl" - ], + "required": ["actionUrl"], "type": "object", "properties": { "actionUrl": { @@ -1164,9 +1026,7 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [ - "text" - ], + "required": ["text"], "type": "object", "properties": { "text": { @@ -1198,9 +1058,7 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [ - "digits" - ], + "required": ["digits"], "type": "object", "properties": { "digits": { @@ -1265,11 +1123,7 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [ - "to", - "from", - "text" - ], + "required": ["to", "from", "text"], "type": "object", "properties": { "to": { @@ -1396,13 +1250,7 @@ "Capabilities": { "description": "Details for which features this number may be used.", "type": "object", - "required": [ - "voice", - "sms", - "tollFree", - "tenDLC", - "shortCode" - ], + "required": ["voice", "sms", "tollFree", "tenDLC", "shortCode"], "x-is-object": true, "properties": { "voice": { @@ -1435,9 +1283,7 @@ "TFN": { "description": "TollFree Campaign details for this number", "type": "object", - "required": [ - "campaignId" - ], + "required": ["campaignId"], "x-is-object": true, "properties": { "campaignId": { @@ -1794,9 +1640,7 @@ }, "BuyIncomingNumberRequest": { "type": "object", - "required": [ - "phoneNumber" - ], + "required": ["phoneNumber"], "properties": { "phoneNumber": { "type": "string", @@ -1895,9 +1739,7 @@ }, "UpdateCallRequest": { "type": "object", - "required": [ - "status" - ], + "required": ["status"], "properties": { "status": { "$ref": "#/components/schemas/UpdateCallRequestStatus" @@ -1906,10 +1748,7 @@ }, "MakeCallRequest": { "type": "object", - "required": [ - "from", - "to" - ], + "required": ["from", "to"], "properties": { "from": { "type": "string", @@ -2177,11 +2016,7 @@ }, { "type": "object", - "required": [ - "from", - "to", - "text" - ], + "required": ["from", "to", "text"], "properties": { "from": { "type": "string", @@ -2552,9 +2387,7 @@ }, "FilterLogsRequest": { "type": "object", - "required": [ - "pql" - ], + "required": ["pql"], "properties": { "pql": { "type": "string", @@ -2617,14 +2450,8 @@ "type": "string", "x-has-writer": true, "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", - "enum": [ - "ACTIVE", - "EXPIRED" - ], - "x-enum-varnames": [ - "ACTIVE", - "EXPIRED" - ] + "enum": ["ACTIVE", "EXPIRED"], + "x-enum-varnames": ["ACTIVE", "EXPIRED"] }, "createDate": { "type": "string", @@ -2849,12 +2676,7 @@ ] }, "SMSTenDLCPartnerCampaign": { - "required": [ - "brandId", - "campaignId", - "description", - "usecase" - ], + "required": ["brandId", "campaignId", "description", "usecase"], "type": "object", "properties": { "accountId": { @@ -2870,14 +2692,8 @@ "type": "string", "x-has-writer": true, "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", - "enum": [ - "ACTIVE", - "EXPIRED" - ], - "x-enum-varnames": [ - "ACTIVE", - "EXPIRED" - ] + "enum": ["ACTIVE", "EXPIRED"], + "x-enum-varnames": ["ACTIVE", "EXPIRED"] }, "createDate": { "type": "string", @@ -3056,10 +2872,7 @@ } }, "SMSTenDLCPartnerCampaignBrand": { - "required": [ - "email", - "phone" - ], + "required": ["email", "phone"], "type": "object", "x-is-object": true, "properties": { @@ -3389,18 +3202,8 @@ "altBusinessIdType": { "type": "string", "x-has-writer": true, - "enum": [ - "NONE", - "DUNS", - "GIIN", - "LEI" - ], - "x-enum-varnames": [ - "NONE", - "DUNS", - "GIIN", - "LEI" - ], + "enum": ["NONE", "DUNS", "GIIN", "LEI"], + "x-enum-varnames": ["NONE", "DUNS", "GIIN", "LEI"], "description": "The type of the Alternative business identifier" }, "universalEin": { @@ -3564,57 +3367,63 @@ "id": "u509r3zqc38ze" }, "x-percl-command": true, - "type": "object", - "description": "The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed.\n\n`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.", - "properties": { - "actionUrl": { - "type": "string" - }, - "playBeep": { - "type": "boolean", - "default": false + "allOf": [ + { + "$ref": "#/components/schemas/PerclCommand" }, - "record": { + { + "required": ["actionUrl"], "type": "object", + "description": "The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed.\n\n`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.", "properties": { - "saveRecording": { + "actionUrl": { + "type": "string" + }, + "playBeep": { "type": "boolean", "default": false }, - "maxLengthSec": { - "type": "integer", - "minimum": 1, - "maximum": 60, - "default": 60 + "record": { + "type": "object", + "x-is-object": true, + "properties": { + "saveRecording": { + "type": "boolean", + "default": false + }, + "maxLengthSec": { + "type": "integer", + "minimum": 1, + "maximum": 60, + "default": 60 + }, + "rcrdTerminationSilenceTimeMs": { + "type": "integer", + "exclusiveMinimum": true, + "minimum": 0, + "maximum": 3000 + } + } }, - "rcrdTerminationSilenceTimeMs": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 0, - "maximum": 3000 + "privacyForLogging": { + "type": "boolean", + "default": false + }, + "privacyForRecording": { + "type": "boolean", + "default": false + }, + "prompts": { + "type": "array", + "items": {} } } - }, - "privacyForLogging": { - "type": "boolean", - "default": false - }, - "privacyForRecording": { - "type": "boolean", - "default": false - }, - "prompts": { - "type": "array", - "items": {} } - }, - "required": [ - "actionUrl" ], "x-examples": { "Example 1": { "TranscribeUtterance": { - "actionUrl": "http://foo.vail/handleTranscription", + "actionUrl": "http://yoursite.com/handleTranscription", "record": { "maxLengthSec": 60, "saveRecording": true, @@ -3634,11 +3443,7 @@ }, "CreateWebRTCToken": { "type": "object", - "required": [ - "to", - "from", - "uses" - ], + "required": ["to", "from", "uses"], "additionalProperties": false, "properties": { "to": { @@ -6110,11 +5915,5 @@ "x-explorer-enabled": true, "x-proxy-enabled": true, "x-samples-enabled": false, - "x-samples-languages": [ - "curl", - "node", - "ruby", - "javascript", - "python" - ] -} \ No newline at end of file + "x-samples-languages": ["curl", "node", "ruby", "javascript", "python"] +} diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index 5bd94201..42684dac 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -245,10 +245,11 @@ @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' @create_web_rtc_token_make_a_webrtc_jwt_test_value=Freeclimb::CreateWebRTCToken.new({to: 'to_example', from: 'from_example', uses: 2}) + end after do @@ -278,7 +279,8 @@ } ) - + false + expect(result).to be_a Freeclimb::IncomingNumberResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -301,7 +303,8 @@ :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 @@ -324,7 +327,8 @@ :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 @@ -347,7 +351,8 @@ :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 @@ -370,7 +375,8 @@ } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -393,7 +399,8 @@ } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -416,7 +423,8 @@ } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -441,7 +449,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueMember # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -464,7 +473,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueMember # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -487,7 +497,8 @@ } ) - + false + expect(result).to be_a Freeclimb::File # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -510,7 +521,8 @@ } ) - + false + expect(result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -533,7 +545,8 @@ } ) - + false + expect(result).to be_a Freeclimb::CallResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -556,7 +569,8 @@ } ) - + false + expect(result).to be_a Freeclimb::ConferenceResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -581,7 +595,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueMember # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -606,7 +621,8 @@ } ) - + false + expect(result).to be_a Freeclimb::ConferenceParticipantResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -629,7 +645,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -652,7 +669,8 @@ } ) - + false + expect(result).to be_a Freeclimb::RecordingResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -673,7 +691,8 @@ } ) - + false + expect(result).to be_a Freeclimb::AccountResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -696,7 +715,8 @@ } ) - + false + expect(result).to be_a Freeclimb::ApplicationResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -719,7 +739,8 @@ } ) - + false + expect(result).to be_a Freeclimb::IncomingNumberResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -742,7 +763,8 @@ } ) - + false + expect(result).to be_a Freeclimb::MessageResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -765,7 +787,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueMember # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -788,7 +811,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTenDLCBrand # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -809,7 +833,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTenDLCBrandsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -832,7 +857,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTenDLCCampaign # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -855,7 +881,8 @@ :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 @@ -878,7 +905,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTenDLCPartnerCampaign # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -901,7 +929,8 @@ :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 @@ -924,7 +953,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTollFreeCampaign # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -945,7 +975,8 @@ } ) - + false + expect(result).to be_a Freeclimb::SMSTollFreeCampaignsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -968,7 +999,8 @@ :_alias => _alias, } ) - + false + expect(result).to be_a Freeclimb::QueueList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -989,7 +1021,8 @@ } ) - + false + expect(result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1012,7 +1045,8 @@ :_alias => _alias, } ) - + false + expect(result).to be_a Freeclimb::ApplicationList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1053,7 +1087,8 @@ :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 @@ -1076,7 +1111,8 @@ } ) - + false + expect(result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1101,7 +1137,8 @@ :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 @@ -1138,7 +1175,8 @@ :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 @@ -1165,7 +1203,8 @@ :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 @@ -1194,7 +1233,8 @@ :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 @@ -1247,7 +1287,8 @@ :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 @@ -1270,7 +1311,8 @@ } ) - + false + expect(result).to be_a Freeclimb::QueueMemberList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1297,7 +1339,8 @@ :talk => talk,:listen => listen, } ) - + false + expect(result).to be_a Freeclimb::ConferenceParticipantList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1324,7 +1367,8 @@ :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 @@ -1361,7 +1405,8 @@ :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 @@ -1384,7 +1429,8 @@ :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 @@ -1408,9 +1454,10 @@ } ) - + true expect(result).to be_a String + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end @@ -1433,7 +1480,8 @@ } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1456,7 +1504,8 @@ } ) - + false + expect(result).to be_a Freeclimb::MessageResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1479,7 +1528,8 @@ } ) - + false + expect(result).to be_a Freeclimb::File # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1504,7 +1554,8 @@ :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 @@ -1529,7 +1580,8 @@ } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1556,7 +1608,8 @@ :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 @@ -1581,7 +1634,8 @@ :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 @@ -1604,7 +1658,8 @@ :account_request => account_request, } ) - + false + expect(result).to be_nil # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1629,7 +1684,8 @@ :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 @@ -1654,7 +1710,8 @@ :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 diff --git a/spec/models/account_request_spec.rb b/spec/models/account_request_spec.rb index 8fab9204..678f6be7 100644 --- a/spec/models/account_request_spec.rb +++ b/spec/models/account_request_spec.rb @@ -44,7 +44,9 @@ it 'properly initializes with values' do expect{instance = 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 @@ -71,41 +73,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::AccountRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::AccountRequest.new( - _alias: "TS", - label: "TS", - ) - instance_2 = Freeclimb::AccountRequest.new( - _alias: "TS", - label: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::AccountRequest.new( - _alias: "TS", - label: "TS", - ) - instance_2 = Freeclimb::AccountRequest.new( - _alias: "ST", - label: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/account_result_spec.rb b/spec/models/account_result_spec.rb index ae5abf37..bd165cdb 100644 --- a/spec/models/account_result_spec.rb +++ b/spec/models/account_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -122,15 +125,28 @@ it 'properly initializes with values' do expect{instance = Freeclimb::AccountResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + account_id: "TS", + api_key: "TS", + _alias: "TS", + label: "TS", + + type: Freeclimb::AccountType.new(), + type: "TRIAL", + status: Freeclimb::AccountStatus.new(), + status: "CLOSED", + subresource_uris: Object.new(), )}.not_to raise_error() end @@ -139,12 +155,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), invalid_attribute: true @@ -155,12 +173,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), invalid_attribute: true @@ -174,88 +194,22 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::AccountResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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.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: "TRIAL", - status: "CLOSED", - 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: "TRIAL", - status: "CLOSED", - subresource_uris: obj, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' 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: "TRIAL", - status: "CLOSED", - subresource_uris: Object.new(), - ) - instance_2 = Freeclimb::AccountResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - account_id: "ST", - api_key: "ST", - _alias: "ST", - label: "ST", - type: "FULL", - status: "SUSPENDED", - subresource_uris: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -264,12 +218,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) @@ -283,12 +239,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) @@ -302,12 +260,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) @@ -346,12 +306,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) @@ -365,12 +327,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: Object.new(), ) @@ -382,12 +346,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: obj, ) @@ -395,12 +361,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", api_key: "TS", _alias: "TS", label: "TS", + type: Freeclimb::AccountType.new(), type: "TRIAL", + status: Freeclimb::AccountStatus.new(), status: "CLOSED", subresource_uris: obj, ) @@ -416,7 +384,7 @@ date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", diff --git a/spec/models/add_to_conference_spec.rb b/spec/models/add_to_conference_spec.rb index 27fbf3c0..42d54233 100644 --- a/spec/models/add_to_conference_spec.rb +++ b/spec/models/add_to_conference_spec.rb @@ -93,14 +93,23 @@ 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, + )}.not_to raise_error() end it 'fails to initialize with input argument that is not a hash in Freeclimb::AddToConference' do @@ -148,70 +157,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::AddToConference.new( - conference_id: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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, - ) - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - 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, - ) - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/application_list_spec.rb b/spec/models/application_list_spec.rb index c9dd9998..af5a0f0c 100644 --- a/spec/models/application_list_spec.rb +++ b/spec/models/application_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - applications: Array.new(), + + applications: Freeclimb::ApplicationResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ApplicationList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::ApplicationList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) instance_2 = Freeclimb::ApplicationList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ApplicationList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::ApplicationList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) instance_2 = Freeclimb::ApplicationList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + applications: Freeclimb::ApplicationResult.new(), applications: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ApplicationList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/application_request_spec.rb b/spec/models/application_request_spec.rb index ff279e11..3abf1774 100644 --- a/spec/models/application_request_spec.rb +++ b/spec/models/application_request_spec.rb @@ -79,12 +79,19 @@ 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 @@ -126,61 +133,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ApplicationRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "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 diff --git a/spec/models/application_result_spec.rb b/spec/models/application_result_spec.rb index f8c3d8db..06b83829 100644 --- a/spec/models/application_result_spec.rb +++ b/spec/models/application_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -121,18 +124,31 @@ it 'properly initializes with values' do expect{instance = Freeclimb::ApplicationResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +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 @@ -140,7 +156,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -158,7 +174,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -179,7 +195,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -192,85 +208,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ApplicationResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - 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 @@ -279,7 +219,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -300,7 +240,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -321,7 +261,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -379,7 +319,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -400,7 +340,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -419,7 +359,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -434,7 +374,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", application_id: "TS", _alias: "TS", @@ -457,7 +397,7 @@ date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", diff --git a/spec/models/available_number_list_spec.rb b/spec/models/available_number_list_spec.rb index ccc6b326..6cbf2559 100644 --- a/spec/models/available_number_list_spec.rb +++ b/spec/models/available_number_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +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: Freeclimb::AvailableNumber.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::AvailableNumberList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::AvailableNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) instance_2 = Freeclimb::AvailableNumberList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AvailableNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::AvailableNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) instance_2 = Freeclimb::AvailableNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + available_phone_numbers: Freeclimb::AvailableNumber.new(), available_phone_numbers: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::AvailableNumberList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/available_number_spec.rb b/spec/models/available_number_spec.rb index 17ab049d..39c7eb57 100644 --- a/spec/models/available_number_spec.rb +++ b/spec/models/available_number_spec.rb @@ -78,17 +78,26 @@ describe 'test method "initialize"' do it 'properly initializes with values' do expect{instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), + capabilities: Freeclimb::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: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -101,6 +110,7 @@ end it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -116,6 +126,7 @@ describe 'test method "valid"' do it 'checks if properties are valid' do instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -126,62 +137,15 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::AvailableNumber.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 = Object.new() - instance_1 = Freeclimb::AvailableNumber.new( - campaign_id: "TS", - phone_number: "TS", - voice_enabled: true, - sms_enabled: true, - region: "TS", - country: "TS", - ) - instance_2 = Freeclimb::AvailableNumber.new( - 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 - instance_1 = Freeclimb::AvailableNumber.new( - campaign_id: "TS", - phone_number: "TS", - voice_enabled: true, - sms_enabled: true, - region: "TS", - country: "TS", - ) - instance_2 = Freeclimb::AvailableNumber.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 instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -197,6 +161,7 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do instance_1 = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -212,6 +177,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -246,6 +212,7 @@ describe 'test method "to_s"' do it 'returns the string representation of the object' do instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -261,6 +228,7 @@ describe 'test method "to_hash"' do it 'returns the object in the form of hash' do instance = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -274,6 +242,7 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", @@ -283,6 +252,7 @@ country: "TS", ) instance_2 = Freeclimb::AvailableNumber.new( + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number: "TS", diff --git a/spec/models/buy_incoming_number_request_spec.rb b/spec/models/buy_incoming_number_request_spec.rb index abae28da..caf83393 100644 --- a/spec/models/buy_incoming_number_request_spec.rb +++ b/spec/models/buy_incoming_number_request_spec.rb @@ -51,8 +51,11 @@ it 'properly initializes with values' do expect{instance = 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 @@ -82,46 +85,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - _alias: "TS", - application_id: "TS", - ) - instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - 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 - instance_1 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "TS", - _alias: "TS", - application_id: "TS", - ) - instance_2 = Freeclimb::BuyIncomingNumberRequest.new( - phone_number: "ST", - _alias: "ST", - application_id: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/call_list_spec.rb b/spec/models/call_list_spec.rb index 9ec02196..0e18e9ea 100644 --- a/spec/models/call_list_spec.rb +++ b/spec/models/call_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - calls: Array.new(), + + calls: Freeclimb::CallResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::CallList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::CallList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) instance_2 = Freeclimb::CallList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CallList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::CallList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) instance_2 = Freeclimb::CallList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + calls: Freeclimb::CallResult.new(), calls: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::CallList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/call_result_spec.rb b/spec/models/call_result_spec.rb index 6631ee39..92a57ccd 100644 --- a/spec/models/call_result_spec.rb +++ b/spec/models/call_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -155,15 +158,21 @@ describe 'test attribute "duration"' do it 'should work' do - instance.duration = 1 - expect(instance.duration).to eq(1) + + + instance.duration = 1 + expect(instance.duration).to eq(1) + end end describe 'test attribute "connect_duration"' do it 'should work' do - instance.connect_duration = 1 - expect(instance.connect_duration).to eq(1) + + + instance.connect_duration = 1 + expect(instance.connect_duration).to eq(1) + end end @@ -207,23 +216,45 @@ it 'properly initializes with values' do expect{instance = Freeclimb::CallResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + call_id: "TS", + parent_call_id: "TS", + account_id: "TS", + from: "TS", + to: "TS", + phone_number_id: "TS", + + call_status: Freeclimb::CallStatus.new(), + call_status: "QUEUED", start_time: "TS", + connect_time: "TS", + end_time: "TS", - duration: 1, - connect_duration: 1, + +duration: 1, + +connect_duration: 1, + + direction: Freeclimb::CallDirection.new(), + direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), + answered_by: "HUMAN", + subresource_uris: Object.new(), )}.not_to raise_error() end @@ -232,20 +263,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), invalid_attribute: true @@ -256,20 +290,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), invalid_attribute: true @@ -283,128 +320,31 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::CallResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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.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: "QUEUED", - start_time: "TS", - connect_time: "TS", - end_time: "TS", - duration: 1, - connect_duration: 1, - direction: "INBOUND", - answered_by: "HUMAN", - subresource_uris: obj, - ) - 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: "QUEUED", - start_time: "TS", - connect_time: "TS", - end_time: "TS", - duration: 1, - connect_duration: 1, - direction: "INBOUND", - answered_by: "HUMAN", - subresource_uris: obj, - ) - 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: 1, - call_id: "TS", - parent_call_id: "TS", - account_id: "TS", - from: "TS", - to: "TS", - phone_number_id: "TS", - call_status: "QUEUED", - start_time: "TS", - connect_time: "TS", - end_time: "TS", - duration: 1, - connect_duration: 1, - direction: "INBOUND", - answered_by: "HUMAN", - subresource_uris: Object.new(), - ) - instance_2 = Freeclimb::CallResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - call_id: "ST", - parent_call_id: "ST", - account_id: "ST", - from: "ST", - to: "ST", - phone_number_id: "ST", - call_status: "RINGING", - start_time: "ST", - connect_time: "ST", - end_time: "ST", - duration: 0, - connect_duration: 0, - direction: "OUTBOUND_API", - answered_by: "MACHINE", - subresource_uris: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -413,20 +353,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) @@ -440,20 +383,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) @@ -467,20 +413,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) @@ -540,20 +489,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) @@ -567,20 +519,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: Object.new(), ) @@ -592,20 +547,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: obj, ) @@ -613,20 +571,23 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", parent_call_id: "TS", account_id: "TS", from: "TS", to: "TS", phone_number_id: "TS", + call_status: Freeclimb::CallStatus.new(), call_status: "QUEUED", start_time: "TS", connect_time: "TS", end_time: "TS", - duration: 1, - connect_duration: 1, +duration: 1, +connect_duration: 1, + direction: Freeclimb::CallDirection.new(), direction: "INBOUND", + answered_by: Freeclimb::AnsweredBy.new(), answered_by: "HUMAN", subresource_uris: obj, ) @@ -642,7 +603,7 @@ date_updated: "TS", - revision: 1, +revision: 1, call_id: "TS", @@ -664,9 +625,9 @@ end_time: "TS", - duration: 1, +duration: 1, - connect_duration: 1, +connect_duration: 1, direction: "INBOUND", diff --git a/spec/models/capabilities_spec.rb b/spec/models/capabilities_spec.rb index 14548c6b..34d46235 100644 --- a/spec/models/capabilities_spec.rb +++ b/spec/models/capabilities_spec.rb @@ -65,10 +65,15 @@ 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 @@ -104,58 +109,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Capabilities.new( - voice: nil, - sms: nil, - toll_free: nil, - ten_dlc: nil, - short_code: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Capabilities.new( - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - 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, - ) - instance_2 = Freeclimb::Capabilities.new( - 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 diff --git a/spec/models/conference_list_spec.rb b/spec/models/conference_list_spec.rb index 34da13a8..386bbc16 100644 --- a/spec/models/conference_list_spec.rb +++ b/spec/models/conference_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - conferences: Array.new(), + + conferences: Freeclimb::ConferenceResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ConferenceList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::ConferenceList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) instance_2 = Freeclimb::ConferenceList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::ConferenceList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) instance_2 = Freeclimb::ConferenceList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + conferences: Freeclimb::ConferenceResult.new(), conferences: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/conference_participant_list_spec.rb b/spec/models/conference_participant_list_spec.rb index 0a4a0149..2ca128c6 100644 --- a/spec/models/conference_participant_list_spec.rb +++ b/spec/models/conference_participant_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - participants: Array.new(), + + participants: Freeclimb::ConferenceParticipantResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ConferenceParticipantList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) instance_2 = Freeclimb::ConferenceParticipantList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::ConferenceParticipantList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::ConferenceParticipantList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) instance_2 = Freeclimb::ConferenceParticipantList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + participants: Freeclimb::ConferenceParticipantResult.new(), participants: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::ConferenceParticipantList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/conference_participant_result_spec.rb b/spec/models/conference_participant_result_spec.rb index b80ba6fe..55529397 100644 --- a/spec/models/conference_participant_result_spec.rb +++ b/spec/models/conference_participant_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -100,15 +103,25 @@ it 'properly initializes with values' do expect{instance = Freeclimb::ConferenceParticipantResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + account_id: "TS", + conference_id: "TS", + call_id: "TS", + talk: true, + listen: 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 @@ -116,7 +129,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -131,7 +144,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -149,7 +162,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -159,73 +172,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ConferenceParticipantResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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, - 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, - start_conf_on_enter: true, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not 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, - start_conf_on_enter: true, - ) - instance_2 = Freeclimb::ConferenceParticipantResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - account_id: "ST", - conference_id: "ST", - call_id: "ST", - talk: false, - listen: false, - start_conf_on_enter: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -234,7 +183,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -252,7 +201,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -270,7 +219,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -316,7 +265,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -334,7 +283,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -350,7 +299,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -362,7 +311,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", conference_id: "TS", call_id: "TS", @@ -382,7 +331,7 @@ date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", diff --git a/spec/models/conference_result_spec.rb b/spec/models/conference_result_spec.rb index 8f9e457a..e140a74f 100644 --- a/spec/models/conference_result_spec.rb +++ b/spec/models/conference_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -155,18 +158,34 @@ it 'properly initializes with values' do expect{instance = Freeclimb::ConferenceResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + conference_id: "TS", + account_id: "TS", + _alias: "TS", + + play_beep: Freeclimb::PlayBeep.new(), + play_beep: "ALWAYS", record: true, + + status: Freeclimb::ConferenceStatus.new(), + status: "EMPTY", wait_url: "TS", + action_url: "TS", + status_callback_url: "TS", + + subresource_uris: Object.new(), )}.not_to raise_error() end @@ -175,12 +194,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -194,12 +215,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -216,12 +239,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -230,89 +255,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::ConferenceResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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.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: "ALWAYS", - record: true, - status: "EMPTY", - wait_url: "TS", - action_url: "TS", - status_callback_url: "TS", - 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: "ALWAYS", - record: true, - status: "EMPTY", - wait_url: "TS", - action_url: "TS", - status_callback_url: "TS", - subresource_uris: obj, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' 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: "ALWAYS", - record: true, - status: "EMPTY", - wait_url: "TS", - action_url: "TS", - status_callback_url: "TS", - subresource_uris: Object.new(), - ) - instance_2 = Freeclimb::ConferenceResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - conference_id: "ST", - account_id: "ST", - _alias: "ST", - play_beep: "NEVER", - record: false, - status: "POPULATED", - wait_url: "ST", - action_url: "ST", - status_callback_url: "ST", - subresource_uris: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -321,12 +266,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -343,12 +290,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -365,12 +314,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -421,12 +372,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -443,12 +396,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -463,12 +418,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -479,12 +436,14 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", account_id: "TS", _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, + status: Freeclimb::ConferenceStatus.new(), status: "EMPTY", wait_url: "TS", action_url: "TS", @@ -503,7 +462,7 @@ date_updated: "TS", - revision: 1, +revision: 1, conference_id: "TS", diff --git a/spec/models/create_conference_request_spec.rb b/spec/models/create_conference_request_spec.rb index 3dbbfac8..735091b5 100644 --- a/spec/models/create_conference_request_spec.rb +++ b/spec/models/create_conference_request_spec.rb @@ -78,15 +78,22 @@ it 'properly initializes with values' do expect{instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + + play_beep: Freeclimb::PlayBeep.new(), + play_beep: "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.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -97,6 +104,7 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -110,6 +118,7 @@ it 'checks if properties are valid' do instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -117,59 +126,16 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::CreateConferenceRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - play_beep: "ALWAYS", - record: true, - wait_url: "TS", - status_callback_url: "TS", - ) - instance_2 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - play_beep: "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 - instance_1 = Freeclimb::CreateConferenceRequest.new( - _alias: "TS", - play_beep: "ALWAYS", - record: true, - wait_url: "TS", - status_callback_url: "TS", - ) - instance_2 = Freeclimb::CreateConferenceRequest.new( - _alias: "ST", - play_beep: "NEVER", - 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 instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -183,6 +149,7 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -196,6 +163,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -219,6 +187,7 @@ it 'returns the string representation of the object' do instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -232,6 +201,7 @@ it 'returns the object in the form of hash' do instance = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -243,6 +213,7 @@ obj = Object.new() instance_1 = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", @@ -250,6 +221,7 @@ ) instance_2 = Freeclimb::CreateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, wait_url: "TS", diff --git a/spec/models/create_conference_spec.rb b/spec/models/create_conference_spec.rb index 0e8d37b8..bd894360 100644 --- a/spec/models/create_conference_spec.rb +++ b/spec/models/create_conference_spec.rb @@ -85,17 +85,25 @@ it 'properly initializes with values' do expect{instance = Freeclimb::CreateConference.new( action_url: "TS", + _alias: true, + + play_beep: Freeclimb::PlayBeep.new(), + play_beep: "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.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -107,6 +115,7 @@ expect{instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -121,6 +130,7 @@ instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -128,58 +138,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::CreateConference.new( - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::CreateConference.new( - action_url: "TS", - _alias: true, - play_beep: "ALWAYS", - record: true, - status_callback_url: "TS", - wait_url: "TS", - ) - instance_2 = Freeclimb::CreateConference.new( - action_url: "TS", - _alias: true, - play_beep: "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 - instance_1 = Freeclimb::CreateConference.new( - action_url: "TS", - _alias: true, - play_beep: "ALWAYS", - record: true, - status_callback_url: "TS", - wait_url: "TS", - ) - instance_2 = Freeclimb::CreateConference.new( - action_url: "ST", - _alias: false, - play_beep: "NEVER", - 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 @@ -187,6 +148,7 @@ instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -201,6 +163,7 @@ instance_1 = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -215,6 +178,7 @@ instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -242,6 +206,7 @@ instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -256,6 +221,7 @@ instance = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -268,6 +234,7 @@ instance_1 = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", @@ -276,6 +243,7 @@ instance_2 = Freeclimb::CreateConference.new( action_url: "TS", _alias: true, + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", record: true, status_callback_url: "TS", diff --git a/spec/models/create_web_rtc_token_spec.rb b/spec/models/create_web_rtc_token_spec.rb index a65d50f7..b04355a6 100644 --- a/spec/models/create_web_rtc_token_spec.rb +++ b/spec/models/create_web_rtc_token_spec.rb @@ -42,8 +42,11 @@ describe 'test attribute "uses"' do it 'should work' do - instance.uses = 1 - expect(instance.uses).to eq(1) + + instance.uses = 1 + expect(instance.uses).to eq(1) + + end end @@ -51,15 +54,18 @@ it 'properly initializes with values' do expect{instance = Freeclimb::CreateWebRTCToken.new( to: "TS", + from: "TS", - uses: 1, + +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, +uses: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -67,7 +73,7 @@ expect{instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -78,53 +84,13 @@ instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::CreateWebRTCToken.new( - to: nil, - from: nil, - uses: nil, - uses: 2, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - from: "TS", - uses: 1, - ) - instance_2 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - from: "TS", - uses: 1, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::CreateWebRTCToken.new( - to: "TS", - from: "TS", - uses: 1, - ) - instance_2 = Freeclimb::CreateWebRTCToken.new( - to: "ST", - from: "ST", - uses: 2, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -132,7 +98,7 @@ instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -143,7 +109,7 @@ instance_1 = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) instance_2 = Freeclimb::CreateWebRTCToken.new expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -154,7 +120,7 @@ instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) it 'deserializes the data of to' do expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String) @@ -172,7 +138,7 @@ instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) expect(instance.to_s).to eq(instance.to_hash.to_s) end @@ -183,7 +149,7 @@ instance = Freeclimb::CreateWebRTCToken.new( to: "TS", from: "TS", - uses: 1, +uses: 1, ) expect(instance.to_hash).to be_a_kind_of(Hash) end @@ -192,12 +158,12 @@ 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 @@ -209,7 +175,7 @@ from: "TS", - uses: 1, +uses: 1, ) it 'returns to in the form of hash' do expect(instance._to_hash(instance.to)).to eq(instance.to) diff --git a/spec/models/enqueue_spec.rb b/spec/models/enqueue_spec.rb index 6945199b..6d132bdb 100644 --- a/spec/models/enqueue_spec.rb +++ b/spec/models/enqueue_spec.rb @@ -58,9 +58,13 @@ 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 @@ -93,52 +97,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Enqueue.new( - action_url: nil, - queue_id: nil, - wait_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Enqueue.new( - 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", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - 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", - ) - instance_2 = Freeclimb::Enqueue.new( - 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 diff --git a/spec/models/filter_logs_request_spec.rb b/spec/models/filter_logs_request_spec.rb index d21f1bd7..a1fc3b67 100644 --- a/spec/models/filter_logs_request_spec.rb +++ b/spec/models/filter_logs_request_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,38 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::FilterLogsRequest.new( - pql: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::FilterLogsRequest.new( - pql: "TS", - ) - instance_2 = Freeclimb::FilterLogsRequest.new( - pql: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::FilterLogsRequest.new( - pql: "TS", - ) - instance_2 = Freeclimb::FilterLogsRequest.new( - pql: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/get_digits_spec.rb b/spec/models/get_digits_spec.rb index c8cff341..80699cff 100644 --- a/spec/models/get_digits_spec.rb +++ b/spec/models/get_digits_spec.rb @@ -35,8 +35,11 @@ describe 'test attribute "digit_timeout_ms"' do it 'should work' do - instance.digit_timeout_ms = 1 - expect(instance.digit_timeout_ms).to eq(1) + + + instance.digit_timeout_ms = 1 + expect(instance.digit_timeout_ms).to eq(1) + end end @@ -56,22 +59,31 @@ describe 'test attribute "initial_timeout_ms"' do it 'should work' do - instance.initial_timeout_ms = 1 - expect(instance.initial_timeout_ms).to eq(1) + + + 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 - instance.max_digits = 1 - expect(instance.max_digits).to eq(1) + + + instance.max_digits = 1 + expect(instance.max_digits).to eq(1) + end end describe 'test attribute "min_digits"' do it 'should work' do - instance.min_digits = 1 - expect(instance.min_digits).to eq(1) + + + instance.min_digits = 1 + expect(instance.min_digits).to eq(1) + end end @@ -93,25 +105,35 @@ it 'properly initializes with values' do expect{instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, + +digit_timeout_ms: 1, + finish_on_key: "TS", + flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, - prompts: Array.new(), + +initial_timeout_ms: 1, + +max_digits: 1, + +min_digits: 1, + + prompts: Freeclimb::PerclCommand.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, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, invalid_attribute: true @@ -120,12 +142,13 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, invalid_attribute: true @@ -137,93 +160,34 @@ it 'checks if properties are valid' do instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::GetDigits.new( - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - digit_timeout_ms: 0, - finish_on_key: "ST", - flush_buffer: false, - initial_timeout_ms: 0, - max_digits: 0, - min_digits: 0, - 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 instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -235,12 +199,13 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -252,12 +217,13 @@ describe 'test method "_deserialize"' do instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -294,12 +260,13 @@ it 'returns the string representation of the object' do instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -311,12 +278,13 @@ it 'returns the object in the form of hash' do instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -326,23 +294,25 @@ obj = Object.new() instance_1 = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) instance_2 = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, - max_digits: 1, - min_digits: 1, +initial_timeout_ms: 1, +max_digits: 1, +min_digits: 1, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), privacy_mode: true, ) @@ -354,17 +324,17 @@ instance = Freeclimb::GetDigits.new( action_url: "TS", - digit_timeout_ms: 1, +digit_timeout_ms: 1, finish_on_key: "TS", flush_buffer: true, - initial_timeout_ms: 1, +initial_timeout_ms: 1, - max_digits: 1, +max_digits: 1, - min_digits: 1, +min_digits: 1, prompts: Array.new(), diff --git a/spec/models/get_speech_spec.rb b/spec/models/get_speech_spec.rb index ba8b3bd0..faa98fb6 100644 --- a/spec/models/get_speech_spec.rb +++ b/spec/models/get_speech_spec.rb @@ -75,43 +75,61 @@ describe 'test attribute "no_input_timeout_ms"' do it 'should work' do - instance.no_input_timeout_ms = 1 - expect(instance.no_input_timeout_ms).to eq(1) + + + 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 - instance.recognition_timeout_ms = 1 - expect(instance.recognition_timeout_ms).to eq(1) + + + 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 - instance.confidence_threshold = BigDecimal("1.0") - expect(instance.confidence_threshold).to eq(BigDecimal("1.0")) + + + 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 - instance.sensitivity_level = BigDecimal("1.0") - expect(instance.sensitivity_level).to eq(BigDecimal("1.0")) + + + 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 - instance.speech_complete_timeout_ms = 1 - expect(instance.speech_complete_timeout_ms).to eq(1) + + + 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 - instance.speech_incomplete_timeout_ms = 1 - expect(instance.speech_incomplete_timeout_ms).to eq(1) + + + instance.speech_incomplete_timeout_ms = 1 + expect(instance.speech_incomplete_timeout_ms).to eq(1) + end end @@ -126,30 +144,46 @@ it 'properly initializes with values' do expect{instance = Freeclimb::GetSpeech.new( action_url: "TS", + + grammar_type: Freeclimb::GrammarType.new(), + grammar_type: "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, + + prompts: Freeclimb::PerclCommand.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.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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) @@ -157,15 +191,17 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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) @@ -176,109 +212,43 @@ it 'checks if properties are valid' do instance = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - 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, +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 - it 'checks if properties are invalid' do - instance = Freeclimb::GetSpeech.new( - action_url: nil, - grammar_file: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::GetSpeech.new( - action_url: "TS", - grammar_type: "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: "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 - instance_1 = Freeclimb::GetSpeech.new( - action_url: "TS", - grammar_type: "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: "ST", - grammar_type: "BUILT_IN", - grammar_file: "ST", - grammar_rule: "ST", - play_beep: false, - prompts: nil, - no_input_timeout_ms: 0, - recognition_timeout_ms: 0, - speech_complete_timeout_ms: 0, - speech_incomplete_timeout_ms: 0, - 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::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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) @@ -289,15 +259,17 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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 @@ -308,15 +280,17 @@ describe 'test method "_deserialize"' do instance = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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 @@ -361,15 +335,17 @@ it 'returns the string representation of the object' do instance = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +no_input_timeout_ms: 1, +recognition_timeout_ms: 1, +speech_complete_timeout_ms: 1, +speech_incomplete_timeout_ms: 1, privacy_mode: true, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -380,15 +356,17 @@ it 'returns the object in the form of hash' do instance = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +no_input_timeout_ms: 1, +recognition_timeout_ms: 1, +speech_complete_timeout_ms: 1, +speech_incomplete_timeout_ms: 1, privacy_mode: true, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -397,28 +375,32 @@ obj = Object.new() instance_1 = Freeclimb::GetSpeech.new( action_url: "TS", + grammar_type: Freeclimb::GrammarType.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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.new(), grammar_type: "URL", grammar_file: "TS", grammar_rule: "TS", play_beep: true, + prompts: Freeclimb::PerclCommand.new(), prompts: Array.new(), - no_input_timeout_ms: 1, - recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +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.to_hash).to eq(instance_2.to_hash) @@ -439,15 +421,15 @@ prompts: Array.new(), - no_input_timeout_ms: 1, +no_input_timeout_ms: 1, - recognition_timeout_ms: 1, +recognition_timeout_ms: 1, - speech_complete_timeout_ms: 1, +speech_complete_timeout_ms: 1, - speech_incomplete_timeout_ms: 1, +speech_incomplete_timeout_ms: 1, privacy_mode: true, ) diff --git a/spec/models/hangup_spec.rb b/spec/models/hangup_spec.rb index 07d45750..a0917e0a 100644 --- a/spec/models/hangup_spec.rb +++ b/spec/models/hangup_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,37 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Hangup.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Hangup.new( - reason: "TS", - ) - instance_2 = Freeclimb::Hangup.new( - reason: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::Hangup.new( - reason: "TS", - ) - instance_2 = Freeclimb::Hangup.new( - reason: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/incoming_number_list_spec.rb b/spec/models/incoming_number_list_spec.rb index af07fdd3..8f7f224b 100644 --- a/spec/models/incoming_number_list_spec.rb +++ b/spec/models/incoming_number_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +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: Freeclimb::IncomingNumberResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::IncomingNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) instance_2 = Freeclimb::IncomingNumberList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::IncomingNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::IncomingNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) instance_2 = Freeclimb::IncomingNumberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + incoming_phone_numbers: Freeclimb::IncomingNumberResult.new(), incoming_phone_numbers: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::IncomingNumberList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/incoming_number_request_spec.rb b/spec/models/incoming_number_request_spec.rb index cd335918..73cb8df2 100644 --- a/spec/models/incoming_number_request_spec.rb +++ b/spec/models/incoming_number_request_spec.rb @@ -51,8 +51,11 @@ it 'properly initializes with values' do expect{instance = 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 @@ -82,45 +85,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - _alias: "TS", - campaign_id: "TS", - ) - instance_2 = Freeclimb::IncomingNumberRequest.new( - 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 - instance_1 = Freeclimb::IncomingNumberRequest.new( - application_id: "TS", - _alias: "TS", - campaign_id: "TS", - ) - instance_2 = Freeclimb::IncomingNumberRequest.new( - application_id: "ST", - _alias: "ST", - campaign_id: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/incoming_number_result_spec.rb b/spec/models/incoming_number_result_spec.rb index ddb26377..cc699530 100644 --- a/spec/models/incoming_number_result_spec.rb +++ b/spec/models/incoming_number_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -149,21 +152,40 @@ it 'properly initializes with values' do expect{instance = Freeclimb::IncomingNumberResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + + capabilities: Freeclimb::Capabilities.new(), + capabilities: Freeclimb::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: Freeclimb::TFN.new(), + tfn: Freeclimb::TFN.new, )}.not_to raise_error() end @@ -172,7 +194,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -185,6 +208,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -194,7 +218,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -207,6 +232,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -219,7 +245,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -232,97 +259,14 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::IncomingNumberResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 = Object.new() - instance_1 = 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, - ) - instance_2 = 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, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = 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, - ) - instance_2 = Freeclimb::IncomingNumberResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -331,7 +275,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -344,6 +289,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -356,7 +302,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -369,6 +316,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) instance_2 = Freeclimb::IncomingNumberResult.new @@ -381,7 +329,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -394,6 +343,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) it 'deserializes the data of uri' do @@ -455,7 +405,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -468,6 +419,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -480,7 +432,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -493,6 +446,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -503,7 +457,8 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -516,13 +471,15 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) instance_2 = Freeclimb::IncomingNumberResult.new( uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, + capabilities: Freeclimb::Capabilities.new(), capabilities: Freeclimb::Capabilities.new, campaign_id: "TS", phone_number_id: "TS", @@ -535,6 +492,7 @@ voice_enabled: true, sms_enabled: true, offnet: true, + tfn: Freeclimb::TFN.new(), tfn: Freeclimb::TFN.new, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -549,7 +507,7 @@ date_updated: "TS", - revision: 1, +revision: 1, campaign_id: "TS", diff --git a/spec/models/log_list_spec.rb b/spec/models/log_list_spec.rb index 58aea704..5b551ee5 100644 --- a/spec/models/log_list_spec.rb +++ b/spec/models/log_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - logs: Array.new(), + + logs: Freeclimb::LogResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::LogList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::LogList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) instance_2 = Freeclimb::LogList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::LogList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::LogList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) instance_2 = Freeclimb::LogList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + logs: Freeclimb::LogResult.new(), logs: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::LogList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/log_result_spec.rb b/spec/models/log_result_spec.rb index 5530a4a6..b1f6c8f4 100644 --- a/spec/models/log_result_spec.rb +++ b/spec/models/log_result_spec.rb @@ -28,8 +28,11 @@ describe 'test attribute "timestamp"' do it 'should work' do - instance.timestamp = 1 - expect(instance.timestamp).to eq(1) + + + instance.timestamp = 1 + expect(instance.timestamp).to eq(1) + end end @@ -88,18 +91,27 @@ describe 'test method "initialize"' do it 'properly initializes with values' do expect{instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + + level: Freeclimb::LogLevel.new(), + level: "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, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -111,7 +123,8 @@ end it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -126,7 +139,8 @@ describe 'test method "valid"' do it 'checks if properties are valid' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -136,67 +150,16 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::LogResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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.new() - instance_1 = Freeclimb::LogResult.new( - timestamp: 1, - level: "INFO", - request_id: "TS", - account_id: "TS", - call_id: "TS", - message: "TS", - metadata: obj, - ) - instance_2 = Freeclimb::LogResult.new( - timestamp: 1, - level: "INFO", - request_id: "TS", - account_id: "TS", - call_id: "TS", - message: "TS", - metadata: obj, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::LogResult.new( - timestamp: 1, - level: "INFO", - request_id: "TS", - account_id: "TS", - call_id: "TS", - message: "TS", - metadata: Object.new(), - ) - instance_2 = Freeclimb::LogResult.new( - timestamp: 0, - level: "WARNING", - request_id: "ST", - account_id: "ST", - call_id: "ST", - message: "ST", - metadata: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -211,7 +174,8 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do instance_1 = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -226,7 +190,8 @@ describe 'test method "_deserialize"' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -257,7 +222,8 @@ describe 'test method "to_s"' do it 'returns the string representation of the object' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -272,7 +238,8 @@ describe 'test method "to_hash"' do it 'returns the object in the form of hash' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -285,7 +252,8 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -294,7 +262,8 @@ metadata: obj, ) instance_2 = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, + level: Freeclimb::LogLevel.new(), level: "INFO", request_id: "TS", account_id: "TS", @@ -308,7 +277,7 @@ describe 'test method "_to_hash"' do instance = Freeclimb::LogResult.new( - timestamp: 1, +timestamp: 1, level: "INFO", diff --git a/spec/models/make_call_request_spec.rb b/spec/models/make_call_request_spec.rb index 980aaedf..b93224a2 100644 --- a/spec/models/make_call_request_spec.rb +++ b/spec/models/make_call_request_spec.rb @@ -70,8 +70,11 @@ describe 'test attribute "timeout"' do it 'should work' do - instance.timeout = 1 - expect(instance.timeout).to eq(1) + + + instance.timeout = 1 + expect(instance.timeout).to eq(1) + end end @@ -100,15 +103,25 @@ 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, + +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 @@ -119,7 +132,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -134,7 +147,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -152,82 +165,16 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::MakeCallRequest.new( - from: nil, - to: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - to: "ST", - application_id: "ST", - send_digits: "ST", - if_machine: "ST", - if_machine_url: "ST", - timeout: 0, - 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 @@ -239,7 +186,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -257,7 +204,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -275,7 +222,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -321,7 +268,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -339,7 +286,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -355,7 +302,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -367,7 +314,7 @@ send_digits: "TS", if_machine: "TS", if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", privacy_mode: true, call_connect_url: "TS", @@ -390,7 +337,7 @@ if_machine_url: "TS", - timeout: 1, +timeout: 1, parent_call_id: "TS", diff --git a/spec/models/message_request_spec.rb b/spec/models/message_request_spec.rb index 0886798d..eb7bfb09 100644 --- a/spec/models/message_request_spec.rb +++ b/spec/models/message_request_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -93,14 +96,24 @@ it 'properly initializes with values' do expect{instance = Freeclimb::MessageRequest.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +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 @@ -108,7 +121,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -122,7 +135,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -139,7 +152,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -148,72 +161,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::MessageRequest.new( - from: nil, - to: nil, - text: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - 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 @@ -222,7 +172,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -239,7 +189,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -256,7 +206,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -298,7 +248,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -315,7 +265,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -330,7 +280,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -341,7 +291,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, from: "TS", to: "TS", text: "TS", @@ -360,7 +310,7 @@ date_updated: "TS", - revision: 1, +revision: 1, from: "TS", diff --git a/spec/models/message_result_spec.rb b/spec/models/message_result_spec.rb index bad2df90..debd49af 100644 --- a/spec/models/message_result_spec.rb +++ b/spec/models/message_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -167,8 +170,11 @@ describe 'test attribute "segment_count"' do it 'should work' do - instance.segment_count = BigDecimal("1.0") - expect(instance.segment_count).to eq(BigDecimal("1.0")) + + + instance.segment_count = 1.0 + expect(instance.segment_count).to eq(1.0) + end end @@ -183,20 +189,38 @@ it 'properly initializes with values' do expect{instance = Freeclimb::MessageResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + account_id: "TS", + message_id: "TS", + + status: Freeclimb::MessageStatus.new(), + status: "NEW", from: "TS", + to: "TS", + text: "TS", + direction: "TS", + notification_url: "TS", + brand_id: "TS", + campaign_id: "TS", + + + media_urls: Array.new(), + )}.not_to raise_error() end it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageResult' do @@ -204,9 +228,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -224,9 +249,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -247,9 +273,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -258,98 +285,14 @@ notification_url: "TS", brand_id: "TS", campaign_id: "TS", - segment_count: 1, +segment_count: 1, media_urls: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::MessageResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 = Object.new() - instance_1 = Freeclimb::MessageResult.new( - uri: "TS", - date_created: "TS", - date_updated: "TS", - revision: 1, - account_id: "TS", - message_id: "TS", - status: "NEW", - from: "TS", - to: "TS", - text: "TS", - direction: "TS", - notification_url: "TS", - brand_id: "TS", - campaign_id: "TS", - media_urls: [], - ) - instance_2 = Freeclimb::MessageResult.new( - uri: "TS", - date_created: "TS", - date_updated: "TS", - revision: 1, - account_id: "TS", - message_id: "TS", - status: "NEW", - from: "TS", - to: "TS", - text: "TS", - direction: "TS", - notification_url: "TS", - brand_id: "TS", - campaign_id: "TS", - media_urls: [], - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::MessageResult.new( - uri: "TS", - date_created: "TS", - date_updated: "TS", - revision: 1, - account_id: "TS", - message_id: "TS", - status: "NEW", - from: "TS", - to: "TS", - text: "TS", - direction: "TS", - notification_url: "TS", - brand_id: "TS", - campaign_id: "TS", - media_urls: [], - ) - instance_2 = Freeclimb::MessageResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - account_id: "ST", - message_id: "ST", - status: "QUEUED", - from: "ST", - to: "ST", - text: "ST", - direction: "ST", - notification_url: "ST", - brand_id: "ST", - campaign_id: "ST", - media_urls: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -358,9 +301,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -381,9 +325,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -404,9 +349,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -470,9 +416,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -493,9 +440,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -514,9 +462,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -531,9 +480,10 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", message_id: "TS", + status: Freeclimb::MessageStatus.new(), status: "NEW", from: "TS", to: "TS", @@ -556,7 +506,7 @@ date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", diff --git a/spec/models/messages_list_spec.rb b/spec/models/messages_list_spec.rb index 94555683..809b1495 100644 --- a/spec/models/messages_list_spec.rb +++ b/spec/models/messages_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - messages: Array.new(), + + messages: Freeclimb::MessageResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::MessagesList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::MessagesList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) instance_2 = Freeclimb::MessagesList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::MessagesList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::MessagesList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) instance_2 = Freeclimb::MessagesList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + messages: Freeclimb::MessageResult.new(), messages: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::MessagesList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/mutable_resource_model_spec.rb b/spec/models/mutable_resource_model_spec.rb index dc9bbb70..8d89814c 100644 --- a/spec/models/mutable_resource_model_spec.rb +++ b/spec/models/mutable_resource_model_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -58,9 +61,13 @@ it 'properly initializes with values' do expect{instance = Freeclimb::MutableResourceModel.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + )}.not_to raise_error() end it 'fails to initialize with input argument that is not a hash in Freeclimb::MutableResourceModel' do @@ -68,7 +75,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -77,7 +84,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -89,53 +96,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::MutableResourceModel.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::MutableResourceModel.new( - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::MutableResourceModel.new( - uri: "TS", - date_created: "TS", - date_updated: "TS", - revision: 1, - ) - instance_2 = Freeclimb::MutableResourceModel.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -144,7 +111,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -156,7 +123,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) instance_2 = Freeclimb::MutableResourceModel.new expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -168,7 +135,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) it 'deserializes the data of uri' do expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String) @@ -190,7 +157,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.to_s).to eq(instance.to_hash.to_s) end @@ -202,7 +169,7 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.to_hash).to be_a_kind_of(Hash) end @@ -212,13 +179,13 @@ 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 @@ -232,7 +199,7 @@ date_updated: "TS", - revision: 1, +revision: 1, ) it 'returns uri in the form of hash' do expect(instance._to_hash(instance.uri)).to eq(instance.uri) diff --git a/spec/models/out_dial_spec.rb b/spec/models/out_dial_spec.rb index b1780c1f..2069caf3 100644 --- a/spec/models/out_dial_spec.rb +++ b/spec/models/out_dial_spec.rb @@ -89,8 +89,11 @@ describe 'test attribute "timeout"' do it 'should work' do - instance.timeout = 1 - expect(instance.timeout).to eq(1) + + + instance.timeout = 1 + expect(instance.timeout).to eq(1) + end end @@ -105,15 +108,26 @@ 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.new(), + if_machine: "REDIRECT", if_machine_url: "TS", + send_digits: "TS", + status_callback_url: "TS", - timeout: 1, + +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 @@ -122,11 +136,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -137,11 +152,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -155,86 +171,19 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::OutDial.new( - action_url: nil, - call_connect_url: nil, - calling_number: nil, - destination: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::OutDial.new( - action_url: "TS", - call_connect_url: "TS", - calling_number: "TS", - destination: "TS", - if_machine: "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: "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 - instance_1 = Freeclimb::OutDial.new( - action_url: "TS", - call_connect_url: "TS", - calling_number: "TS", - destination: "TS", - if_machine: "REDIRECT", - if_machine_url: "TS", - send_digits: "TS", - status_callback_url: "TS", - timeout: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::OutDial.new( - action_url: "ST", - call_connect_url: "ST", - calling_number: "ST", - destination: "ST", - if_machine: "HANGUP", - if_machine_url: "ST", - send_digits: "ST", - status_callback_url: "ST", - timeout: 0, - privacy_mode: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -244,11 +193,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -262,11 +212,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) instance_2 = Freeclimb::OutDial.new @@ -280,11 +231,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) it 'deserializes the data of action_url' do @@ -323,11 +275,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -341,11 +294,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -357,11 +311,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) instance_2 = Freeclimb::OutDial.new( @@ -369,11 +324,12 @@ call_connect_url: "TS", calling_number: "TS", destination: "TS", + if_machine: Freeclimb::IfMachine.new(), if_machine: "REDIRECT", if_machine_url: "TS", send_digits: "TS", status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -398,7 +354,7 @@ status_callback_url: "TS", - timeout: 1, +timeout: 1, privacy_mode: true, ) diff --git a/spec/models/pagination_model_spec.rb b/spec/models/pagination_model_spec.rb index 43ba3fd3..2415a73f 100644 --- a/spec/models/pagination_model_spec.rb +++ b/spec/models/pagination_model_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -78,35 +96,42 @@ 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, +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, +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, +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) @@ -116,82 +141,30 @@ 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, +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 - it 'checks if properties are invalid' do - instance = Freeclimb::PaginationModel.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::PaginationModel.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +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) @@ -201,12 +174,12 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", ) instance_2 = Freeclimb::PaginationModel.new @@ -216,12 +189,12 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PaginationModel.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +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 @@ -250,12 +223,12 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -265,12 +238,12 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -278,21 +251,21 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::PaginationModel.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -301,17 +274,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::PaginationModel.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", ) diff --git a/spec/models/park_spec.rb b/spec/models/park_spec.rb index d4e1a0e9..74ffb127 100644 --- a/spec/models/park_spec.rb +++ b/spec/models/park_spec.rb @@ -51,8 +51,11 @@ it 'properly initializes with values' do expect{instance = 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 @@ -82,47 +85,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Park.new( - wait_url: nil, - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Park.new( - wait_url: "TS", - action_url: "TS", - notification_url: "TS", - ) - instance_2 = Freeclimb::Park.new( - 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 - instance_1 = Freeclimb::Park.new( - wait_url: "TS", - action_url: "TS", - notification_url: "TS", - ) - instance_2 = Freeclimb::Park.new( - 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 diff --git a/spec/models/pause_spec.rb b/spec/models/pause_spec.rb index 4898b9e2..995322c8 100644 --- a/spec/models/pause_spec.rb +++ b/spec/models/pause_spec.rb @@ -28,26 +28,30 @@ describe 'test attribute "length"' do it 'should work' do - instance.length = 1 - expect(instance.length).to eq(1) + + + 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, +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, +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, +length: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -56,48 +60,19 @@ describe 'test method "valid"' do it 'checks if properties are valid' do instance = Freeclimb::Pause.new( - length: 1, +length: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Pause.new( - length: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Pause.new( - length: 1, - ) - instance_2 = Freeclimb::Pause.new( - length: 1, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::Pause.new( - length: 1, - ) - instance_2 = Freeclimb::Pause.new( - length: 0, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::Pause.new( - length: 1, +length: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -106,7 +81,7 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do instance_1 = Freeclimb::Pause.new( - length: 1, +length: 1, ) instance_2 = Freeclimb::Pause.new expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -115,7 +90,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Pause.new( - length: 1, +length: 1, ) it 'deserializes the data of length' do expect(instance._deserialize("Integer", instance.length)).to be_a_kind_of(Integer) @@ -125,7 +100,7 @@ describe 'test method "to_s"' 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 @@ -134,17 +109,17 @@ describe 'test method "to_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 obj = Object.new() 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 @@ -152,7 +127,7 @@ describe 'test method "_to_hash"' do instance = Freeclimb::Pause.new( - length: 1, +length: 1, ) it 'returns length in the form of hash' do expect(instance._to_hash(instance.length)).to eq(instance.length) diff --git a/spec/models/percl_command_spec.rb b/spec/models/percl_command_spec.rb index 7c62ff88..9302874f 100644 --- a/spec/models/percl_command_spec.rb +++ b/spec/models/percl_command_spec.rb @@ -31,6 +31,7 @@ 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 @@ -54,37 +55,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::PerclCommand.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::PerclCommand.new( - command: "TS", - ) - instance_2 = Freeclimb::PerclCommand.new( - command: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::PerclCommand.new( - command: "TS", - ) - instance_2 = Freeclimb::PerclCommand.new( - command: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/percl_script_spec.rb b/spec/models/percl_script_spec.rb index a4faea37..dd59487f 100644 --- a/spec/models/percl_script_spec.rb +++ b/spec/models/percl_script_spec.rb @@ -36,17 +36,20 @@ describe 'test method "initialize"' do it 'properly initializes with values' do expect{instance = Freeclimb::PerclScript.new( - commands: Array.new(), + commands: Freeclimb::PerclCommand.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: Freeclimb::PerclCommand.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: Freeclimb::PerclCommand.new(), commands: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -56,46 +59,20 @@ describe 'test method "valid"' do it 'checks if properties are valid' do instance = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::PerclScript.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::PerclScript.new( - commands: [], - ) - instance_2 = Freeclimb::PerclScript.new( - commands: [], - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::PerclScript.new( - commands: [], - ) - instance_2 = Freeclimb::PerclScript.new( - commands: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -105,6 +82,7 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do instance_1 = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) instance_2 = Freeclimb::PerclScript.new @@ -114,6 +92,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) it 'deserializes the data of commands' do @@ -124,6 +103,7 @@ describe 'test method "to_s"' do it 'returns the string representation of the object' do instance = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -133,6 +113,7 @@ describe 'test method "to_hash"' do it 'returns the object in the form of hash' do instance = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -140,9 +121,11 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) instance_2 = Freeclimb::PerclScript.new( + commands: Freeclimb::PerclCommand.new(), commands: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) diff --git a/spec/models/play_early_media_spec.rb b/spec/models/play_early_media_spec.rb index 1d7c487c..6270595b 100644 --- a/spec/models/play_early_media_spec.rb +++ b/spec/models/play_early_media_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,38 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::PlayEarlyMedia.new( - file: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::PlayEarlyMedia.new( - file: "TS", - ) - instance_2 = Freeclimb::PlayEarlyMedia.new( - file: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::PlayEarlyMedia.new( - file: "TS", - ) - instance_2 = Freeclimb::PlayEarlyMedia.new( - file: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/play_spec.rb b/spec/models/play_spec.rb index de951e53..c255c1d9 100644 --- a/spec/models/play_spec.rb +++ b/spec/models/play_spec.rb @@ -35,8 +35,11 @@ describe 'test attribute "loop"' do it 'should work' do - instance.loop = 1 - expect(instance.loop).to eq(1) + + + instance.loop = 1 + expect(instance.loop).to eq(1) + end end @@ -51,14 +54,17 @@ it 'properly initializes with values' do expect{instance = Freeclimb::Play.new( file: "TS", - loop: 1, + +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, +loop: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -66,7 +72,7 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -77,58 +83,21 @@ it 'checks if properties are valid' do instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Play.new( - file: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Play.new( - file: "TS", - loop: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::Play.new( - 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 - instance_1 = Freeclimb::Play.new( - file: "TS", - loop: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::Play.new( - file: "ST", - loop: 0, - 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::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -139,7 +108,7 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) instance_2 = Freeclimb::Play.new @@ -150,7 +119,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) it 'deserializes the data of file' do @@ -168,7 +137,7 @@ it 'returns the string representation of the object' do instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -179,7 +148,7 @@ it 'returns the object in the form of hash' do instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -188,12 +157,12 @@ obj = Object.new() instance_1 = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) instance_2 = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -204,7 +173,7 @@ instance = Freeclimb::Play.new( file: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) diff --git a/spec/models/queue_list_spec.rb b/spec/models/queue_list_spec.rb index 491784ac..aa03a9e2 100644 --- a/spec/models/queue_list_spec.rb +++ b/spec/models/queue_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - queues: Array.new(), + + queues: Freeclimb::QueueResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::QueueList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::QueueList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) instance_2 = Freeclimb::QueueList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::QueueList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) instance_2 = Freeclimb::QueueList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queues: Freeclimb::QueueResult.new(), queues: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/queue_member_list_spec.rb b/spec/models/queue_member_list_spec.rb index 68b98890..b7c870bb 100644 --- a/spec/models/queue_member_list_spec.rb +++ b/spec/models/queue_member_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - queue_members: Array.new(), + + queue_members: Freeclimb::QueueMember.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::QueueMemberList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::QueueMemberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) instance_2 = Freeclimb::QueueMemberList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueMemberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::QueueMemberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) instance_2 = Freeclimb::QueueMemberList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + queue_members: Freeclimb::QueueMember.new(), queue_members: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::QueueMemberList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/queue_member_spec.rb b/spec/models/queue_member_spec.rb index 405c2181..6841a79c 100644 --- a/spec/models/queue_member_spec.rb +++ b/spec/models/queue_member_spec.rb @@ -42,15 +42,21 @@ describe 'test attribute "wait_time"' do it 'should work' do - instance.wait_time = 1 - expect(instance.wait_time).to eq(1) + + + instance.wait_time = 1 + expect(instance.wait_time).to eq(1) + end end describe 'test attribute "position"' do it 'should work' do - instance.position = 1 - expect(instance.position).to eq(1) + + + instance.position = 1 + expect(instance.position).to eq(1) + end end @@ -65,18 +71,23 @@ it 'properly initializes with values' do expect{instance = Freeclimb::QueueMember.new( uri: "TS", + call_id: "TS", - wait_time: 1, - position: 1, + +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, +wait_time: 1, +position: 1, date_enqueued: "TS", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -85,8 +96,8 @@ expect{instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -98,59 +109,15 @@ instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::QueueMember.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::QueueMember.new( - 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", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::QueueMember.new( - uri: "TS", - call_id: "TS", - wait_time: 1, - position: 1, - date_enqueued: "TS", - ) - instance_2 = Freeclimb::QueueMember.new( - uri: "ST", - call_id: "ST", - wait_time: 0, - position: 0, - date_enqueued: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -158,8 +125,8 @@ instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) expect(instance.hash).to be_a_kind_of(Integer) @@ -171,8 +138,8 @@ instance_1 = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) instance_2 = Freeclimb::QueueMember.new @@ -184,8 +151,8 @@ instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) it 'deserializes the data of uri' do @@ -210,8 +177,8 @@ instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -223,8 +190,8 @@ instance = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -234,15 +201,15 @@ instance_1 = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) instance_2 = Freeclimb::QueueMember.new( uri: "TS", call_id: "TS", - wait_time: 1, - position: 1, +wait_time: 1, +position: 1, date_enqueued: "TS", ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -255,9 +222,9 @@ call_id: "TS", - wait_time: 1, +wait_time: 1, - position: 1, +position: 1, date_enqueued: "TS", ) diff --git a/spec/models/queue_request_spec.rb b/spec/models/queue_request_spec.rb index 094fa2a9..6ffbfbfb 100644 --- a/spec/models/queue_request_spec.rb +++ b/spec/models/queue_request_spec.rb @@ -35,8 +35,11 @@ describe 'test attribute "max_size"' do it 'should work' do - instance.max_size = 1 - expect(instance.max_size).to eq(1) + + + instance.max_size = 1 + expect(instance.max_size).to eq(1) + end end @@ -44,20 +47,22 @@ it 'properly initializes with values' do expect{instance = Freeclimb::QueueRequest.new( _alias: "TS", - max_size: 1, + +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, +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, +max_size: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -67,52 +72,20 @@ it 'checks if properties are valid' do instance = Freeclimb::QueueRequest.new( _alias: "TS", - max_size: 1, +max_size: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::QueueRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::QueueRequest.new( - _alias: "TS", - max_size: 1, - ) - instance_2 = Freeclimb::QueueRequest.new( - _alias: "TS", - max_size: 1, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::QueueRequest.new( - _alias: "TS", - max_size: 1, - ) - instance_2 = Freeclimb::QueueRequest.new( - _alias: "ST", - max_size: 0, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::QueueRequest.new( _alias: "TS", - max_size: 1, +max_size: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -122,7 +95,7 @@ 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 expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -132,7 +105,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::QueueRequest.new( _alias: "TS", - max_size: 1, +max_size: 1, ) it 'deserializes the data of _alias' do expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) @@ -146,7 +119,7 @@ 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 @@ -156,7 +129,7 @@ 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 @@ -164,11 +137,11 @@ obj = Object.new() 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 @@ -178,7 +151,7 @@ instance = Freeclimb::QueueRequest.new( _alias: "TS", - max_size: 1, +max_size: 1, ) it 'returns _alias in the form of hash' do expect(instance._to_hash(instance._alias)).to eq(instance._alias) diff --git a/spec/models/queue_result_spec.rb b/spec/models/queue_result_spec.rb index b53423ce..b47a5a1f 100644 --- a/spec/models/queue_result_spec.rb +++ b/spec/models/queue_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -77,22 +80,31 @@ describe 'test attribute "max_size"' do it 'should work' do - instance.max_size = 1 - expect(instance.max_size).to eq(1) + + + instance.max_size = 1 + expect(instance.max_size).to eq(1) + end end describe 'test attribute "current_size"' do it 'should work' do - instance.current_size = 1 - expect(instance.current_size).to eq(1) + + + 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 - instance.average_queue_removal_time = 1 - expect(instance.average_queue_removal_time).to eq(1) + + + instance.average_queue_removal_time = 1 + expect(instance.average_queue_removal_time).to eq(1) + end end @@ -108,15 +120,26 @@ it 'properly initializes with values' do expect{instance = Freeclimb::QueueResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + account_id: "TS", + queue_id: "TS", + _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, + +max_size: 1, + +current_size: 1, + +average_queue_removal_time: 1, + + subresource_uris: Object.new(), )}.not_to raise_error() end @@ -125,13 +148,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -141,13 +164,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -160,88 +183,20 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::QueueResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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.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, - ) - 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, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' 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(), - ) - instance_2 = Freeclimb::QueueResult.new( - uri: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - account_id: "ST", - queue_id: "ST", - _alias: "ST", - max_size: 0, - current_size: 0, - average_queue_removal_time: 0, - subresource_uris: nil, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -250,13 +205,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -269,13 +224,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) instance_2 = Freeclimb::QueueResult.new @@ -288,13 +243,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) it 'deserializes the data of uri' do @@ -338,13 +293,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -357,13 +312,13 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -374,26 +329,26 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: obj, ) instance_2 = Freeclimb::QueueResult.new( uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", queue_id: "TS", _alias: "TS", - max_size: 1, - current_size: 1, - average_queue_removal_time: 1, +max_size: 1, +current_size: 1, +average_queue_removal_time: 1, subresource_uris: obj, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -408,7 +363,7 @@ date_updated: "TS", - revision: 1, +revision: 1, account_id: "TS", @@ -416,11 +371,11 @@ _alias: "TS", - max_size: 1, +max_size: 1, - current_size: 1, +current_size: 1, - average_queue_removal_time: 1, +average_queue_removal_time: 1, subresource_uris: Object.new(), ) diff --git a/spec/models/record_utterance_spec.rb b/spec/models/record_utterance_spec.rb index 51f758e2..76883996 100644 --- a/spec/models/record_utterance_spec.rb +++ b/spec/models/record_utterance_spec.rb @@ -35,8 +35,11 @@ describe 'test attribute "silence_timeout_ms"' do it 'should work' do - instance.silence_timeout_ms = 1 - expect(instance.silence_timeout_ms).to eq(1) + + + instance.silence_timeout_ms = 1 + expect(instance.silence_timeout_ms).to eq(1) + end end @@ -49,8 +52,11 @@ describe 'test attribute "max_length_sec"' do it 'should work' do - instance.max_length_sec = 1 - expect(instance.max_length_sec).to eq(1) + + + instance.max_length_sec = 1 + expect(instance.max_length_sec).to eq(1) + end end @@ -79,20 +85,27 @@ it 'properly initializes with values' do expect{instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, + +silence_timeout_ms: 1, + finish_on_key: "TS", - max_length_sec: 1, + +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, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -102,9 +115,9 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -117,80 +130,27 @@ it 'checks if properties are valid' do instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::RecordUtterance.new( - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - silence_timeout_ms: 0, - finish_on_key: "ST", - max_length_sec: 0, - 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 instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -203,9 +163,9 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -218,9 +178,9 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -252,9 +212,9 @@ it 'returns the string representation of the object' do instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -267,9 +227,9 @@ it 'returns the object in the form of hash' do instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -280,18 +240,18 @@ obj = Object.new() instance_1 = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +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, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, auto_start: true, privacy_mode: true, @@ -304,11 +264,11 @@ instance = Freeclimb::RecordUtterance.new( action_url: "TS", - silence_timeout_ms: 1, +silence_timeout_ms: 1, finish_on_key: "TS", - max_length_sec: 1, +max_length_sec: 1, play_beep: true, diff --git a/spec/models/recording_list_spec.rb b/spec/models/recording_list_spec.rb index 76e9ebbb..4bbe9703 100644 --- a/spec/models/recording_list_spec.rb +++ b/spec/models/recording_list_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - recordings: Array.new(), + + recordings: Freeclimb::RecordingResult.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::RecordingList.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::RecordingList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) instance_2 = Freeclimb::RecordingList.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::RecordingList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::RecordingList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) instance_2 = Freeclimb::RecordingList.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + recordings: Freeclimb::RecordingResult.new(), recordings: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::RecordingList.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/recording_result_spec.rb b/spec/models/recording_result_spec.rb index a2700ee2..b3341716 100644 --- a/spec/models/recording_result_spec.rb +++ b/spec/models/recording_result_spec.rb @@ -49,8 +49,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -77,8 +80,11 @@ describe 'test attribute "duration_sec"' do it 'should work' do - instance.duration_sec = 1 - expect(instance.duration_sec).to eq(1) + + + instance.duration_sec = 1 + expect(instance.duration_sec).to eq(1) + end end @@ -93,14 +99,23 @@ it 'properly initializes with values' do expect{instance = Freeclimb::RecordingResult.new( uri: "TS", + date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + recording_id: "TS", + account_id: "TS", + call_id: "TS", - duration_sec: 1, + +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 @@ -108,11 +123,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -122,11 +137,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -139,78 +154,18 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::RecordingResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: "ST", - date_created: "ST", - date_updated: "ST", - revision: 0, - recording_id: "ST", - account_id: "ST", - call_id: "ST", - duration_sec: 0, - conference_id: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -219,11 +174,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) expect(instance.hash).to be_a_kind_of(Integer) @@ -236,11 +191,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) instance_2 = Freeclimb::RecordingResult.new @@ -253,11 +208,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) it 'deserializes the data of uri' do @@ -295,11 +250,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -312,11 +267,11 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -327,22 +282,22 @@ uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) instance_2 = Freeclimb::RecordingResult.new( uri: "TS", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", account_id: "TS", call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -357,7 +312,7 @@ date_updated: "TS", - revision: 1, +revision: 1, recording_id: "TS", @@ -365,7 +320,7 @@ call_id: "TS", - duration_sec: 1, +duration_sec: 1, conference_id: "TS", ) diff --git a/spec/models/redirect_spec.rb b/spec/models/redirect_spec.rb index 041709f9..f4028b35 100644 --- a/spec/models/redirect_spec.rb +++ b/spec/models/redirect_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,38 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Redirect.new( - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Redirect.new( - action_url: "TS", - ) - instance_2 = Freeclimb::Redirect.new( - action_url: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::Redirect.new( - action_url: "TS", - ) - instance_2 = Freeclimb::Redirect.new( - action_url: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/reject_spec.rb b/spec/models/reject_spec.rb index 2fe2ea4b..3932ac18 100644 --- a/spec/models/reject_spec.rb +++ b/spec/models/reject_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,37 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Reject.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Reject.new( - reason: "TS", - ) - instance_2 = Freeclimb::Reject.new( - reason: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::Reject.new( - reason: "TS", - ) - instance_2 = Freeclimb::Reject.new( - reason: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/remove_from_conference_spec.rb b/spec/models/remove_from_conference_spec.rb index 07eedf5f..7c1f50c6 100644 --- a/spec/models/remove_from_conference_spec.rb +++ b/spec/models/remove_from_conference_spec.rb @@ -43,6 +43,17 @@ end end + describe 'test method "valid"' do + it 'checks if properties are valid' do + instance = Freeclimb::RemoveFromConference.new( + ) + expect(instance.valid?).to eq(true) + end + end + + describe 'test method "eql?"' do + end + describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::RemoveFromConference.new( diff --git a/spec/models/say_spec.rb b/spec/models/say_spec.rb index 88d688b7..7907b649 100644 --- a/spec/models/say_spec.rb +++ b/spec/models/say_spec.rb @@ -42,8 +42,11 @@ describe 'test attribute "loop"' do it 'should work' do - instance.loop = 1 - expect(instance.loop).to eq(1) + + + instance.loop = 1 + expect(instance.loop).to eq(1) + end end @@ -58,16 +61,20 @@ it 'properly initializes with values' do expect{instance = Freeclimb::Say.new( text: "TS", + language: "TS", - loop: 1, + +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, +loop: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -76,7 +83,7 @@ expect{instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -88,55 +95,14 @@ instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Say.new( - text: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Say.new( - text: "TS", - language: "TS", - loop: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::Say.new( - 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 - instance_1 = Freeclimb::Say.new( - text: "TS", - language: "TS", - loop: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::Say.new( - text: "ST", - language: "ST", - loop: 0, - privacy_mode: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -144,7 +110,7 @@ instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -156,7 +122,7 @@ instance_1 = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) instance_2 = Freeclimb::Say.new @@ -168,7 +134,7 @@ instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) it 'deserializes the data of text' do @@ -190,7 +156,7 @@ instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -202,7 +168,7 @@ instance = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -212,13 +178,13 @@ instance_1 = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) instance_2 = Freeclimb::Say.new( text: "TS", language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -231,7 +197,7 @@ language: "TS", - loop: 1, +loop: 1, privacy_mode: true, ) diff --git a/spec/models/send_digits_spec.rb b/spec/models/send_digits_spec.rb index bd83410a..5a45d280 100644 --- a/spec/models/send_digits_spec.rb +++ b/spec/models/send_digits_spec.rb @@ -35,8 +35,11 @@ describe 'test attribute "pause_ms"' do it 'should work' do - instance.pause_ms = 1 - expect(instance.pause_ms).to eq(1) + + + instance.pause_ms = 1 + expect(instance.pause_ms).to eq(1) + end end @@ -51,14 +54,17 @@ it 'properly initializes with values' do expect{instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, + +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, +pause_ms: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -66,7 +72,7 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -77,58 +83,21 @@ it 'checks if properties are valid' do instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SendDigits.new( - digits: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::SendDigits.new( - digits: "TS", - pause_ms: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::SendDigits.new( - 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 - instance_1 = Freeclimb::SendDigits.new( - digits: "TS", - pause_ms: 1, - privacy_mode: true, - ) - instance_2 = Freeclimb::SendDigits.new( - digits: "ST", - pause_ms: 0, - 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::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -139,7 +108,7 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) instance_2 = Freeclimb::SendDigits.new @@ -150,7 +119,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) it 'deserializes the data of digits' do @@ -168,7 +137,7 @@ it 'returns the string representation of the object' do instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -179,7 +148,7 @@ it 'returns the object in the form of hash' do instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -188,12 +157,12 @@ obj = Object.new() instance_1 = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) instance_2 = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -204,7 +173,7 @@ instance = Freeclimb::SendDigits.new( digits: "TS", - pause_ms: 1, +pause_ms: 1, privacy_mode: true, ) diff --git a/spec/models/set_listen_spec.rb b/spec/models/set_listen_spec.rb index 7976d420..575d6ebf 100644 --- a/spec/models/set_listen_spec.rb +++ b/spec/models/set_listen_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,37 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SetListen.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::SetListen.new( - listen: true, - ) - instance_2 = Freeclimb::SetListen.new( - listen: true, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SetListen.new( - listen: true, - ) - instance_2 = Freeclimb::SetListen.new( - listen: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/set_talk_spec.rb b/spec/models/set_talk_spec.rb index 9270daca..ee73fd8b 100644 --- a/spec/models/set_talk_spec.rb +++ b/spec/models/set_talk_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,37 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SetTalk.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::SetTalk.new( - talk: true, - ) - instance_2 = Freeclimb::SetTalk.new( - talk: true, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SetTalk.new( - talk: true, - ) - instance_2 = Freeclimb::SetTalk.new( - talk: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/sms_spec.rb b/spec/models/sms_spec.rb index 16649d42..604cafb8 100644 --- a/spec/models/sms_spec.rb +++ b/spec/models/sms_spec.rb @@ -58,9 +58,13 @@ 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 @@ -93,52 +97,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::Sms.new( - to: nil, - from: nil, - text: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::Sms.new( - to: "TS", - from: "TS", - text: "TS", - notification_url: "TS", - ) - instance_2 = Freeclimb::Sms.new( - 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 - instance_1 = Freeclimb::Sms.new( - to: "TS", - from: "TS", - text: "TS", - notification_url: "TS", - ) - instance_2 = Freeclimb::Sms.new( - 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 diff --git a/spec/models/sms_ten_dlc_brand_spec.rb b/spec/models/sms_ten_dlc_brand_spec.rb index c7be29fc..15ecbb5c 100644 --- a/spec/models/sms_ten_dlc_brand_spec.rb +++ b/spec/models/sms_ten_dlc_brand_spec.rb @@ -490,35 +490,66 @@ it 'properly initializes with values' do expect{instance = Freeclimb::SMSTenDLCBrand.new( account_id: "TS", + + entity_type: "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: "NONE", ip_address: "TS", + website: "TS", + + brand_relationship: "BASIC_ACCOUNT", vertical: "TS", + alt_business_id: "TS", + + alt_business_id_type: "NONE", universal_ein: "TS", + reference_id: "TS", + + optional_attributes: Hash.new(), mock: true, + + identity_status: "SELF_DECLARED", + create_date: "2022-07-05T15:17:05Z", )}.not_to raise_error() end @@ -633,144 +664,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if model is empty' do - instance = Freeclimb::SMSTenDLCBrand.new() - expect(instance.valid?).to eq(false) - end end describe 'test method "eql?"' do - it 'checks if objects are equal' do - obj = Object.new() - instance_1 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - entity_type: "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: "NONE", - ip_address: "TS", - website: "TS", - brand_relationship: "BASIC_ACCOUNT", - vertical: "TS", - alt_business_id: "TS", - alt_business_id_type: "NONE", - universal_ein: "TS", - reference_id: "TS", - mock: true, - identity_status: "SELF_DECLARED", - ) - instance_2 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - entity_type: "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: "NONE", - ip_address: "TS", - website: "TS", - brand_relationship: "BASIC_ACCOUNT", - vertical: "TS", - alt_business_id: "TS", - alt_business_id_type: "NONE", - universal_ein: "TS", - reference_id: "TS", - mock: true, - identity_status: "SELF_DECLARED", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::SMSTenDLCBrand.new( - account_id: "TS", - entity_type: "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: "NONE", - ip_address: "TS", - website: "TS", - brand_relationship: "BASIC_ACCOUNT", - vertical: "TS", - alt_business_id: "TS", - alt_business_id_type: "NONE", - universal_ein: "TS", - reference_id: "TS", - mock: true, - identity_status: "SELF_DECLARED", - ) - instance_2 = Freeclimb::SMSTenDLCBrand.new( - account_id: "ST", - entity_type: "PUBLIC_PROFIT", - 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: "NASDAQ", - ip_address: "ST", - website: "ST", - brand_relationship: "SMALL_ACCOUNT", - vertical: "ST", - alt_business_id: "ST", - alt_business_id_type: "DUNS", - universal_ein: "ST", - reference_id: "ST", - mock: false, - identity_status: "UNVERIFIED", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do 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 8fa626e7..ec942dba 100644 --- a/spec/models/sms_ten_dlc_brands_list_result_spec.rb +++ b/spec/models/sms_ten_dlc_brands_list_result_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - brands: Array.new(), + + brands: Freeclimb::SMSTenDLCBrand.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCBrandsListResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTenDLCBrand.new(), brands: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCBrandsListResult.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/sms_ten_dlc_campaign_spec.rb b/spec/models/sms_ten_dlc_campaign_spec.rb index 22c3af5e..b0e9d068 100644 --- a/spec/models/sms_ten_dlc_campaign_spec.rb +++ b/spec/models/sms_ten_dlc_campaign_spec.rb @@ -342,40 +342,77 @@ it 'properly initializes with values' do expect{instance = Freeclimb::SMSTenDLCCampaign.new( account_id: "TS", + campaign_id: "TS", + csp_id: "TS", + reseller_id: "TS", + + status: "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 @@ -505,160 +542,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::SMSTenDLCCampaign.new( - account_id: "TS", - campaign_id: "TS", - csp_id: "TS", - reseller_id: "TS", - status: "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: "TS", - campaign_id: "TS", - csp_id: "TS", - reseller_id: "TS", - status: "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(true) - 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: "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: "EXPIRED", - 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 "hash"' do 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 53c5c83b..3543199c 100644 --- a/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +++ b/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - campaigns: Array.new(), + + campaigns: Freeclimb::SMSTenDLCCampaign.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + campaigns: Freeclimb::SMSTenDLCCampaign.new(), campaigns: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCCampaignsListResult.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", 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 4ebcaf3c..78d92973 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb @@ -120,8 +120,11 @@ describe 'test attribute "evp_vetting_score"' do it 'should work' do - instance.evp_vetting_score = 1 - expect(instance.evp_vetting_score).to eq(1) + + + instance.evp_vetting_score = 1 + expect(instance.evp_vetting_score).to eq(1) + end end @@ -129,16 +132,27 @@ 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, +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 @@ -153,7 +167,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -169,7 +183,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -188,72 +202,13 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if model is empty' 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 - obj = Object.new() - 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", - 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", - evp_vetting_score: 1, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - 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", - evp_vetting_score: 1, - ) - 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", - evp_vetting_score: 0, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -269,7 +224,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -288,7 +243,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -307,7 +262,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) it 'deserializes the data of account_id' do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) @@ -357,7 +312,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) expect(instance.to_s).to eq(instance.to_hash.to_s) end @@ -376,7 +331,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) expect(instance.to_hash).to be_a_kind_of(Hash) end @@ -393,7 +348,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignBrand.new( account_id: "TS", @@ -406,7 +361,7 @@ email: "TS", website: "TS", optional_attributes: Hash.new(), - evp_vetting_score: 1, +evp_vetting_score: 1, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -434,7 +389,7 @@ optional_attributes: Hash.new(), - evp_vetting_score: 1, +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) diff --git a/spec/models/sms_ten_dlc_partner_campaign_spec.rb b/spec/models/sms_ten_dlc_partner_campaign_spec.rb index 38047298..750ac0d1 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_spec.rb @@ -287,33 +287,63 @@ it 'properly initializes with values' do expect{instance = Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", + campaign_id: "TS", + + status: "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: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, )}.not_to raise_error() end @@ -347,6 +377,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -381,6 +412,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, invalid_attribute: true )}.to raise_error(ArgumentError) @@ -418,140 +450,14 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) expect(instance.valid?).to eq(true) end - it 'checks if model is empty' 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 = Object.new() - instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - campaign_id: "TS", - status: "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", - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "TS", - campaign_id: "TS", - status: "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", - ) - 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: "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", - ) - instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( - account_id: "ST", - campaign_id: "ST", - status: "EXPIRED", - 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", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -585,6 +491,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) expect(instance.hash).to be_a_kind_of(Integer) @@ -622,6 +529,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new @@ -659,6 +567,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) it 'deserializes the data of account_id' do @@ -781,6 +690,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -818,6 +728,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -853,6 +764,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( @@ -884,6 +796,7 @@ help_keywords: "TS", optin_message: "TS", optout_message: "TS", + brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new(), brand: Freeclimb::SMSTenDLCPartnerCampaignBrand.new, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) 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 bf6de495..4a4f89db 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 @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - partner_campaigns: Array.new(), + + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + partner_campaigns: Freeclimb::SMSTenDLCPartnerCampaign.new(), partner_campaigns: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTenDLCPartnerCampaignsListResult.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/sms_toll_free_campaign_spec.rb b/spec/models/sms_toll_free_campaign_spec.rb index 75541497..cc4370de 100644 --- a/spec/models/sms_toll_free_campaign_spec.rb +++ b/spec/models/sms_toll_free_campaign_spec.rb @@ -91,8 +91,11 @@ describe 'test attribute "revision"' do it 'should work' do - instance.revision = 1 - expect(instance.revision).to eq(1) + + + instance.revision = 1 + expect(instance.revision).to eq(1) + end end @@ -100,12 +103,19 @@ it 'properly initializes with values' do expect{instance = Freeclimb::SMSTollFreeCampaign.new( account_id: "TS", + campaign_id: "TS", + use_case: "TS", + + registration_status: "UNREGISTERED", date_created: "TS", + date_updated: "TS", - revision: 1, + +revision: 1, + )}.not_to raise_error() end it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaign' do @@ -116,7 +126,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -128,7 +138,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -143,71 +153,13 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SMSTollFreeCampaign.new( - account_id: nil, - campaign_id: nil, - use_case: nil, - date_created: nil, - date_updated: nil, - revision: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - campaign_id: "TS", - use_case: "TS", - registration_status: "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: "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 - instance_1 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "TS", - campaign_id: "TS", - use_case: "TS", - registration_status: "UNREGISTERED", - date_created: "TS", - date_updated: "TS", - revision: 1, - ) - instance_2 = Freeclimb::SMSTollFreeCampaign.new( - account_id: "ST", - campaign_id: "ST", - use_case: "ST", - registration_status: "INITIATED", - date_created: "ST", - date_updated: "ST", - revision: 0, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do @@ -219,7 +171,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -234,7 +186,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) instance_2 = Freeclimb::SMSTollFreeCampaign.new expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) @@ -249,7 +201,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) it 'deserializes the data of account_id' do expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) @@ -283,7 +235,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.to_s).to eq(instance.to_hash.to_s) end @@ -298,7 +250,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance.to_hash).to be_a_kind_of(Hash) end @@ -311,7 +263,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) instance_2 = Freeclimb::SMSTollFreeCampaign.new( account_id: "TS", @@ -320,7 +272,7 @@ registration_status: "UNREGISTERED", date_created: "TS", date_updated: "TS", - revision: 1, +revision: 1, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end @@ -340,7 +292,7 @@ date_updated: "TS", - revision: 1, +revision: 1, ) it 'returns account_id in the form of hash' do expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) 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 7d9a2e05..3ab81b29 100644 --- a/spec/models/sms_toll_free_campaigns_list_result_spec.rb +++ b/spec/models/sms_toll_free_campaigns_list_result_spec.rb @@ -28,43 +28,61 @@ describe 'test attribute "total"' do it 'should work' do - instance.total = 1 - expect(instance.total).to eq(1) + + + instance.total = 1 + expect(instance.total).to eq(1) + end end describe 'test attribute "start"' do it 'should work' do - instance.start = 1 - expect(instance.start).to eq(1) + + + instance.start = 1 + expect(instance.start).to eq(1) + end end describe 'test attribute "_end"' do it 'should work' do - instance._end = 1 - expect(instance._end).to eq(1) + + + instance._end = 1 + expect(instance._end).to eq(1) + end end describe 'test attribute "page"' do it 'should work' do - instance.page = 1 - expect(instance.page).to eq(1) + + + instance.page = 1 + expect(instance.page).to eq(1) + end end describe 'test attribute "num_pages"' do it 'should work' do - instance.num_pages = 1 - expect(instance.num_pages).to eq(1) + + + instance.num_pages = 1 + expect(instance.num_pages).to eq(1) + end end describe 'test attribute "page_size"' do it 'should work' do - instance.page_size = 1 - expect(instance.page_size).to eq(1) + + + instance.page_size = 1 + expect(instance.page_size).to eq(1) + end end @@ -85,38 +103,48 @@ 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, +total: 1, + +start: 1, + +_end: 1, + +page: 1, + +num_pages: 1, + +page_size: 1, + next_page_uri: "TS", - brands: Array.new(), + + brands: Freeclimb::SMSTollFreeCampaign.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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), invalid_attribute: true )}.to raise_error(ArgumentError) @@ -126,88 +154,34 @@ 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - 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 - 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: 0, - start: 0, - _end: 0, - page: 0, - num_pages: 0, - page_size: 0, - 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 instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) expect(instance.hash).to be_a_kind_of(Integer) @@ -217,13 +191,14 @@ describe 'test method "build_from_hash"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new @@ -233,13 +208,14 @@ describe 'test method "_deserialize"' do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) it 'deserializes the data of total' do @@ -271,13 +247,14 @@ describe 'test method "to_s"' 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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -287,13 +264,14 @@ describe 'test method "to_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, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -301,23 +279,25 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, - start: 1, - _end: 1, - page: 1, - num_pages: 1, - page_size: 1, +total: 1, +start: 1, +_end: 1, +page: 1, +num_pages: 1, +page_size: 1, next_page_uri: "TS", + brands: Freeclimb::SMSTollFreeCampaign.new(), brands: Array.new(), ) expect(instance_1.to_hash).to eq(instance_2.to_hash) @@ -326,17 +306,17 @@ describe 'test method "_to_hash"' do instance = Freeclimb::SMSTollFreeCampaignsListResult.new( - total: 1, +total: 1, - start: 1, +start: 1, - _end: 1, +_end: 1, - page: 1, +page: 1, - num_pages: 1, +num_pages: 1, - page_size: 1, +page_size: 1, next_page_uri: "TS", diff --git a/spec/models/terminate_conference_spec.rb b/spec/models/terminate_conference_spec.rb index 99a70716..2d3cc73f 100644 --- a/spec/models/terminate_conference_spec.rb +++ b/spec/models/terminate_conference_spec.rb @@ -43,6 +43,17 @@ end end + describe 'test method "valid"' do + it 'checks if properties are valid' do + instance = Freeclimb::TerminateConference.new( + ) + expect(instance.valid?).to eq(true) + end + end + + describe 'test method "eql?"' do + end + describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::TerminateConference.new( diff --git a/spec/models/tfn_spec.rb b/spec/models/tfn_spec.rb index f4e24b97..db1e3abc 100644 --- a/spec/models/tfn_spec.rb +++ b/spec/models/tfn_spec.rb @@ -37,6 +37,7 @@ 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 @@ -60,38 +61,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::TFN.new( - campaign_id: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::TFN.new( - campaign_id: "TS", - ) - instance_2 = Freeclimb::TFN.new( - campaign_id: "TS", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::TFN.new( - campaign_id: "TS", - ) - instance_2 = Freeclimb::TFN.new( - campaign_id: "ST", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/transcribe_utterance_record_spec.rb b/spec/models/transcribe_utterance_all_of_record_spec.rb similarity index 55% rename from spec/models/transcribe_utterance_record_spec.rb rename to spec/models/transcribe_utterance_all_of_record_spec.rb index 80eeb888..22e23c5b 100644 --- a/spec/models/transcribe_utterance_record_spec.rb +++ b/spec/models/transcribe_utterance_all_of_record_spec.rb @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for Freeclimb::TranscribeUtteranceRecord +# Unit tests for Freeclimb::TranscribeUtteranceAllOfRecord # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Freeclimb::TranscribeUtteranceRecord do - let(:instance) { Freeclimb::TranscribeUtteranceRecord.new } +describe Freeclimb::TranscribeUtteranceAllOfRecord do + let(:instance) { Freeclimb::TranscribeUtteranceAllOfRecord.new } - describe 'test an instance of TranscribeUtteranceRecord' do - it 'should create an instance of TranscribeUtteranceRecord' do - expect(instance).to be_instance_of(Freeclimb::TranscribeUtteranceRecord) + describe 'test an instance of TranscribeUtteranceAllOfRecord' do + it 'should create an instance of TranscribeUtteranceAllOfRecord' do + expect(instance).to be_instance_of(Freeclimb::TranscribeUtteranceAllOfRecord) end end @@ -35,39 +35,46 @@ describe 'test attribute "max_length_sec"' do it 'should work' do - instance.max_length_sec = 1 - expect(instance.max_length_sec).to eq(1) + 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 - instance.rcrd_termination_silence_time_ms = 1 - expect(instance.rcrd_termination_silence_time_ms).to eq(1) + 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( + expect{instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + + 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( + it 'fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtteranceAllOfRecord' do + expect{instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + 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( + expect{instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, invalid_attribute: true )}.to raise_error(ArgumentError) end @@ -75,61 +82,24 @@ describe 'test method "valid"' do it 'checks if properties are valid' do - instance = Freeclimb::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ) - instance_2 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 2, - rcrd_termination_silence_time_ms: 2, - ) - instance_2 = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: false, - max_length_sec: 1, - rcrd_termination_silence_time_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::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) expect(instance.hash).to be_a_kind_of(Integer) end @@ -137,21 +107,21 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do - instance_1 = Freeclimb::TranscribeUtteranceRecord.new( + instance_1 = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) - instance_2 = Freeclimb::TranscribeUtteranceRecord.new + instance_2 = Freeclimb::TranscribeUtteranceAllOfRecord.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::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) it 'deserializes the data of save_recording' do expect(instance._deserialize("Boolean", instance.save_recording)).to be_a_kind_of(TrueClass) @@ -166,10 +136,10 @@ describe 'test method "to_s"' do it 'returns the string representation of the object' do - instance = Freeclimb::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) expect(instance.to_s).to eq(instance.to_hash.to_s) end @@ -177,36 +147,36 @@ describe 'test method "to_hash"' do it 'returns the object in the form of hash' do - instance = Freeclimb::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + 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 obj = Object.new() - instance_1 = Freeclimb::TranscribeUtteranceRecord.new( + instance_1 = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) - instance_2 = Freeclimb::TranscribeUtteranceRecord.new( + instance_2 = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, + max_length_sec: 60, + rcrd_termination_silence_time_ms: 3000, ) expect(instance_1.to_hash).to eq(instance_2.to_hash) end end describe 'test method "_to_hash"' do - instance = Freeclimb::TranscribeUtteranceRecord.new( + instance = Freeclimb::TranscribeUtteranceAllOfRecord.new( save_recording: true, - max_length_sec: 1, + max_length_sec: 60, - rcrd_termination_silence_time_ms: 1, + 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) diff --git a/spec/models/transcribe_utterance_spec.rb b/spec/models/transcribe_utterance_spec.rb index 0d88d457..3bd820e2 100644 --- a/spec/models/transcribe_utterance_spec.rb +++ b/spec/models/transcribe_utterance_spec.rb @@ -42,12 +42,8 @@ describe 'test attribute "record"' do it 'should work' do - instance.record = Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ) - expect(instance.record).to be_instance_of(Freeclimb::TranscribeUtteranceRecord) + instance.record = Freeclimb::TranscribeUtteranceAllOfRecord.new + expect(instance.record).to be_instance_of(Freeclimb::TranscribeUtteranceAllOfRecord) end end @@ -76,26 +72,27 @@ it 'properly initializes with values' do expect{instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", + play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, + privacy_for_recording: true, + + prompts: Array.new(), + )}.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: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -106,11 +103,8 @@ expect{instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -124,85 +118,17 @@ instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::TranscribeUtterance.new( - action_url: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 = Object.new() - instance_1 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), - privacy_for_logging: true, - privacy_for_recording: true, - prompts: [], - ) - instance_2 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), - 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 - instance_1 = Freeclimb::TranscribeUtterance.new( - action_url: "TS", - play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 2, - rcrd_termination_silence_time_ms: 2, - ), - privacy_for_logging: true, - privacy_for_recording: true, - prompts: [], - ) - instance_2 = Freeclimb::TranscribeUtterance.new( - action_url: "ST", - play_beep: false, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), - 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 @@ -210,11 +136,8 @@ instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -228,11 +151,8 @@ instance_1 = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -246,11 +166,8 @@ instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -262,7 +179,7 @@ expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass) end it 'deserializes the data of record' do - expect(instance._deserialize("Object", instance.record)).to be_a_kind_of(Freeclimb::TranscribeUtteranceRecord) + expect(instance._deserialize("Object", instance.record)).to be_a_kind_of(Freeclimb::TranscribeUtteranceAllOfRecord) end it 'deserializes the data of privacy_for_logging' do expect(instance._deserialize("Boolean", instance.privacy_for_logging)).to be_a_kind_of(TrueClass) @@ -280,11 +197,8 @@ instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -298,11 +212,8 @@ instance = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -314,11 +225,8 @@ instance_1 = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -326,11 +234,8 @@ instance_2 = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new(), + record: Freeclimb::TranscribeUtteranceAllOfRecord.new, privacy_for_logging: true, privacy_for_recording: true, prompts: Array.new(), @@ -344,12 +249,7 @@ action_url: "TS", play_beep: true, - - record: Freeclimb::TranscribeUtteranceRecord.new( - save_recording: true, - max_length_sec: 1, - rcrd_termination_silence_time_ms: 1, - ), + privacy_for_logging: true, @@ -364,7 +264,7 @@ expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep) end it 'returns record in the form of hash' do - expect(instance._to_hash(instance.record)).to eq({:maxLengthSec=>1, :rcrdTerminationSilenceTimeMs=>1, :saveRecording=>true}) + expect(instance._to_hash(instance.record)).to eq(instance.record) end 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) diff --git a/spec/models/update_call_request_spec.rb b/spec/models/update_call_request_spec.rb index 04615af1..ae5b19c1 100644 --- a/spec/models/update_call_request_spec.rb +++ b/spec/models/update_call_request_spec.rb @@ -41,17 +41,21 @@ describe 'test method "initialize"' do it 'properly initializes with values' do expect{instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), + status: "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.new(), status: "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.new(), status: "CANCELED", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -61,47 +65,20 @@ describe 'test method "valid"' do it 'checks if properties are valid' do instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::UpdateCallRequest.new( - status: nil, - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::UpdateCallRequest.new( - status: "CANCELED", - ) - instance_2 = Freeclimb::UpdateCallRequest.new( - status: "CANCELED", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::UpdateCallRequest.new( - status: "CANCELED", - ) - instance_2 = Freeclimb::UpdateCallRequest.new( - status: "COMPLETED", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) expect(instance.hash).to be_a_kind_of(Integer) @@ -111,6 +88,7 @@ describe 'test method "build_from_hash"' do it 'builds equivalent model from hash code' do instance_1 = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) instance_2 = Freeclimb::UpdateCallRequest.new @@ -120,6 +98,7 @@ describe 'test method "_deserialize"' do instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) end @@ -127,6 +106,7 @@ describe 'test method "to_s"' do it 'returns the string representation of the object' do instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -136,6 +116,7 @@ describe 'test method "to_hash"' do it 'returns the object in the form of hash' do instance = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -143,9 +124,11 @@ it 'creates equal hash for two equal objects' do obj = Object.new() instance_1 = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) instance_2 = Freeclimb::UpdateCallRequest.new( + status: Freeclimb::UpdateCallRequestStatus.new(), status: "CANCELED", ) expect(instance_1.to_hash).to eq(instance_2.to_hash) diff --git a/spec/models/update_conference_participant_request_spec.rb b/spec/models/update_conference_participant_request_spec.rb index ee2e0383..e75c3944 100644 --- a/spec/models/update_conference_participant_request_spec.rb +++ b/spec/models/update_conference_participant_request_spec.rb @@ -44,7 +44,9 @@ it 'properly initializes with values' do expect{instance = Freeclimb::UpdateConferenceParticipantRequest.new( talk: true, + listen: true, + )}.not_to raise_error() end it 'fails to initialize with input argument that is not a hash in Freeclimb::UpdateConferenceParticipantRequest' do @@ -71,41 +73,9 @@ ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::UpdateConferenceParticipantRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - listen: true, - ) - instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - listen: true, - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: true, - listen: true, - ) - instance_2 = Freeclimb::UpdateConferenceParticipantRequest.new( - talk: false, - listen: false, - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do diff --git a/spec/models/update_conference_request_spec.rb b/spec/models/update_conference_request_spec.rb index 5269bf35..1cb42a52 100644 --- a/spec/models/update_conference_request_spec.rb +++ b/spec/models/update_conference_request_spec.rb @@ -69,14 +69,21 @@ it 'properly initializes with values' do expect{instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + + play_beep: Freeclimb::PlayBeep.new(), + play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), + status: "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.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -84,7 +91,9 @@ it 'fails to initialize with invalid attribute' do expect{instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", invalid_attribute: true )}.to raise_error(ArgumentError) @@ -95,57 +104,25 @@ it 'checks if properties are valid' do instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) expect(instance.valid?).to eq(true) end - it 'checks if properties are invalid' do - instance = Freeclimb::UpdateConferenceRequest.new( - ) - expect(instance.valid?).to eq(false) - end - it 'checks if model is empty' 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 - obj = Object.new() - instance_1 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - play_beep: "ALWAYS", - status: "EMPTY", - ) - instance_2 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - play_beep: "ALWAYS", - status: "EMPTY", - ) - expect(instance_1.eql?(instance_2)).to eq(true) - end - it 'checks if objects are not equal' do - instance_1 = Freeclimb::UpdateConferenceRequest.new( - _alias: "TS", - play_beep: "ALWAYS", - status: "EMPTY", - ) - instance_2 = Freeclimb::UpdateConferenceRequest.new( - _alias: "ST", - play_beep: "NEVER", - status: "TERMINATED", - ) - expect(instance_1.eql?(instance_2)).to eq(false) - end end describe 'test method "hash"' do it 'calculates hash code' do instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) expect(instance.hash).to be_a_kind_of(Integer) @@ -156,7 +133,9 @@ it 'builds equivalent model from hash code' do instance_1 = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) instance_2 = Freeclimb::UpdateConferenceRequest.new @@ -167,7 +146,9 @@ describe 'test method "_deserialize"' do instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) it 'deserializes the data of _alias' do @@ -179,7 +160,9 @@ it 'returns the string representation of the object' do instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) expect(instance.to_s).to eq(instance.to_hash.to_s) @@ -190,7 +173,9 @@ it 'returns the object in the form of hash' do instance = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) expect(instance.to_hash).to be_a_kind_of(Hash) @@ -199,12 +184,16 @@ obj = Object.new() instance_1 = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) instance_2 = Freeclimb::UpdateConferenceRequest.new( _alias: "TS", + play_beep: Freeclimb::PlayBeep.new(), play_beep: "ALWAYS", + status: Freeclimb::UpdateConferenceRequestStatus.new(), status: "EMPTY", ) expect(instance_1.to_hash).to eq(instance_2.to_hash)