diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7577686..ac9b0c8 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,6 +18,8 @@ docs/ApplicationResult.md docs/AvailableNumber.md docs/AvailableNumberList.md docs/BargeInReason.md +docs/BlobListResponse.md +docs/BlobResult.md docs/BuyIncomingNumberRequest.md docs/CallControlWebhook.md docs/CallDirection.md @@ -37,6 +39,7 @@ docs/ConferenceRecordingStatusWebhook.md docs/ConferenceResult.md docs/ConferenceStatus.md docs/ConferenceStatusWebhook.md +docs/CreateBlobRequest.md docs/CreateConference.md docs/CreateConferenceRequest.md docs/CreateConferenceWebhook.md @@ -83,6 +86,7 @@ docs/MessageResult.md docs/MessageStatus.md docs/MessageStatusWebhook.md docs/MessagesList.md +docs/ModifyBlobRequest.md docs/MutableResourceModel.md docs/OutDial.md docs/OutDialApiConnectWebhook.md @@ -93,6 +97,7 @@ docs/Park.md docs/Pause.md docs/PerclCommand.md docs/PerclScript.md +docs/PlatformError.md docs/Play.md docs/PlayBeep.md docs/PlayEarlyMedia.md @@ -113,6 +118,7 @@ docs/RedirectWebhook.md docs/Reject.md docs/RemoveFromConference.md docs/RemoveFromQueueNotificationWebhook.md +docs/ReplaceBlobRequest.md docs/RequestType.md docs/SMSTenDLCBrand.md docs/SMSTenDLCBrandAltBusinessIdType.md @@ -140,6 +146,8 @@ docs/Sms.md docs/StartRecordCall.md docs/TFN.md docs/TFNCampaign.md +docs/TTSEngine.md +docs/TTSEngineName.md docs/TerminateConference.md docs/TranscribeReason.md docs/TranscribeTermReason.md @@ -173,6 +181,8 @@ lib/freeclimb/models/application_result.rb lib/freeclimb/models/available_number.rb lib/freeclimb/models/available_number_list.rb lib/freeclimb/models/barge_in_reason.rb +lib/freeclimb/models/blob_list_response.rb +lib/freeclimb/models/blob_result.rb lib/freeclimb/models/buy_incoming_number_request.rb lib/freeclimb/models/call_control_webhook.rb lib/freeclimb/models/call_direction.rb @@ -192,6 +202,7 @@ lib/freeclimb/models/conference_recording_status_webhook.rb lib/freeclimb/models/conference_result.rb lib/freeclimb/models/conference_status.rb lib/freeclimb/models/conference_status_webhook.rb +lib/freeclimb/models/create_blob_request.rb lib/freeclimb/models/create_conference.rb lib/freeclimb/models/create_conference_request.rb lib/freeclimb/models/create_conference_webhook.rb @@ -237,6 +248,7 @@ lib/freeclimb/models/message_result.rb lib/freeclimb/models/message_status.rb lib/freeclimb/models/message_status_webhook.rb lib/freeclimb/models/messages_list.rb +lib/freeclimb/models/modify_blob_request.rb lib/freeclimb/models/mutable_resource_model.rb lib/freeclimb/models/out_dial.rb lib/freeclimb/models/out_dial_api_connect_webhook.rb @@ -247,6 +259,7 @@ lib/freeclimb/models/park.rb lib/freeclimb/models/pause.rb lib/freeclimb/models/percl_command.rb lib/freeclimb/models/percl_script.rb +lib/freeclimb/models/platform_error.rb lib/freeclimb/models/play.rb lib/freeclimb/models/play_beep.rb lib/freeclimb/models/play_early_media.rb @@ -267,6 +280,7 @@ lib/freeclimb/models/redirect_webhook.rb lib/freeclimb/models/reject.rb lib/freeclimb/models/remove_from_conference.rb lib/freeclimb/models/remove_from_queue_notification_webhook.rb +lib/freeclimb/models/replace_blob_request.rb lib/freeclimb/models/request_type.rb lib/freeclimb/models/say.rb lib/freeclimb/models/send_digits.rb @@ -300,6 +314,8 @@ lib/freeclimb/models/transcribe_term_reason.rb lib/freeclimb/models/transcribe_utterance.rb lib/freeclimb/models/transcribe_utterance_record.rb lib/freeclimb/models/transcribe_webhook.rb +lib/freeclimb/models/tts_engine.rb +lib/freeclimb/models/tts_engine_name.rb lib/freeclimb/models/unpark.rb lib/freeclimb/models/update_call_request.rb lib/freeclimb/models/update_call_request_status.rb @@ -323,6 +339,8 @@ spec/models/application_result_spec.rb spec/models/available_number_list_spec.rb spec/models/available_number_spec.rb spec/models/barge_in_reason_spec.rb +spec/models/blob_list_response_spec.rb +spec/models/blob_result_spec.rb spec/models/buy_incoming_number_request_spec.rb spec/models/call_control_webhook_spec.rb spec/models/call_direction_spec.rb @@ -342,6 +360,7 @@ spec/models/conference_recording_status_webhook_spec.rb spec/models/conference_result_spec.rb spec/models/conference_status_spec.rb spec/models/conference_status_webhook_spec.rb +spec/models/create_blob_request_spec.rb spec/models/create_conference_request_spec.rb spec/models/create_conference_spec.rb spec/models/create_conference_webhook_spec.rb @@ -387,6 +406,7 @@ spec/models/message_result_spec.rb spec/models/message_status_spec.rb spec/models/message_status_webhook_spec.rb spec/models/messages_list_spec.rb +spec/models/modify_blob_request_spec.rb spec/models/mutable_resource_model_spec.rb spec/models/out_dial_api_connect_webhook_spec.rb spec/models/out_dial_connect_webhook_spec.rb @@ -397,6 +417,7 @@ spec/models/park_spec.rb spec/models/pause_spec.rb spec/models/percl_command_spec.rb spec/models/percl_script_spec.rb +spec/models/platform_error_spec.rb spec/models/play_beep_spec.rb spec/models/play_early_media_spec.rb spec/models/play_spec.rb @@ -417,6 +438,7 @@ spec/models/redirect_webhook_spec.rb spec/models/reject_spec.rb spec/models/remove_from_conference_spec.rb spec/models/remove_from_queue_notification_webhook_spec.rb +spec/models/replace_blob_request_spec.rb spec/models/request_type_spec.rb spec/models/say_spec.rb spec/models/send_digits_spec.rb @@ -450,6 +472,8 @@ spec/models/transcribe_term_reason_spec.rb spec/models/transcribe_utterance_record_spec.rb spec/models/transcribe_utterance_spec.rb spec/models/transcribe_webhook_spec.rb +spec/models/tts_engine_name_spec.rb +spec/models/tts_engine_spec.rb spec/models/unpark_spec.rb spec/models/update_call_request_spec.rb spec/models/update_call_request_status_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a1067..bed72b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] -None + + +## [5.4.0] - 2025-10-24 + +### Added + +- Add models for new TTS models and engine setup +- Add models and default api methods for Blob API + ## [5.3.0] - 2025-09-23 diff --git a/Gemfile.lock b/Gemfile.lock index 029199b..fda972d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - freeclimb (5.3.0) + freeclimb (5.4.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 77a90fe..0192164 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 5.3.0 +- Package version: 5.4.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) @@ -15,7 +15,7 @@ For more information, please visit [https://www.freeclimb.com/support/](https:// Add this to the Gemfile: - gem 'freeclimb', '~> 5.3.0' + gem 'freeclimb', '~> 5.4.0' and run from your terminal @@ -44,9 +44,9 @@ gem build freeclimb.gemspec Then either install the gem locally: ```shell -gem install ./freeclimb-5.3.0.gem +gem install ./freeclimb-5.4.0.gem ``` -(for development, run `gem install --dev ./freeclimb-5.3.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./freeclimb-5.4.0.gem` to install the development dependencies) ## Getting Started @@ -103,12 +103,14 @@ Class | Method | HTTP request | Description *Freeclimb::DefaultApi* | [**create_a_conference**](docs/DefaultApi.md#create_a_conference) | **POST** /Accounts/{accountId}/Conferences | Create a Conference *Freeclimb::DefaultApi* | [**create_a_queue**](docs/DefaultApi.md#create_a_queue) | **POST** /Accounts/{accountId}/Queues | Create a Queue *Freeclimb::DefaultApi* | [**create_an_application**](docs/DefaultApi.md#create_an_application) | **POST** /Accounts/{accountId}/Applications | Create an application +*Freeclimb::DefaultApi* | [**create_blob**](docs/DefaultApi.md#create_blob) | **POST** /Accounts/{accountId}/Blobs | Create a Blob *Freeclimb::DefaultApi* | [**create_export**](docs/DefaultApi.md#create_export) | **POST** /Accounts/{accountId}/Exports | Create an Export *Freeclimb::DefaultApi* | [**create_knowledge_base_completion**](docs/DefaultApi.md#create_knowledge_base_completion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base *Freeclimb::DefaultApi* | [**delete_a_recording**](docs/DefaultApi.md#delete_a_recording) | **DELETE** /Accounts/{accountId}/Recordings/{recordingId} | Delete a Recording *Freeclimb::DefaultApi* | [**delete_an_application**](docs/DefaultApi.md#delete_an_application) | **DELETE** /Accounts/{accountId}/Applications/{applicationId} | Delete an application *Freeclimb::DefaultApi* | [**delete_an_export**](docs/DefaultApi.md#delete_an_export) | **DELETE** /Accounts/{accountId}/Exports/{exportId} | Delete an Export *Freeclimb::DefaultApi* | [**delete_an_incoming_number**](docs/DefaultApi.md#delete_an_incoming_number) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number +*Freeclimb::DefaultApi* | [**delete_blob**](docs/DefaultApi.md#delete_blob) | **DELETE** /Accounts/{accountId}/Blobs/{blobId} | Delete Blob *Freeclimb::DefaultApi* | [**dequeue_a_member**](docs/DefaultApi.md#dequeue_a_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member *Freeclimb::DefaultApi* | [**dequeue_head_member**](docs/DefaultApi.md#dequeue_head_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member *Freeclimb::DefaultApi* | [**download_a_recording_file**](docs/DefaultApi.md#download_a_recording_file) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Download | Download a Recording File @@ -125,6 +127,7 @@ Class | Method | HTTP request | Description *Freeclimb::DefaultApi* | [**get_an_export**](docs/DefaultApi.md#get_an_export) | **GET** /Accounts/{accountId}/Exports/{exportId} | Get an Export *Freeclimb::DefaultApi* | [**get_an_incoming_number**](docs/DefaultApi.md#get_an_incoming_number) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Get an Incoming Number *Freeclimb::DefaultApi* | [**get_an_sms_message**](docs/DefaultApi.md#get_an_sms_message) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message +*Freeclimb::DefaultApi* | [**get_blob**](docs/DefaultApi.md#get_blob) | **GET** /Accounts/{accountId}/Blobs/{blobId} | Get Blob *Freeclimb::DefaultApi* | [**get_head_member**](docs/DefaultApi.md#get_head_member) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member *Freeclimb::DefaultApi* | [**get_ten_dlc_sms_brand**](docs/DefaultApi.md#get_ten_dlc_sms_brand) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands/{brandId} | Get a 10DLC SMS Brand *Freeclimb::DefaultApi* | [**get_ten_dlc_sms_brands**](docs/DefaultApi.md#get_ten_dlc_sms_brands) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands | Get list of SMS 10DLC Brands @@ -138,6 +141,7 @@ Class | Method | HTTP request | Description *Freeclimb::DefaultApi* | [**list_all_account_logs**](docs/DefaultApi.md#list_all_account_logs) | **GET** /Accounts/{accountId}/Logs | List All Account Logs *Freeclimb::DefaultApi* | [**list_applications**](docs/DefaultApi.md#list_applications) | **GET** /Accounts/{accountId}/Applications | List applications *Freeclimb::DefaultApi* | [**list_available_numbers**](docs/DefaultApi.md#list_available_numbers) | **GET** /AvailablePhoneNumbers | List available numbers +*Freeclimb::DefaultApi* | [**list_blobs**](docs/DefaultApi.md#list_blobs) | **GET** /Accounts/{accountId}/Blobs | List Blobs belonging to an account. *Freeclimb::DefaultApi* | [**list_call_logs**](docs/DefaultApi.md#list_call_logs) | **GET** /Accounts/{accountId}/Calls/{callId}/Logs | List Call Logs *Freeclimb::DefaultApi* | [**list_call_recordings**](docs/DefaultApi.md#list_call_recordings) | **GET** /Accounts/{accountId}/Calls/{callId}/Recordings | List Call Recordings *Freeclimb::DefaultApi* | [**list_calls**](docs/DefaultApi.md#list_calls) | **GET** /Accounts/{accountId}/Calls | List Calls @@ -151,7 +155,9 @@ Class | Method | HTTP request | Description *Freeclimb::DefaultApi* | [**list_sms_messages**](docs/DefaultApi.md#list_sms_messages) | **GET** /Accounts/{accountId}/Messages | List SMS Messages *Freeclimb::DefaultApi* | [**make_a_call**](docs/DefaultApi.md#make_a_call) | **POST** /Accounts/{accountId}/Calls | Make a Call *Freeclimb::DefaultApi* | [**make_a_webrtc_jwt**](docs/DefaultApi.md#make_a_webrtc_jwt) | **POST** /Accounts/{accountId}/Calls/WebRTC/Token | Make a JWT for WebRTC calling +*Freeclimb::DefaultApi* | [**modify_blob**](docs/DefaultApi.md#modify_blob) | **PATCH** /Accounts/{accountId}/Blobs/{blobId} | Modify Blob *Freeclimb::DefaultApi* | [**remove_a_participant**](docs/DefaultApi.md#remove_a_participant) | **DELETE** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Remove a Participant +*Freeclimb::DefaultApi* | [**replace_blob**](docs/DefaultApi.md#replace_blob) | **PUT** /Accounts/{accountId}/Blobs/{blobId} | Replace Blob *Freeclimb::DefaultApi* | [**send_an_sms_message**](docs/DefaultApi.md#send_an_sms_message) | **POST** /Accounts/{accountId}/Messages | Send an SMS Message *Freeclimb::DefaultApi* | [**stream_a_recording_file**](docs/DefaultApi.md#stream_a_recording_file) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Stream | Stream a Recording File *Freeclimb::DefaultApi* | [**update_a_conference**](docs/DefaultApi.md#update_a_conference) | **POST** /Accounts/{accountId}/Conferences/{conferenceId} | Update a Conference @@ -179,6 +185,8 @@ Class | Method | HTTP request | Description - [Freeclimb::AvailableNumber](docs/AvailableNumber.md) - [Freeclimb::AvailableNumberList](docs/AvailableNumberList.md) - [Freeclimb::BargeInReason](docs/BargeInReason.md) + - [Freeclimb::BlobListResponse](docs/BlobListResponse.md) + - [Freeclimb::BlobResult](docs/BlobResult.md) - [Freeclimb::BuyIncomingNumberRequest](docs/BuyIncomingNumberRequest.md) - [Freeclimb::CallControlWebhook](docs/CallControlWebhook.md) - [Freeclimb::CallDirection](docs/CallDirection.md) @@ -198,6 +206,7 @@ Class | Method | HTTP request | Description - [Freeclimb::ConferenceResult](docs/ConferenceResult.md) - [Freeclimb::ConferenceStatus](docs/ConferenceStatus.md) - [Freeclimb::ConferenceStatusWebhook](docs/ConferenceStatusWebhook.md) + - [Freeclimb::CreateBlobRequest](docs/CreateBlobRequest.md) - [Freeclimb::CreateConference](docs/CreateConference.md) - [Freeclimb::CreateConferenceRequest](docs/CreateConferenceRequest.md) - [Freeclimb::CreateConferenceWebhook](docs/CreateConferenceWebhook.md) @@ -243,6 +252,7 @@ Class | Method | HTTP request | Description - [Freeclimb::MessageStatus](docs/MessageStatus.md) - [Freeclimb::MessageStatusWebhook](docs/MessageStatusWebhook.md) - [Freeclimb::MessagesList](docs/MessagesList.md) + - [Freeclimb::ModifyBlobRequest](docs/ModifyBlobRequest.md) - [Freeclimb::MutableResourceModel](docs/MutableResourceModel.md) - [Freeclimb::OutDial](docs/OutDial.md) - [Freeclimb::OutDialApiConnectWebhook](docs/OutDialApiConnectWebhook.md) @@ -253,6 +263,7 @@ Class | Method | HTTP request | Description - [Freeclimb::Pause](docs/Pause.md) - [Freeclimb::PerclCommand](docs/PerclCommand.md) - [Freeclimb::PerclScript](docs/PerclScript.md) + - [Freeclimb::PlatformError](docs/PlatformError.md) - [Freeclimb::Play](docs/Play.md) - [Freeclimb::PlayBeep](docs/PlayBeep.md) - [Freeclimb::PlayEarlyMedia](docs/PlayEarlyMedia.md) @@ -273,6 +284,7 @@ Class | Method | HTTP request | Description - [Freeclimb::Reject](docs/Reject.md) - [Freeclimb::RemoveFromConference](docs/RemoveFromConference.md) - [Freeclimb::RemoveFromQueueNotificationWebhook](docs/RemoveFromQueueNotificationWebhook.md) + - [Freeclimb::ReplaceBlobRequest](docs/ReplaceBlobRequest.md) - [Freeclimb::RequestType](docs/RequestType.md) - [Freeclimb::SMSTenDLCBrand](docs/SMSTenDLCBrand.md) - [Freeclimb::SMSTenDLCBrandAltBusinessIdType](docs/SMSTenDLCBrandAltBusinessIdType.md) @@ -300,6 +312,8 @@ Class | Method | HTTP request | Description - [Freeclimb::StartRecordCall](docs/StartRecordCall.md) - [Freeclimb::TFN](docs/TFN.md) - [Freeclimb::TFNCampaign](docs/TFNCampaign.md) + - [Freeclimb::TTSEngine](docs/TTSEngine.md) + - [Freeclimb::TTSEngineName](docs/TTSEngineName.md) - [Freeclimb::TerminateConference](docs/TerminateConference.md) - [Freeclimb::TranscribeReason](docs/TranscribeReason.md) - [Freeclimb::TranscribeTermReason](docs/TranscribeTermReason.md) diff --git a/docs/AvailableNumber.md b/docs/AvailableNumber.md index 6421b13..2869b0f 100644 --- a/docs/AvailableNumber.md +++ b/docs/AvailableNumber.md @@ -7,8 +7,6 @@ | **capabilities** | [**Capabilities**](Capabilities.md) | | [optional] | | **campaign_id** | **String** | The campaign ID generated by the campaign registry | [optional] | | **phone_number** | **String** | The phone number, in E.164 format (+ country code and phone number: +18003608245). | [optional] | -| **voice_enabled** | **Boolean** | Typically set to true for all numbers. | [optional] | -| **sms_enabled** | **Boolean** | Indicates whether the phone number can send and receive SMS messages. | [optional] | | **region** | **String** | The state or province of this phone number. | [optional] | | **country** | **String** | The country of this phone number. | [optional] | @@ -21,8 +19,6 @@ instance = Freeclimb::AvailableNumber.new( capabilities: null, campaign_id: null, phone_number: null, - voice_enabled: null, - sms_enabled: null, region: null, country: null ) diff --git a/docs/BlobListResponse.md b/docs/BlobListResponse.md new file mode 100644 index 0000000..6de774b --- /dev/null +++ b/docs/BlobListResponse.md @@ -0,0 +1,32 @@ +# Freeclimb::BlobListResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **total** | **Integer** | Total amount of requested resource. | [optional] | +| **start** | **Integer** | Resource index at start of current page | [optional] | +| **_end** | **Integer** | Resource index at end of current page | [optional] | +| **page** | **Integer** | Current page | [optional] | +| **num_pages** | **Integer** | Total number of pages | [optional] | +| **page_size** | **Integer** | Number of items per page | [optional] | +| **next_page_uri** | **String** | Uri to retrieve the next page of items | [optional] | +| **blobs** | [**Array<BlobResult>**](BlobResult.md) | | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::BlobListResponse.new( + total: null, + start: null, + _end: null, + page: null, + num_pages: null, + page_size: null, + next_page_uri: null, + blobs: null +) +``` + diff --git a/docs/BlobResult.md b/docs/BlobResult.md new file mode 100644 index 0000000..743ad3c --- /dev/null +++ b/docs/BlobResult.md @@ -0,0 +1,32 @@ +# Freeclimb::BlobResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob_id** | **String** | Identifier which can be used to reference this blob in future interations. | [optional] | +| **account_id** | **String** | | [optional] | +| **_alias** | **String** | Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided in the creation request. | [optional] | +| **revision** | **Integer** | | [optional] | +| **date_created** | **Time** | An RFC3339 timestamp with millisecond resolution. It represents the time this blob was created. | [optional] | +| **date_updated** | **Time** | An RFC3339 timestamp with millisecond resolution. It represents the time this blob was last modified, which at creation will always equal dateCreated. | [optional] | +| **expires_at** | **Time** | An RFC3339 timestamp with millisecond resolution. It represents the time at which this blob will expire and self delete. | [optional] | +| **blob** | **Object** | Blob content | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::BlobResult.new( + blob_id: BL88615a9b4ca7e9aad57d9057773fc74268b9caf7, + account_id: AC0534faec6b32da45f36166674d65b3903f784141, + _alias: null, + revision: null, + date_created: null, + date_updated: null, + expires_at: null, + blob: null +) +``` + diff --git a/docs/CreateBlobRequest.md b/docs/CreateBlobRequest.md new file mode 100644 index 0000000..bb243b3 --- /dev/null +++ b/docs/CreateBlobRequest.md @@ -0,0 +1,22 @@ +# Freeclimb::CreateBlobRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_alias** | **String** | Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided. | [optional] | +| **expires_at** | **String** | An RFC3339 timestamp with millisecond resolution. This timestamp defines the time at which this blob will delete itself. It must not be more than 48 hours in the future and will default to 9 hours in the future if not provided. | [optional] | +| **blob** | **Object** | | | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::CreateBlobRequest.new( + _alias: null, + expires_at: 2006-01-02T15:04:05.000Z, + blob: null +) +``` + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index f9a9480..87f9184 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**create_an_application**](DefaultApi.md#create_an_application) | **POST** /Accounts/{accountId}/Applications | Create an application | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**create_blob**](DefaultApi.md#create_blob) | **POST** /Accounts/{accountId}/Blobs | Create a Blob | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**create_export**](DefaultApi.md#create_export) | **POST** /Accounts/{accountId}/Exports | Create an Export | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**create_knowledge_base_completion**](DefaultApi.md#create_knowledge_base_completion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base | @@ -24,6 +26,8 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**delete_an_incoming_number**](DefaultApi.md#delete_an_incoming_number) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**delete_blob**](DefaultApi.md#delete_blob) | **DELETE** /Accounts/{accountId}/Blobs/{blobId} | Delete Blob | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**dequeue_a_member**](DefaultApi.md#dequeue_a_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**dequeue_head_member**](DefaultApi.md#dequeue_head_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member | @@ -56,6 +60,8 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**get_an_sms_message**](DefaultApi.md#get_an_sms_message) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**get_blob**](DefaultApi.md#get_blob) | **GET** /Accounts/{accountId}/Blobs/{blobId} | Get Blob | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**get_head_member**](DefaultApi.md#get_head_member) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**get_ten_dlc_sms_brand**](DefaultApi.md#get_ten_dlc_sms_brand) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands/{brandId} | Get a 10DLC SMS Brand | @@ -82,6 +88,8 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**list_available_numbers**](DefaultApi.md#list_available_numbers) | **GET** /AvailablePhoneNumbers | List available numbers | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**list_blobs**](DefaultApi.md#list_blobs) | **GET** /Accounts/{accountId}/Blobs | List Blobs belonging to an account. | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**list_call_logs**](DefaultApi.md#list_call_logs) | **GET** /Accounts/{accountId}/Calls/{callId}/Logs | List Call Logs | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**list_call_recordings**](DefaultApi.md#list_call_recordings) | **GET** /Accounts/{accountId}/Calls/{callId}/Recordings | List Call Recordings | @@ -108,8 +116,12 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**make_a_webrtc_jwt**](DefaultApi.md#make_a_webrtc_jwt) | **POST** /Accounts/{accountId}/Calls/WebRTC/Token | Make a JWT for WebRTC calling | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**modify_blob**](DefaultApi.md#modify_blob) | **PATCH** /Accounts/{accountId}/Blobs/{blobId} | Modify Blob | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**remove_a_participant**](DefaultApi.md#remove_a_participant) | **DELETE** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Remove a Participant | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | +| [**replace_blob**](DefaultApi.md#replace_blob) | **PUT** /Accounts/{accountId}/Blobs/{blobId} | Replace Blob | +| [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**send_an_sms_message**](DefaultApi.md#send_an_sms_message) | **POST** /Accounts/{accountId}/Messages | Send an SMS Message | | [**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get next page of paginated resource | | [**stream_a_recording_file**](DefaultApi.md#stream_a_recording_file) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Stream | Stream a Recording File | @@ -413,6 +425,78 @@ end - **Accept**: application/json +## create_blob + +Create a Blob + +Create a new Blob belonging to the requesting account. + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + +create_blob_request = Freeclimb::CreateBlobRequest.new({blob: 3.56}) # CreateBlobRequest | An object defining a new blob. A request body must be provided but the blob may be empty. + + +begin + + # Create a Blob + result = api_instance.create_blob(create_blob_request) + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->create_blob: #{e}" +end +``` + +#### Using the create_blob_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_blob_with_http_info(account_id, create_blob_request) + +```ruby +begin + # Create a Blob + data, status_code, headers = api_instance.create_blob_with_http_info(create_blob_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->create_blob_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **create_blob_request** | [**CreateBlobRequest**](CreateBlobRequest.md) | An object defining a new blob. A request body must be provided but the blob may be empty. | | + + +### Return type + +[**BlobResult**](BlobResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## create_export Create an Export @@ -834,6 +918,78 @@ nil (empty response body) - **Accept**: Not defined +## delete_blob + +Delete Blob + +Deletes a blob or specific keys from a blob. If no keys are specified in the request body, the entire blob is deleted (returns 204). If specific keys are provided, only those keys are removed and the remaining blob is returned (returns 200). + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + +blob_id = 'blob_id_example' # String | String that uniquely identifies this Blob resource. + + +begin + + # Delete Blob + result = api_instance.delete_blob(blob_id) + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->delete_blob: #{e}" +end +``` + +#### Using the delete_blob_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_blob_with_http_info(account_id, blob_id) + +```ruby +begin + # Delete Blob + data, status_code, headers = api_instance.delete_blob_with_http_info(blob_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->delete_blob_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob_id** | **String** | String that uniquely identifies this Blob resource. | | + + +### Return type + +[**BlobResult**](BlobResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## dequeue_a_member Dequeue a Member @@ -1044,7 +1200,7 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: audio/x-wav +- **Accept**: audio/wav ## download_an_export @@ -1960,6 +2116,78 @@ end - **Accept**: application/json +## get_blob + +Get Blob + +Retrieves a specified blob + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + +blob_id = 'blob_id_example' # String | String that uniquely identifies this Blob resource. + + +begin + + # Get Blob + result = api_instance.get_blob(blob_id) + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->get_blob: #{e}" +end +``` + +#### Using the get_blob_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_blob_with_http_info(account_id, blob_id) + +```ruby +begin + # Get Blob + data, status_code, headers = api_instance.get_blob_with_http_info(blob_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->get_blob_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob_id** | **String** | String that uniquely identifies this Blob resource. | | + + +### Return type + +[**BlobResult**](BlobResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_head_member Get Head Member @@ -2884,6 +3112,75 @@ end - **Accept**: application/json +## list_blobs + +List Blobs belonging to an account. + +List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API. + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + + +begin + + # List Blobs belonging to an account. + result = api_instance.list_blobs() + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->list_blobs: #{e}" +end +``` + +#### Using the list_blobs_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_blobs_with_http_info(account_id) + +```ruby +begin + # List Blobs belonging to an account. + data, status_code, headers = api_instance.list_blobs_with_http_info() + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->list_blobs_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + + +### Return type + +[**BlobListResponse**](BlobListResponse.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## list_call_logs List Call Logs @@ -3368,8 +3665,6 @@ opts = { country: 'country_example', # String | Country of this phone number. application_id: 'application_id_example', # String | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. has_application: true, # Boolean | Indication of whether the phone number has an application linked to it. - voice_enabled: true, # Boolean | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - sms_enabled: true, # Boolean | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. has_campaign: true, # Boolean | Indication of whether the phone number has a campaign associated with it capabilities_voice: true, # Boolean | capabilities_sms: true, # Boolean | @@ -3418,8 +3713,6 @@ end | **country** | **String** | Country of this phone number. | [optional] | | **application_id** | **String** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] | | **has_application** | **Boolean** | Indication of whether the phone number has an application linked to it. | [optional][default to false] | -| **voice_enabled** | **Boolean** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional][default to true] | -| **sms_enabled** | **Boolean** | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional][default to true] | | **has_campaign** | **Boolean** | Indication of whether the phone number has a campaign associated with it | [optional] | | **capabilities_voice** | **Boolean** | | [optional] | | **capabilities_sms** | **Boolean** | | [optional] | @@ -3893,6 +4186,81 @@ end - **Accept**: text/plain +## modify_blob + +Modify Blob + +Modifys a pre existing blob by either adding new fields, or modifying existing fields + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + +blob_id = 'blob_id_example' # String | String that uniquely identifies this Blob resource. + +modify_blob_request = Freeclimb::ModifyBlobRequest.new({blob: 3.56}) # ModifyBlobRequest | Request body to specify keys to modify. Or new keys to add onto the already existing blob + + +begin + + # Modify Blob + result = api_instance.modify_blob(blob_id, modify_blob_request) + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->modify_blob: #{e}" +end +``` + +#### Using the modify_blob_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> modify_blob_with_http_info(account_id, blob_id, modify_blob_request) + +```ruby +begin + # Modify Blob + data, status_code, headers = api_instance.modify_blob_with_http_info(blob_id, modify_blob_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->modify_blob_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob_id** | **String** | String that uniquely identifies this Blob resource. | | +| **modify_blob_request** | [**ModifyBlobRequest**](ModifyBlobRequest.md) | Request body to specify keys to modify. Or new keys to add onto the already existing blob | | + + +### Return type + +[**BlobResult**](BlobResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## remove_a_participant Remove a Participant @@ -3965,6 +4333,81 @@ nil (empty response body) - **Accept**: Not defined +## replace_blob + +Replace Blob + +Replaces the blob content with the provided values. + +### Examples + +```ruby +require 'time' +require 'freeclimb' +# setup authorization +Freeclimb.configure do |config| + # Configure HTTP basic authorization: fc + config.username = 'ACCOUNT_ID' + config.password = 'API_KEY' +end + +api_instance = Freeclimb::DefaultApi.new + +blob_id = 'blob_id_example' # String | String that uniquely identifies this Blob resource. + +replace_blob_request = Freeclimb::ReplaceBlobRequest.new({blob: 3.56}) # ReplaceBlobRequest | JSON object containing blob key the contents of which will be used to override the enitre blob contents. + + +begin + + # Replace Blob + result = api_instance.replace_blob(blob_id, replace_blob_request) + p result +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->replace_blob: #{e}" +end +``` + +#### Using the replace_blob_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> replace_blob_with_http_info(account_id, blob_id, replace_blob_request) + +```ruby +begin + # Replace Blob + data, status_code, headers = api_instance.replace_blob_with_http_info(blob_id, replace_blob_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Freeclimb::ApiError => e + puts "Error when calling DefaultApi->replace_blob_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob_id** | **String** | String that uniquely identifies this Blob resource. | | +| **replace_blob_request** | [**ReplaceBlobRequest**](ReplaceBlobRequest.md) | JSON object containing blob key the contents of which will be used to override the enitre blob contents. | | + + +### Return type + +[**BlobResult**](BlobResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## send_an_sms_message Send an SMS Message @@ -4102,7 +4545,7 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: audio/x-wav +- **Accept**: audio/wav ## update_a_conference diff --git a/docs/IncomingNumberResult.md b/docs/IncomingNumberResult.md index 9f21819..479f4d8 100644 --- a/docs/IncomingNumberResult.md +++ b/docs/IncomingNumberResult.md @@ -17,8 +17,6 @@ | **_alias** | **String** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] | | **region** | **String** | State or province of this phone number. | [optional] | | **country** | **String** | Country of this phone number. | [optional] | -| **voice_enabled** | **Boolean** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] | -| **sms_enabled** | **Boolean** | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] | | **offnet** | **Boolean** | The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] | | **tfn** | [**TFN**](TFN.md) | | [optional] | @@ -41,8 +39,6 @@ instance = Freeclimb::IncomingNumberResult.new( _alias: null, region: null, country: null, - voice_enabled: null, - sms_enabled: null, offnet: null, tfn: null ) diff --git a/docs/ModifyBlobRequest.md b/docs/ModifyBlobRequest.md new file mode 100644 index 0000000..1e16aa8 --- /dev/null +++ b/docs/ModifyBlobRequest.md @@ -0,0 +1,20 @@ +# Freeclimb::ModifyBlobRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob** | **Object** | | | +| **_alias** | **String** | Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided. | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::ModifyBlobRequest.new( + blob: null, + _alias: null +) +``` + diff --git a/docs/PlatformError.md b/docs/PlatformError.md new file mode 100644 index 0000000..dae1e7a --- /dev/null +++ b/docs/PlatformError.md @@ -0,0 +1,24 @@ +# Freeclimb::PlatformError + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **Integer** | | [optional] | +| **call** | **String** | | [optional] | +| **url** | **String** | | [optional] | +| **details** | **Object** | | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::PlatformError.new( + code: null, + call: null, + url: null, + details: null +) +``` + diff --git a/docs/ReplaceBlobRequest.md b/docs/ReplaceBlobRequest.md new file mode 100644 index 0000000..25547bb --- /dev/null +++ b/docs/ReplaceBlobRequest.md @@ -0,0 +1,18 @@ +# Freeclimb::ReplaceBlobRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **blob** | **Object** | | | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::ReplaceBlobRequest.new( + blob: null +) +``` + diff --git a/docs/Say.md b/docs/Say.md index 43bf9f5..6da2aa3 100644 --- a/docs/Say.md +++ b/docs/Say.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **text** | **String** | The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. | | | **language** | **String** | Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below. | [optional] | +| **engine** | [**TTSEngine**](TTSEngine.md) | | [optional] | | **loop** | **Integer** | Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. | [optional][default to 1] | | **privacy_mode** | **Boolean** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] | @@ -17,6 +18,7 @@ require 'freeclimb' instance = Freeclimb::Say.new( text: null, language: null, + engine: null, loop: null, privacy_mode: null ) diff --git a/docs/TTSEngine.md b/docs/TTSEngine.md new file mode 100644 index 0000000..65f0436 --- /dev/null +++ b/docs/TTSEngine.md @@ -0,0 +1,20 @@ +# Freeclimb::TTSEngine + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | [**TTSEngineName**](TTSEngineName.md) | | [optional] | +| **parameters** | **Hash<String, Object>** | Parameters for the TTS engine. The parameters are specific to the engine and are documented in the engine's documentation. | [optional] | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::TTSEngine.new( + name: null, + parameters: null +) +``` + diff --git a/docs/TTSEngineName.md b/docs/TTSEngineName.md new file mode 100644 index 0000000..a0b36a4 --- /dev/null +++ b/docs/TTSEngineName.md @@ -0,0 +1,18 @@ +# Freeclimb::TTSEngineName + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **FREECLIMB_STANDARD** | **TTSEngineName** | | Represented in Ruby as "freeclimb.standard" | +| **FREECLIMB_NEURAL** | **TTSEngineName** | | Represented in Ruby as "freeclimb.neural" | +| **ELEVEN_LABS** | **TTSEngineName** | | Represented in Ruby as "ElevenLabs" | + +## Example + +```ruby +require 'freeclimb' + +instance = Freeclimb::TTSEngineName::[NAME OF ENUM] +``` + diff --git a/lib/freeclimb.rb b/lib/freeclimb.rb index bcb20e3..6324734 100644 --- a/lib/freeclimb.rb +++ b/lib/freeclimb.rb @@ -26,6 +26,8 @@ require "freeclimb/models/available_number" require "freeclimb/models/available_number_list" require "freeclimb/models/barge_in_reason" +require "freeclimb/models/blob_list_response" +require "freeclimb/models/blob_result" require "freeclimb/models/buy_incoming_number_request" require "freeclimb/models/call_direction" require "freeclimb/models/call_ended_reason" @@ -41,6 +43,7 @@ require "freeclimb/models/conference_participant_result" require "freeclimb/models/conference_result" require "freeclimb/models/conference_status" +require "freeclimb/models/create_blob_request" require "freeclimb/models/create_conference_request" require "freeclimb/models/create_web_rtc_token" require "freeclimb/models/export_list" @@ -71,10 +74,12 @@ require "freeclimb/models/message_result" require "freeclimb/models/message_status" require "freeclimb/models/messages_list" +require "freeclimb/models/modify_blob_request" require "freeclimb/models/mutable_resource_model" require "freeclimb/models/pagination_model" require "freeclimb/models/percl_command" require "freeclimb/models/percl_script" +require "freeclimb/models/platform_error" require "freeclimb/models/play_beep" require "freeclimb/models/queue_list" require "freeclimb/models/queue_member" @@ -85,6 +90,7 @@ require "freeclimb/models/record_utterance_term_reason" require "freeclimb/models/recording_list" require "freeclimb/models/recording_result" +require "freeclimb/models/replace_blob_request" require "freeclimb/models/request_type" require "freeclimb/models/sms_ten_dlc_brand" require "freeclimb/models/sms_ten_dlc_brand_alt_business_id_type" @@ -105,6 +111,8 @@ require "freeclimb/models/sms_toll_free_campaigns_list_result" require "freeclimb/models/tfn" require "freeclimb/models/tfn_campaign" +require "freeclimb/models/tts_engine" +require "freeclimb/models/tts_engine_name" require "freeclimb/models/transcribe_reason" require "freeclimb/models/transcribe_term_reason" require "freeclimb/models/transcribe_utterance_record" diff --git a/lib/freeclimb/api/default_api.rb b/lib/freeclimb/api/default_api.rb index 8d283ac..9f443aa 100644 --- a/lib/freeclimb/api/default_api.rb +++ b/lib/freeclimb/api/default_api.rb @@ -40,6 +40,10 @@ def buy_a_phone_number_with_http_info(buy_incoming_number_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.buy_a_phone_number ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.buy_a_phone_number, must conform to the pattern #{pattern}." + end # verify the required parameter 'buy_incoming_number_request' is set if @api_client.config.client_side_validation && buy_incoming_number_request.nil? @@ -107,6 +111,11 @@ def create_a_conference_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.create_a_conference ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_a_conference, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Conferences".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -169,6 +178,11 @@ def create_a_queue_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.create_a_queue ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_a_queue, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Queues".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -231,6 +245,11 @@ def create_an_application_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.create_an_application ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_an_application, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Applications".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -276,6 +295,79 @@ def create_an_application_with_http_info(opts = {}) [data, status_code, headers] end + # Create a Blob + # Create a new Blob belonging to the requesting account. + # @param create_blob_request [CreateBlobRequest] An object defining a new blob. A request body must be provided but the blob may be empty. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + def create_blob(create_blob_request, opts = {}) + data, _status_code, _headers = create_blob_with_http_info(create_blob_request, opts) + data + end + + # Create a Blob + # Create a new Blob belonging to the requesting account. + # @param create_blob_request [CreateBlobRequest] An object defining a new blob. A request body must be provided but the blob may be empty. + # @param [Hash] opts the optional parameters + # @return [Array<(BlobResult, Integer, Hash)>] BlobResult data, response status code and response headers + def create_blob_with_http_info(create_blob_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.create_blob ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'create_blob_request' is set + if @api_client.config.client_side_validation && create_blob_request.nil? + fail ArgumentError, "Missing the required parameter 'create_blob_request' when calling DefaultApi.create_blob" + end + # resource path + local_var_path = "/Accounts/{accountId}/Blobs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(["application/json"]) + if !content_type.nil? + header_params["Content-Type"] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_blob_request) + + # return_type + return_type = opts[:debug_return_type] || "BlobResult" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.create_blob", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#create_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # Create an Export # @param [Hash] opts the optional parameters # @option opts [ExportRequest] :export_request A JSON object containing export creation parameters @@ -293,6 +385,11 @@ def create_export_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.create_export ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_export, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Exports".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -357,6 +454,10 @@ def create_knowledge_base_completion_with_http_info(knowledge_base_id, opts = {} if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.create_knowledge_base_completion ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.create_knowledge_base_completion, must conform to the pattern #{pattern}." + end # verify the required parameter 'knowledge_base_id' is set if @api_client.config.client_side_validation && knowledge_base_id.nil? @@ -424,6 +525,10 @@ def delete_a_recording_with_http_info(recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.delete_a_recording ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.delete_a_recording, must conform to the pattern #{pattern}." + end # verify the required parameter 'recording_id' is set if @api_client.config.client_side_validation && recording_id.nil? @@ -484,6 +589,10 @@ def delete_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.delete_an_application ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.delete_an_application, must conform to the pattern #{pattern}." + end # verify the required parameter 'application_id' is set if @api_client.config.client_side_validation && application_id.nil? @@ -544,6 +653,10 @@ def delete_an_export_with_http_info(export_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.delete_an_export ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.delete_an_export, must conform to the pattern #{pattern}." + end # verify the required parameter 'export_id' is set if @api_client.config.client_side_validation && export_id.nil? @@ -604,6 +717,10 @@ def delete_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.delete_an_incoming_number ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.delete_an_incoming_number, must conform to the pattern #{pattern}." + end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? @@ -647,6 +764,79 @@ def delete_an_incoming_number_with_http_info(phone_number_id, opts = {}) [data, status_code, headers] end + # Delete Blob + # Deletes a blob or specific keys from a blob. If no keys are specified in the request body, the entire blob is deleted (returns 204). If specific keys are provided, only those keys are removed and the remaining blob is returned (returns 200). + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + def delete_blob(blob_id, opts = {}) + data, _status_code, _headers = delete_blob_with_http_info(blob_id, opts) + data + end + + # Delete Blob + # Deletes a blob or specific keys from a blob. If no keys are specified in the request body, the entire blob is deleted (returns 204). If specific keys are provided, only those keys are removed and the remaining blob is returned (returns 200). + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [Array<(BlobResult, Integer, Hash)>] BlobResult data, response status code and response headers + def delete_blob_with_http_info(blob_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.delete_blob ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.delete_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'blob_id' is set + if @api_client.config.client_side_validation && blob_id.nil? + fail ArgumentError, "Missing the required parameter 'blob_id' when calling DefaultApi.delete_blob" + end + pattern = /BL[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && blob_id !~ pattern + fail ArgumentError, "invalid value for 'blob_id' when calling DefaultApi.delete_blob, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = "/Accounts/{accountId}/Blobs/{blobId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "blobId" + "}", CGI.escape(blob_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || "BlobResult" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.delete_blob", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#delete_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # Dequeue a Member # @param queue_id [String] String that uniquely identifies the Queue that the Member belongs to. # @param call_id [String] ID if the Call that the Member belongs to @@ -666,6 +856,10 @@ def dequeue_a_member_with_http_info(queue_id, call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.dequeue_a_member ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.dequeue_a_member, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -733,6 +927,10 @@ def dequeue_head_member_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.dequeue_head_member ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.dequeue_head_member, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -795,6 +993,10 @@ def download_a_recording_file_with_http_info(recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.download_a_recording_file ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.download_a_recording_file, must conform to the pattern #{pattern}." + end # verify the required parameter 'recording_id' is set if @api_client.config.client_side_validation && recording_id.nil? @@ -809,7 +1011,7 @@ def download_a_recording_file_with_http_info(recording_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params["Accept"] = @api_client.select_header_accept(["audio/x-wav"]) + header_params["Accept"] = @api_client.select_header_accept(["audio/wav"]) # form parameters form_params = opts[:form_params] || {} @@ -857,6 +1059,10 @@ def download_an_export_with_http_info(export_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.download_an_export ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.download_an_export, must conform to the pattern #{pattern}." + end # verify the required parameter 'export_id' is set if @api_client.config.client_side_validation && export_id.nil? @@ -919,6 +1125,10 @@ def filter_logs_with_http_info(filter_logs_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.filter_logs ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.filter_logs, must conform to the pattern #{pattern}." + end # verify the required parameter 'filter_logs_request' is set if @api_client.config.client_side_validation && filter_logs_request.nil? @@ -986,6 +1196,10 @@ def get_a_call_with_http_info(call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_call ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_call, must conform to the pattern #{pattern}." + end # verify the required parameter 'call_id' is set if @api_client.config.client_side_validation && call_id.nil? @@ -1048,6 +1262,10 @@ def get_a_conference_with_http_info(conference_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_conference ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_conference, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -1112,6 +1330,10 @@ def get_a_member_with_http_info(queue_id, call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_member ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_member, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -1181,6 +1403,10 @@ def get_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_participant ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_participant, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -1248,6 +1474,10 @@ def get_a_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_queue ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_queue, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -1310,6 +1540,10 @@ def get_a_recording_with_http_info(recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_a_recording ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_a_recording, must conform to the pattern #{pattern}." + end # verify the required parameter 'recording_id' is set if @api_client.config.client_side_validation && recording_id.nil? @@ -1370,6 +1604,11 @@ def get_an_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_an_account ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_an_account, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -1427,6 +1666,10 @@ def get_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_an_application ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_an_application, must conform to the pattern #{pattern}." + end # verify the required parameter 'application_id' is set if @api_client.config.client_side_validation && application_id.nil? @@ -1489,6 +1732,10 @@ def get_an_export_with_http_info(export_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_an_export ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_an_export, must conform to the pattern #{pattern}." + end # verify the required parameter 'export_id' is set if @api_client.config.client_side_validation && export_id.nil? @@ -1551,6 +1798,10 @@ def get_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_an_incoming_number ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_an_incoming_number, must conform to the pattern #{pattern}." + end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? @@ -1613,6 +1864,10 @@ def get_an_sms_message_with_http_info(message_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_an_sms_message ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_an_sms_message, must conform to the pattern #{pattern}." + end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && message_id.nil? @@ -1658,6 +1913,79 @@ def get_an_sms_message_with_http_info(message_id, opts = {}) [data, status_code, headers] end + # Get Blob + # Retrieves a specified blob + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + def get_blob(blob_id, opts = {}) + data, _status_code, _headers = get_blob_with_http_info(blob_id, opts) + data + end + + # Get Blob + # Retrieves a specified blob + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [Array<(BlobResult, Integer, Hash)>] BlobResult data, response status code and response headers + def get_blob_with_http_info(blob_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.get_blob ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'blob_id' is set + if @api_client.config.client_side_validation && blob_id.nil? + fail ArgumentError, "Missing the required parameter 'blob_id' when calling DefaultApi.get_blob" + end + pattern = /BL[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && blob_id !~ pattern + fail ArgumentError, "invalid value for 'blob_id' when calling DefaultApi.get_blob, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = "/Accounts/{accountId}/Blobs/{blobId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "blobId" + "}", CGI.escape(blob_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || "BlobResult" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.get_blob", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # Get Head Member # @param queue_id [String] String that uniquely identifies the Queue that the Member belongs to. # @param [Hash] opts the optional parameters @@ -1675,6 +2003,10 @@ def get_head_member_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_head_member ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_head_member, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -1737,6 +2069,10 @@ def get_ten_dlc_sms_brand_with_http_info(brand_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_brand ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_brand, must conform to the pattern #{pattern}." + end # verify the required parameter 'brand_id' is set if @api_client.config.client_side_validation && brand_id.nil? @@ -1797,6 +2133,11 @@ def get_ten_dlc_sms_brands_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_brands ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_brands, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Messages/10DLC/Brands".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -1854,6 +2195,10 @@ def get_ten_dlc_sms_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_campaign ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_campaign, must conform to the pattern #{pattern}." + end # verify the required parameter 'campaign_id' is set if @api_client.config.client_side_validation && campaign_id.nil? @@ -1916,6 +2261,11 @@ def get_ten_dlc_sms_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_campaigns ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_campaigns, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Messages/10DLC/Campaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -1974,6 +2324,10 @@ def get_ten_dlc_sms_partner_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_partner_campaign ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_partner_campaign, must conform to the pattern #{pattern}." + end # verify the required parameter 'campaign_id' is set if @api_client.config.client_side_validation && campaign_id.nil? @@ -2036,6 +2390,11 @@ def get_ten_dlc_sms_partner_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_ten_dlc_sms_partner_campaigns ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_ten_dlc_sms_partner_campaigns, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2094,6 +2453,10 @@ def get_toll_free_sms_campaign_with_http_info(campaign_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_toll_free_sms_campaign ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_toll_free_sms_campaign, must conform to the pattern #{pattern}." + end # verify the required parameter 'campaign_id' is set if @api_client.config.client_side_validation && campaign_id.nil? @@ -2154,6 +2517,11 @@ def get_toll_free_sms_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.get_toll_free_sms_campaigns ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.get_toll_free_sms_campaigns, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Messages/TollFree/Campaigns".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2211,6 +2579,11 @@ def list_active_queues_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_active_queues ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_active_queues, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Queues".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2267,6 +2640,11 @@ def list_all_account_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_all_account_logs ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_all_account_logs, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Logs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2324,6 +2702,11 @@ def list_applications_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_applications ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_applications, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Applications".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2450,6 +2833,68 @@ def list_available_numbers_with_http_info(opts = {}) [data, status_code, headers] end + # List Blobs belonging to an account. + # List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API. + # @param [Hash] opts the optional parameters + # @return [BlobListResponse] + def list_blobs(opts = {}) + data, _status_code, _headers = list_blobs_with_http_info(opts) + data + end + + # List Blobs belonging to an account. + # List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API. + # @param [Hash] opts the optional parameters + # @return [Array<(BlobListResponse, Integer, Hash)>] BlobListResponse data, response status code and response headers + def list_blobs_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.list_blobs ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_blobs, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = "/Accounts/{accountId}/Blobs".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || "BlobListResponse" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.list_blobs", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_blobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # List Call Logs # @param call_id [String] String that uniquely identifies this call resource. # @param [Hash] opts the optional parameters @@ -2467,6 +2912,10 @@ def list_call_logs_with_http_info(call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_call_logs ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_call_logs, must conform to the pattern #{pattern}." + end # verify the required parameter 'call_id' is set if @api_client.config.client_side_validation && call_id.nil? @@ -2531,6 +2980,10 @@ def list_call_recordings_with_http_info(call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_call_recordings ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_call_recordings, must conform to the pattern #{pattern}." + end # verify the required parameter 'call_id' is set if @api_client.config.client_side_validation && call_id.nil? @@ -2612,6 +3065,11 @@ def list_calls_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_calls ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_calls, must conform to the pattern #{pattern}." + end + if @api_client.config.client_side_validation && !opts[:application_id].nil? && opts[:application_id].length > 16 fail ArgumentError, 'invalid value for "opts[:"application_id"]" when calling DefaultApi.list_calls, number of items must be less than or equal to 16.' end @@ -2687,6 +3145,10 @@ def list_conference_recordings_with_http_info(conference_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_conference_recordings ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_conference_recordings, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -2757,6 +3219,11 @@ def list_conferences_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_conferences ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_conferences, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Conferences".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2820,6 +3287,11 @@ def list_exports_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_exports ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_exports, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Exports".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2870,8 +3342,6 @@ def list_exports_with_http_info(opts = {}) # @option opts [String] :country Country of this phone number. # @option opts [String] :application_id ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. # @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it. (default to false) - # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (default to true) - # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (default to true) # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it # @option opts [Boolean] :capabilities_voice # @option opts [Boolean] :capabilities_sms @@ -2894,8 +3364,6 @@ def list_incoming_numbers(opts = {}) # @option opts [String] :country Country of this phone number. # @option opts [String] :application_id ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. # @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it. - # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it # @option opts [Boolean] :capabilities_voice # @option opts [Boolean] :capabilities_sms @@ -2909,6 +3377,11 @@ def list_incoming_numbers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_incoming_numbers ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_incoming_numbers, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/IncomingPhoneNumbers".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -2920,8 +3393,6 @@ def list_incoming_numbers_with_http_info(opts = {}) query_params[:country] = opts[:country] if !opts[:country].nil? query_params[:applicationId] = opts[:application_id] if !opts[:application_id].nil? query_params[:hasApplication] = opts[:has_application] if !opts[:has_application].nil? - query_params[:voiceEnabled] = opts[:voice_enabled] if !opts[:voice_enabled].nil? - query_params[:smsEnabled] = opts[:sms_enabled] if !opts[:sms_enabled].nil? query_params[:hasCampaign] = opts[:has_campaign] if !opts[:has_campaign].nil? query_params[:"capabilities.voice"] = opts[:capabilities_voice] if !opts[:capabilities_voice].nil? query_params[:"capabilities.sms"] = opts[:capabilities_sms] if !opts[:capabilities_sms].nil? @@ -2982,6 +3453,10 @@ def list_members_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_members ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_members, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -3050,6 +3525,10 @@ def list_participants_with_http_info(conference_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_participants ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_participants, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -3119,6 +3598,11 @@ def list_recordings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_recordings ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_recordings, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Recordings".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -3193,6 +3677,11 @@ def list_sms_messages_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.list_sms_messages ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.list_sms_messages, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Messages".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -3258,6 +3747,11 @@ def make_a_call_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.make_a_call ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.make_a_call, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}/Calls".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -3320,6 +3814,10 @@ def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.make_a_webrtc_jwt ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.make_a_webrtc_jwt, must conform to the pattern #{pattern}." + end # verify the required parameter 'create_web_rtc_token' is set if @api_client.config.client_side_validation && create_web_rtc_token.nil? @@ -3370,6 +3868,90 @@ def make_a_webrtc_jwt_with_http_info(create_web_rtc_token, opts = {}) [data, status_code, headers] end + # Modify Blob + # Modifys a pre existing blob by either adding new fields, or modifying existing fields + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param modify_blob_request [ModifyBlobRequest] Request body to specify keys to modify. Or new keys to add onto the already existing blob + # @param [Hash] opts the optional parameters + # @return [BlobResult] + def modify_blob(blob_id, modify_blob_request, opts = {}) + data, _status_code, _headers = modify_blob_with_http_info(blob_id, modify_blob_request, opts) + data + end + + # Modify Blob + # Modifys a pre existing blob by either adding new fields, or modifying existing fields + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param modify_blob_request [ModifyBlobRequest] Request body to specify keys to modify. Or new keys to add onto the already existing blob + # @param [Hash] opts the optional parameters + # @return [Array<(BlobResult, Integer, Hash)>] BlobResult data, response status code and response headers + def modify_blob_with_http_info(blob_id, modify_blob_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.modify_blob ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.modify_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'blob_id' is set + if @api_client.config.client_side_validation && blob_id.nil? + fail ArgumentError, "Missing the required parameter 'blob_id' when calling DefaultApi.modify_blob" + end + pattern = /BL[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && blob_id !~ pattern + fail ArgumentError, "invalid value for 'blob_id' when calling DefaultApi.modify_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'modify_blob_request' is set + if @api_client.config.client_side_validation && modify_blob_request.nil? + fail ArgumentError, "Missing the required parameter 'modify_blob_request' when calling DefaultApi.modify_blob" + end + # resource path + local_var_path = "/Accounts/{accountId}/Blobs/{blobId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "blobId" + "}", CGI.escape(blob_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(["application/json"]) + if !content_type.nil? + header_params["Content-Type"] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(modify_blob_request) + + # return_type + return_type = opts[:debug_return_type] || "BlobResult" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.modify_blob", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#modify_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # Remove a Participant # @param conference_id [String] ID of the conference this participant is in. # @param call_id [String] ID of the Call associated with this participant. @@ -3389,6 +3971,10 @@ def remove_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.remove_a_participant ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.remove_a_participant, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -3437,6 +4023,90 @@ def remove_a_participant_with_http_info(conference_id, call_id, opts = {}) [data, status_code, headers] end + # Replace Blob + # Replaces the blob content with the provided values. + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param replace_blob_request [ReplaceBlobRequest] JSON object containing blob key the contents of which will be used to override the enitre blob contents. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + def replace_blob(blob_id, replace_blob_request, opts = {}) + data, _status_code, _headers = replace_blob_with_http_info(blob_id, replace_blob_request, opts) + data + end + + # Replace Blob + # Replaces the blob content with the provided values. + # @param blob_id [String] String that uniquely identifies this Blob resource. + # @param replace_blob_request [ReplaceBlobRequest] JSON object containing blob key the contents of which will be used to override the enitre blob contents. + # @param [Hash] opts the optional parameters + # @return [Array<(BlobResult, Integer, Hash)>] BlobResult data, response status code and response headers + def replace_blob_with_http_info(blob_id, replace_blob_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: DefaultApi.replace_blob ..." + end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.replace_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'blob_id' is set + if @api_client.config.client_side_validation && blob_id.nil? + fail ArgumentError, "Missing the required parameter 'blob_id' when calling DefaultApi.replace_blob" + end + pattern = /BL[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && blob_id !~ pattern + fail ArgumentError, "invalid value for 'blob_id' when calling DefaultApi.replace_blob, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'replace_blob_request' is set + if @api_client.config.client_side_validation && replace_blob_request.nil? + fail ArgumentError, "Missing the required parameter 'replace_blob_request' when calling DefaultApi.replace_blob" + end + # resource path + local_var_path = "/Accounts/{accountId}/Blobs/{blobId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)).sub("{" + "blobId" + "}", CGI.escape(blob_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params["Accept"] = @api_client.select_header_accept(["application/json"]) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(["application/json"]) + if !content_type.nil? + header_params["Content-Type"] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_blob_request) + + # return_type + return_type = opts[:debug_return_type] || "BlobResult" + + # auth_names + auth_names = opts[:debug_auth_names] || ["fc"] + + new_options = opts.merge( + operation: :"DefaultApi.replace_blob", + header_params: header_params, + query_params: query_params, + form_params: form_params, + body: post_body, + auth_names: auth_names, + return_type: return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#replace_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + [data, status_code, headers] + end + # Send an SMS Message # @param message_request [MessageRequest] Details to create a message # @param [Hash] opts the optional parameters @@ -3454,6 +4124,10 @@ def send_an_sms_message_with_http_info(message_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.send_an_sms_message ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.send_an_sms_message, must conform to the pattern #{pattern}." + end # verify the required parameter 'message_request' is set if @api_client.config.client_side_validation && message_request.nil? @@ -3521,6 +4195,10 @@ def stream_a_recording_file_with_http_info(recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.stream_a_recording_file ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.stream_a_recording_file, must conform to the pattern #{pattern}." + end # verify the required parameter 'recording_id' is set if @api_client.config.client_side_validation && recording_id.nil? @@ -3535,7 +4213,7 @@ def stream_a_recording_file_with_http_info(recording_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params["Accept"] = @api_client.select_header_accept(["audio/x-wav"]) + header_params["Accept"] = @api_client.select_header_accept(["audio/wav"]) # form parameters form_params = opts[:form_params] || {} @@ -3585,6 +4263,10 @@ def update_a_conference_with_http_info(conference_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_a_conference ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_a_conference, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -3652,6 +4334,10 @@ def update_a_live_call_with_http_info(call_id, update_call_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_a_live_call ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_a_live_call, must conform to the pattern #{pattern}." + end # verify the required parameter 'call_id' is set if @api_client.config.client_side_validation && call_id.nil? @@ -3726,6 +4412,10 @@ def update_a_participant_with_http_info(conference_id, call_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_a_participant ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_a_participant, must conform to the pattern #{pattern}." + end # verify the required parameter 'conference_id' is set if @api_client.config.client_side_validation && conference_id.nil? @@ -3800,6 +4490,10 @@ def update_a_queue_with_http_info(queue_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_a_queue ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_a_queue, must conform to the pattern #{pattern}." + end # verify the required parameter 'queue_id' is set if @api_client.config.client_side_validation && queue_id.nil? @@ -3867,6 +4561,11 @@ def update_an_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_an_account ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_an_account, must conform to the pattern #{pattern}." + end + # resource path local_var_path = "/Accounts/{accountId}".sub("{" + "accountId" + "}", CGI.escape(account_id.to_s)) @@ -3929,6 +4628,10 @@ def update_an_application_with_http_info(application_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_an_application ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_an_application, must conform to the pattern #{pattern}." + end # verify the required parameter 'application_id' is set if @api_client.config.client_side_validation && application_id.nil? @@ -3998,6 +4701,10 @@ def update_an_incoming_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi.update_an_incoming_number ..." end + pattern = /AC[0-9a-fA-F]{40}/ + if @api_client.config.client_side_validation && account_id !~ pattern + fail ArgumentError, "invalid value for 'account_id' when calling DefaultApi.update_an_incoming_number, must conform to the pattern #{pattern}." + end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? diff --git a/lib/freeclimb/models/available_number.rb b/lib/freeclimb/models/available_number.rb index b031a27..165674b 100644 --- a/lib/freeclimb/models/available_number.rb +++ b/lib/freeclimb/models/available_number.rb @@ -21,12 +21,6 @@ class AvailableNumber # The phone number, in E.164 format (+ country code and phone number: +18003608245). attr_accessor :phone_number - # Typically set to true for all numbers. - attr_accessor :voice_enabled - - # Indicates whether the phone number can send and receive SMS messages. - attr_accessor :sms_enabled - # The state or province of this phone number. attr_accessor :region @@ -39,8 +33,6 @@ def self.attribute_map capabilities: :capabilities, campaign_id: :campaignId, phone_number: :phoneNumber, - voice_enabled: :voiceEnabled, - sms_enabled: :smsEnabled, region: :region, country: :country } @@ -57,8 +49,6 @@ def self.openapi_types capabilities: :Capabilities, campaign_id: :String, phone_number: :String, - voice_enabled: :Boolean, - sms_enabled: :Boolean, region: :String, country: :String } @@ -69,8 +59,6 @@ def self.openapi_nullable Set.new([ :campaign_id, :phone_number, - :voice_enabled, - :sms_enabled, :region, :country ]) @@ -103,14 +91,6 @@ def initialize(attributes = {}) self.phone_number = attributes[:phone_number] end - if attributes.key?(:voice_enabled) - self.voice_enabled = attributes[:voice_enabled] - end - - if attributes.key?(:sms_enabled) - self.sms_enabled = attributes[:sms_enabled] - end - if attributes.key?(:region) self.region = attributes[:region] end @@ -144,8 +124,6 @@ def ==(other) capabilities == other.capabilities && campaign_id == other.campaign_id && phone_number == other.phone_number && - voice_enabled == other.voice_enabled && - sms_enabled == other.sms_enabled && region == other.region && country == other.country end @@ -159,7 +137,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [capabilities, campaign_id, phone_number, voice_enabled, sms_enabled, region, country].hash + [capabilities, campaign_id, phone_number, region, country].hash end # Builds the object from hash diff --git a/lib/freeclimb/models/blob_list_response.rb b/lib/freeclimb/models/blob_list_response.rb new file mode 100644 index 0000000..f50a8d2 --- /dev/null +++ b/lib/freeclimb/models/blob_list_response.rb @@ -0,0 +1,303 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class BlobListResponse + # Total amount of requested resource. + attr_accessor :total + + # Resource index at start of current page + attr_accessor :start + + # Resource index at end of current page + attr_accessor :_end + + # Current page + attr_accessor :page + + # Total number of pages + attr_accessor :num_pages + + # Number of items per page + attr_accessor :page_size + + # Uri to retrieve the next page of items + attr_accessor :next_page_uri + + attr_accessor :blobs + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + total: :total, + start: :start, + _end: :end, + page: :page, + num_pages: :numPages, + page_size: :pageSize, + next_page_uri: :nextPageUri, + blobs: :blobs + } + 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 + { + total: :Integer, + start: :Integer, + _end: :Integer, + page: :Integer, + num_pages: :Integer, + page_size: :Integer, + next_page_uri: :String, + blobs: :"Array" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :total, + :start, + :_end, + :page, + :num_pages, + :page_size, + :next_page_uri + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :PaginationModel + ] + 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::BlobListResponse` 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::BlobListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:total) + self.total = attributes[:total] + end + + if attributes.key?(:start) + self.start = attributes[:start] + end + + if attributes.key?(:_end) + self._end = attributes[:_end] + end + + if attributes.key?(:page) + self.page = attributes[:page] + end + + if attributes.key?(:num_pages) + self.num_pages = attributes[:num_pages] + end + + if attributes.key?(:page_size) + self.page_size = attributes[:page_size] + end + + if attributes.key?(:next_page_uri) + self.next_page_uri = attributes[:next_page_uri] + end + + if attributes.key?(:blobs) + if (value = attributes[:blobs]).is_a?(Array) + self.blobs = value + end + 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 + [] + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + if @total.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + total == other.total && + start == other.start && + _end == other._end && + page == other.page && + num_pages == other.num_pages && + page_size == other.page_size && + next_page_uri == other.next_page_uri && + blobs == other.blobs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total, start, _end, page, num_pages, page_size, next_page_uri, blobs].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/blob_result.rb b/lib/freeclimb/models/blob_result.rb new file mode 100644 index 0000000..e55da31 --- /dev/null +++ b/lib/freeclimb/models/blob_result.rb @@ -0,0 +1,332 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class BlobResult + # Identifier which can be used to reference this blob in future interations. + attr_accessor :blob_id + + attr_accessor :account_id + + # Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided in the creation request. + attr_accessor :_alias + + attr_accessor :revision + + # An RFC3339 timestamp with millisecond resolution. It represents the time this blob was created. + attr_accessor :date_created + + # An RFC3339 timestamp with millisecond resolution. It represents the time this blob was last modified, which at creation will always equal dateCreated. + attr_accessor :date_updated + + # An RFC3339 timestamp with millisecond resolution. It represents the time at which this blob will expire and self delete. + attr_accessor :expires_at + + # Blob content + attr_accessor :blob + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + blob_id: :blobId, + account_id: :accountId, + _alias: :alias, + revision: :revision, + date_created: :dateCreated, + date_updated: :dateUpdated, + expires_at: :expiresAt, + blob: :blob + } + 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 + { + blob_id: :String, + account_id: :String, + _alias: :String, + revision: :Integer, + date_created: :Time, + date_updated: :Time, + expires_at: :Time, + blob: :Object + } + 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::BlobResult` 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::BlobResult`. 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?(:blob_id) + self.blob_id = attributes[:blob_id] + end + + if attributes.key?(:account_id) + self.account_id = attributes[:account_id] + end + + if attributes.key?(:_alias) + self._alias = attributes[:_alias] + end + + if attributes.key?(:revision) + self.revision = attributes[:revision] + end + + if attributes.key?(:date_created) + self.date_created = attributes[:date_created] + end + + if attributes.key?(:date_updated) + self.date_updated = attributes[:date_updated] + end + + if attributes.key?(:expires_at) + self.expires_at = attributes[:expires_at] + end + + if attributes.key?(:blob) + self.blob = attributes[:blob] + 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 = [] + pattern = /BL[0-9a-fA-F]{40}/ + if !@blob_id.nil? && @blob_id !~ pattern + invalid_properties.push("invalid value for \"blob_id\", must conform to the pattern #{pattern}.") + end + + pattern = /AC[0-9a-fA-F]{40}/ + if !@account_id.nil? && @account_id !~ pattern + invalid_properties.push("invalid value for \"account_id\", must conform to the pattern #{pattern}.") + end + + if !@_alias.nil? && @_alias.to_s.length > 64 + invalid_properties.push('invalid value for "_alias", the character length must be smaller than or equal to 64.') + 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 @blob_id.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Custom attribute writer method with validation + # @param [Object] blob_id Value to be assigned + def blob_id=(blob_id) + pattern = /BL[0-9a-fA-F]{40}/ + if !blob_id.nil? && blob_id !~ pattern + fail ArgumentError, "invalid value for \"blob_id\", must conform to the pattern #{pattern}." + end + + @blob_id = blob_id + end + + # Custom attribute writer method with validation + # @param [Object] account_id Value to be assigned + def account_id=(account_id) + pattern = /AC[0-9a-fA-F]{40}/ + if !account_id.nil? && account_id !~ pattern + fail ArgumentError, "invalid value for \"account_id\", must conform to the pattern #{pattern}." + end + + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param [Object] _alias Value to be assigned + def _alias=(_alias) + if !_alias.nil? && _alias.to_s.length > 64 + fail ArgumentError, 'invalid value for "_alias", the character length must be smaller than or equal to 64.' + end + + @_alias = _alias + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + blob_id == other.blob_id && + account_id == other.account_id && + _alias == other._alias && + revision == other.revision && + date_created == other.date_created && + date_updated == other.date_updated && + expires_at == other.expires_at && + blob == other.blob + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [blob_id, account_id, _alias, revision, date_created, date_updated, expires_at, blob].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/create_blob_request.rb b/lib/freeclimb/models/create_blob_request.rb new file mode 100644 index 0000000..8c0fb95 --- /dev/null +++ b/lib/freeclimb/models/create_blob_request.rb @@ -0,0 +1,255 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class CreateBlobRequest + # Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided. + attr_accessor :_alias + + # An RFC3339 timestamp with millisecond resolution. This timestamp defines the time at which this blob will delete itself. It must not be more than 48 hours in the future and will default to 9 hours in the future if not provided. + attr_accessor :expires_at + + attr_accessor :blob + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + _alias: :alias, + expires_at: :expiresAt, + blob: :blob + } + 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 + { + _alias: :String, + expires_at: :String, + blob: :Object + } + 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::CreateBlobRequest` 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::CreateBlobRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:_alias) + self._alias = attributes[:_alias] + end + + if attributes.key?(:expires_at) + self.expires_at = attributes[:expires_at] + end + + if attributes.key?(:blob) + self.blob = attributes[:blob] + 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 = [] + if !@_alias.nil? && @_alias.to_s.length > 64 + invalid_properties.push('invalid value for "_alias", the character length must be smaller than or equal to 64.') + end + + if @blob.nil? + invalid_properties.push('invalid value for "blob", blob cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + if @_alias.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Custom attribute writer method with validation + # @param [Object] _alias Value to be assigned + def _alias=(_alias) + if !_alias.nil? && _alias.to_s.length > 64 + fail ArgumentError, 'invalid value for "_alias", the character length must be smaller than or equal to 64.' + end + + @_alias = _alias + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + _alias == other._alias && + expires_at == other.expires_at && + blob == other.blob + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_alias, expires_at, blob].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/incoming_number_result.rb b/lib/freeclimb/models/incoming_number_result.rb index fab5e44..dad86ca 100644 --- a/lib/freeclimb/models/incoming_number_result.rb +++ b/lib/freeclimb/models/incoming_number_result.rb @@ -51,12 +51,6 @@ class IncomingNumberResult # Country of this phone number. attr_accessor :country - # Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - attr_accessor :voice_enabled - - # Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - attr_accessor :sms_enabled - # The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource. attr_accessor :offnet @@ -78,8 +72,6 @@ def self.attribute_map _alias: :alias, region: :region, country: :country, - voice_enabled: :voiceEnabled, - sms_enabled: :smsEnabled, offnet: :offnet, tfn: :tfn } @@ -106,8 +98,6 @@ def self.openapi_types _alias: :String, region: :String, country: :String, - voice_enabled: :Boolean, - sms_enabled: :Boolean, offnet: :Boolean, tfn: :TFN } @@ -124,8 +114,6 @@ def self.openapi_nullable :_alias, :region, :country, - :voice_enabled, - :sms_enabled, :offnet ]) end @@ -204,14 +192,6 @@ def initialize(attributes = {}) self.country = attributes[:country] end - if attributes.key?(:voice_enabled) - self.voice_enabled = attributes[:voice_enabled] - end - - if attributes.key?(:sms_enabled) - self.sms_enabled = attributes[:sms_enabled] - end - if attributes.key?(:offnet) self.offnet = attributes[:offnet] end @@ -255,8 +235,6 @@ def ==(other) _alias == other._alias && region == other.region && country == other.country && - voice_enabled == other.voice_enabled && - sms_enabled == other.sms_enabled && offnet == other.offnet && tfn == other.tfn end @@ -270,7 +248,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [uri, date_created, date_updated, revision, capabilities, campaign_id, phone_number_id, account_id, application_id, phone_number, _alias, region, country, voice_enabled, sms_enabled, offnet, tfn].hash + [uri, date_created, date_updated, revision, capabilities, campaign_id, phone_number_id, account_id, application_id, phone_number, _alias, region, country, offnet, tfn].hash end # Builds the object from hash diff --git a/lib/freeclimb/models/modify_blob_request.rb b/lib/freeclimb/models/modify_blob_request.rb new file mode 100644 index 0000000..fc23361 --- /dev/null +++ b/lib/freeclimb/models/modify_blob_request.rb @@ -0,0 +1,245 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class ModifyBlobRequest + attr_accessor :blob + + # Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided. + attr_accessor :_alias + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + blob: :blob, + _alias: :alias + } + 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 + { + blob: :Object, + _alias: :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::ModifyBlobRequest` 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::ModifyBlobRequest`. 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?(:blob) + self.blob = attributes[:blob] + end + + if attributes.key?(:_alias) + self._alias = attributes[:_alias] + 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 = [] + if @blob.nil? + invalid_properties.push('invalid value for "blob", blob cannot be nil.') + end + + if !@_alias.nil? && @_alias.to_s.length > 64 + invalid_properties.push('invalid value for "_alias", the character length must be smaller than or equal to 64.') + 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 @blob.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Custom attribute writer method with validation + # @param [Object] _alias Value to be assigned + def _alias=(_alias) + if !_alias.nil? && _alias.to_s.length > 64 + fail ArgumentError, 'invalid value for "_alias", the character length must be smaller than or equal to 64.' + end + + @_alias = _alias + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + blob == other.blob && + _alias == other._alias + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [blob, _alias].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/platform_error.rb b/lib/freeclimb/models/platform_error.rb new file mode 100644 index 0000000..fb57110 --- /dev/null +++ b/lib/freeclimb/models/platform_error.rb @@ -0,0 +1,244 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + # Standard error structure returned by platform. + class PlatformError + attr_accessor :code + + attr_accessor :call + + attr_accessor :url + + attr_accessor :details + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + code: :code, + call: :call, + url: :url, + details: :details + } + 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 + { + code: :Integer, + call: :String, + url: :String, + details: :Object + } + 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::PlatformError` 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::PlatformError`. 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?(:code) + self.code = attributes[:code] + end + + if attributes.key?(:call) + self.call = attributes[:call] + end + + if attributes.key?(:url) + self.url = attributes[:url] + end + + if attributes.key?(:details) + self.details = attributes[:details] + 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 + [] + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + if @code.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + code == other.code && + call == other.call && + url == other.url && + details == other.details + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, call, url, details].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/replace_blob_request.rb b/lib/freeclimb/models/replace_blob_request.rb new file mode 100644 index 0000000..6cf9ab4 --- /dev/null +++ b/lib/freeclimb/models/replace_blob_request.rb @@ -0,0 +1,221 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class ReplaceBlobRequest + attr_accessor :blob + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + blob: :blob + } + 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 + { + blob: :Object + } + 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::ReplaceBlobRequest` 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::ReplaceBlobRequest`. 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?(:blob) + self.blob = attributes[:blob] + 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 = [] + if @blob.nil? + invalid_properties.push('invalid value for "blob", blob 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 @blob.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + blob == other.blob + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [blob].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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 504df71..08106cc 100644 --- a/lib/freeclimb/models/say.rb +++ b/lib/freeclimb/models/say.rb @@ -20,6 +20,8 @@ class Say < PerclCommand # Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below. attr_accessor :language + attr_accessor :engine + # Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. attr_accessor :loop @@ -31,6 +33,7 @@ def self.attribute_map { text: :text, language: :language, + engine: :engine, loop: :loop, privacy_mode: :privacyMode } @@ -46,6 +49,7 @@ def self.openapi_types { text: :String, language: :String, + engine: :TTSEngine, loop: :Integer, privacy_mode: :Boolean } @@ -89,6 +93,10 @@ def initialize(attributes = {}) self.language = attributes[:language] end + if attributes.key?(:engine) + self.engine = attributes[:engine] + end + self.loop = if attributes.key?(:loop) attributes[:loop] else @@ -129,6 +137,7 @@ def ==(other) self.class == other.class && text == other.text && language == other.language && + engine == other.engine && loop == other.loop && privacy_mode == other.privacy_mode && super end @@ -142,7 +151,7 @@ def eql?(other) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [text, language, loop, privacy_mode].hash + [text, language, engine, loop, privacy_mode].hash end # Builds the object from hash diff --git a/lib/freeclimb/models/tts_engine.rb b/lib/freeclimb/models/tts_engine.rb new file mode 100644 index 0000000..292c637 --- /dev/null +++ b/lib/freeclimb/models/tts_engine.rb @@ -0,0 +1,250 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class TTSEngine + attr_accessor :name + + # Parameters for the TTS engine. The parameters are specific to the engine and are documented in the engine's documentation. + attr_accessor :parameters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + name: :name, + parameters: :parameters + } + 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 + { + name: :TTSEngineName, + parameters: :"Hash" + } + 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::TTSEngine` 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::TTSEngine`. 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?(:name) + self.name = attributes[:name] + end + + if attributes.key?(:parameters) + if (value = attributes[:parameters]).is_a?(Hash) + self.parameters = value + end + 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 + [] + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + if @name.nil? + false + else + list_invalid_properties.length == 0 + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if equal?(other) + self.class == other.class && + name == other.name && + parameters == other.parameters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, parameters].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) + 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) + send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + 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 = 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/tts_engine_name.rb b/lib/freeclimb/models/tts_engine_name.rb new file mode 100644 index 0000000..fc61a36 --- /dev/null +++ b/lib/freeclimb/models/tts_engine_name.rb @@ -0,0 +1,36 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "date" +require "time" + +module Freeclimb + class TTSEngineName + FREECLIMB_STANDARD = "freeclimb.standard".freeze + FREECLIMB_NEURAL = "freeclimb.neural".freeze + ELEVEN_LABS = "ElevenLabs".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = TTSEngineName.constants.select { |c| TTSEngineName.const_get(c) == value } + raise "Invalid ENUM value #{value} for class #TTSEngineName" if constantValues.empty? + value + end + end +end diff --git a/lib/freeclimb/version.rb b/lib/freeclimb/version.rb index 61cba51..d5af1a1 100644 --- a/lib/freeclimb/version.rb +++ b/lib/freeclimb/version.rb @@ -9,5 +9,5 @@ # module Freeclimb - VERSION = "5.3.0" + VERSION = "5.4.0" end diff --git a/openapi.json b/openapi.json index 7561d69..d89e37c 100644 --- a/openapi.json +++ b/openapi.json @@ -23,7 +23,9 @@ "description": "ID of the account", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "AC[0-9a-fA-F]{40}", + "example": "AC170e4c66d358aa1755931da0452561933d1b8fd5" } }, "Capabilities.Voice": { @@ -80,6 +82,17 @@ } }, "schemas": { + "accountId": { + "type": "string", + "pattern": "AC[0-9a-fA-F]{40}", + "example": "AC0534faec6b32da45f36166674d65b3903f784141" + }, + "blobId": { + "type": "string", + "description": "Identifier which can be used to reference this blob in future interations.", + "pattern": "BL[0-9a-fA-F]{40}", + "example": "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7" + }, "AccountStatus": { "type": "string", "enum": ["closed", "suspended", "active"], @@ -2419,12 +2432,30 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [], "type": "object", "properties": {} } ] }, + "TTSEngineName": { + "description": "The engine to use for the TTS. The complete list of valid values for the engine attribute is shown below.", + "type": "string", + "enum": ["freeclimb.standard", "freeclimb.neural", "ElevenLabs"] + }, + "TTSEngine": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/TTSEngineName" + }, + "parameters": { + "description": "Parameters for the TTS engine. The parameters are specific to the engine and are documented in the engine's documentation.", + "type": "object", + "properties": {}, + "additionalProperties": true + } + } + }, "Say": { "description": "The `Say` command provides Text-To-Speech (TTS) support. It converts text to speech and then renders it in a female voice back to the caller. `Say` is useful in cases where it's difficult to pre-record a prompt for any reason. `Say` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested.", "allOf": [ @@ -2443,6 +2474,9 @@ "description": "Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.", "type": "string" }, + "engine": { + "$ref": "#/components/schemas/TTSEngine" + }, "loop": { "description": "Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.", "type": "integer", @@ -2489,7 +2523,6 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [], "type": "object", "properties": { "listen": { @@ -2507,7 +2540,6 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [], "type": "object", "properties": { "talk": { @@ -2525,7 +2557,6 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [], "type": "object", "properties": { "dtmfPassThrough": { @@ -2585,7 +2616,6 @@ "$ref": "#/components/schemas/PerclCommand" }, { - "required": [], "type": "object", "properties": {} } @@ -3662,9 +3692,7 @@ }, "CreateConferenceRequest": { "type": "object", - "required": [ - "statusCallbackUrl" - ], + "required": ["statusCallbackUrl"], "properties": { "alias": { "type": "string", @@ -4850,23 +4878,16 @@ "ExportResourceType": { "type": "string", "description": "platform resource type", - "enum": [ - "Messages", - "Calls" - ] + "enum": ["Messages", "Calls"] }, "ExportOutputType": { "type": "string", "description": "output type of the export", - "enum": [ - "csv" - ] + "enum": ["csv"] }, "ExportRequestOutput": { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "$ref": "#/components/schemas/ExportOutputType" @@ -4875,9 +4896,7 @@ }, "ExportResultOutput": { "type": "object", - "required": [ - "type" - ], + "required": ["type"], "properties": { "type": { "$ref": "#/components/schemas/ExportOutputType" @@ -4962,12 +4981,7 @@ "query": { "direction": "inbound" }, - "format": [ - "messageId", - "dateUpdated", - "segmentCount", - "status" - ], + "format": ["messageId", "dateUpdated", "segmentCount", "status"], "output": { "type": "csv" } @@ -4994,10 +5008,7 @@ }, "ExportRequest": { "type": "object", - "required": [ - "resourceType", - "output" - ], + "required": ["resourceType", "output"], "properties": { "resourceType": { "$ref": "#/components/schemas/ExportResourceType" @@ -5015,6 +5026,240 @@ "type": "object" } } + }, + "CreateBlobRequest": { + "type": "object", + "required": ["blob"], + "properties": { + "alias": { + "type": "string", + "description": "Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided.", + "maxLength": 64 + }, + "expiresAt": { + "type": "string", + "description": "An RFC3339 timestamp with millisecond resolution. This timestamp defines the time at which this blob will delete itself. It must not be more than 48 hours in the future and will default to 9 hours in the future if not provided.", + "example": "2006-01-02T15:04:05.000Z" + }, + "blob": { + "type": "object" + } + }, + "additionalProperties": false + }, + "ModifyBlobRequest": { + "type": "object", + "required": ["blob"], + "properties": { + "blob": { + "type": "object" + }, + "alias": { + "type": "string", + "description": "Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided.", + "maxLength": 64 + } + } + }, + "ReplaceBlobRequest": { + "type": "object", + "required": ["blob"], + "properties": { + "blob": { + "type": "object" + } + } + }, + "BlobResult": { + "type": "object", + "properties": { + "blobId": { + "$ref": "#/components/schemas/blobId" + }, + "accountId": { + "$ref": "#/components/schemas/accountId" + }, + "alias": { + "type": "string", + "description": "Custom identifier for this blob that is unique for the owning account. It will be set to the blobId by default if not provided in the creation request.", + "maxLength": 64 + }, + "revision": { + "type": "integer" + }, + "dateCreated": { + "type": "string", + "format": "date-time", + "description": "An RFC3339 timestamp with millisecond resolution. It represents the time this blob was created." + }, + "dateUpdated": { + "type": "string", + "format": "date-time", + "description": "An RFC3339 timestamp with millisecond resolution. It represents the time this blob was last modified, which at creation will always equal dateCreated." + }, + "expiresAt": { + "type": "string", + "format": "date-time", + "description": "An RFC3339 timestamp with millisecond resolution. It represents the time at which this blob will expire and self delete." + }, + "blob": { + "type": "object", + "description": "Blob content" + } + } + }, + "BlobListResponse": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PaginationModel" + }, + { + "type": "object", + "properties": { + "blobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlobResult" + } + } + } + } + ] + }, + "PlatformError": { + "description": "Standard error structure returned by platform.", + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "call": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "details": { + "type": "object" + } + }, + "example": { + "code": 0, + "call": "Internal Failure", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#0" + } + } + }, + "responses": { + "success204": { + "description": "Successful operation" + }, + "error400": { + "description": "Generic platform bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 80, + "call": "Missing Required Parameter(s)", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#80" + } + } + } + }, + "error404": { + "description": "Generic platform not found error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 1, + "call": "Not Found", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#1" + } + } + } + }, + "error409": { + "description": "Generic platform status conflict error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 108, + "call": "ResourceConflict", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#108" + } + } + } + }, + "error413": { + "description": "Generic platform status request entity too large.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 3, + "call": "BadRequestBody", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#3" + } + } + } + }, + "error422": { + "description": "Generic platform unprocessible entity response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 9, + "call": "Invalid JSON", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#9" + } + } + } + }, + "error500": { + "description": "Generic platform internal error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 0, + "call": "Internal Failure", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#0" + } + } + } + }, + "error504": { + "description": "gateway timeout error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 0, + "call": "Internal Failure", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#0" + } + } + } } } }, @@ -5026,7 +5271,7 @@ "paths": { "/Accounts/{accountId}": { "get": { - "tags": [], + "tags": ["Accounts"], "summary": "Get an Account", "operationId": "get-an-account", "parameters": [ @@ -5049,7 +5294,7 @@ } }, "post": { - "tags": [], + "tags": ["Accounts"], "summary": "Manage an account", "operationId": "update-an-account", "parameters": [ @@ -5076,7 +5321,7 @@ }, "/Accounts/{accountId}/Applications/{applicationId}": { "get": { - "tags": [], + "tags": ["Applications"], "summary": "Get an Application", "operationId": "get-an-application", "parameters": [ @@ -5108,7 +5353,7 @@ } }, "post": { - "tags": [], + "tags": ["Applications"], "summary": "Update an application", "operationId": "update-an-application", "parameters": [ @@ -5150,7 +5395,7 @@ } }, "delete": { - "tags": [], + "tags": ["Applications"], "summary": "Delete an application", "operationId": "delete-an-application", "parameters": [ @@ -5177,7 +5422,7 @@ }, "/Accounts/{accountId}/Applications": { "get": { - "tags": [], + "tags": ["Applications"], "summary": "List applications", "operationId": "list-applications", "parameters": [ @@ -5209,7 +5454,7 @@ } }, "post": { - "tags": [], + "tags": ["Applications"], "summary": "Create an application", "operationId": "create-an-application", "parameters": [ @@ -5244,7 +5489,7 @@ }, "/AvailablePhoneNumbers": { "get": { - "tags": [], + "tags": ["AvailablePhoneNumbers"], "summary": "List available numbers", "operationId": "list-available-numbers", "parameters": [ @@ -5328,7 +5573,7 @@ }, "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}": { "get": { - "tags": [], + "tags": ["IncomingPhoneNumbers"], "summary": "Get an Incoming Number", "operationId": "get-an-incoming-number", "parameters": [ @@ -5360,7 +5605,7 @@ } }, "post": { - "tags": [], + "tags": ["IncomingPhoneNumbers"], "summary": "Update an Incoming Number", "operationId": "update-an-incoming-number", "parameters": [ @@ -5402,7 +5647,7 @@ } }, "delete": { - "tags": [], + "tags": ["IncomingPhoneNumbers"], "summary": "Delete an Incoming Number", "operationId": "delete-an-incoming-number", "parameters": [ @@ -5429,7 +5674,7 @@ }, "/Accounts/{accountId}/IncomingPhoneNumbers": { "get": { - "tags": [], + "tags": ["IncomingPhoneNumbers"], "summary": "List Incoming Numbers", "operationId": "list-incoming-numbers", "parameters": [ @@ -5571,7 +5816,7 @@ } }, "post": { - "tags": [], + "tags": ["IncomingPhoneNumbers"], "summary": "Buy a Phone Number", "operationId": "buy-a-phone-number", "parameters": [ @@ -5607,7 +5852,7 @@ }, "/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion": { "post": { - "tags": [], + "tags": ["KnowledgeBases"], "summary": "Query the knowledge base", "operationId": "create-knowledge-base-completion", "parameters": [ @@ -5651,7 +5896,7 @@ }, "/Accounts/{accountId}/Calls/{callId}": { "get": { - "tags": [], + "tags": ["Calls"], "summary": "Get a Call", "operationId": "get-a-call", "parameters": [ @@ -5683,7 +5928,7 @@ } }, "post": { - "tags": [], + "tags": ["Calls"], "summary": "Update a Live Call", "operationId": "update-a-live-call", "parameters": [ @@ -5721,7 +5966,7 @@ }, "/Accounts/{accountId}/Calls": { "post": { - "tags": [], + "tags": ["Calls"], "summary": "Make a Call", "operationId": "make-a-call", "parameters": [ @@ -5754,7 +5999,7 @@ } }, "get": { - "tags": [], + "tags": ["Calls"], "summary": "List Calls", "operationId": "list-calls", "parameters": [ @@ -5876,7 +6121,7 @@ }, "/Accounts/{accountId}/Calls/{callId}/Recordings": { "get": { - "tags": [], + "tags": ["Calls"], "summary": "List Call Recordings", "operationId": "list-call-recordings", "parameters": [ @@ -5919,7 +6164,7 @@ }, "/Accounts/{accountId}/Calls/{callId}/Logs": { "get": { - "tags": [], + "tags": ["Calls"], "summary": "List Call Logs", "operationId": "list-call-logs", "parameters": [ @@ -5953,6 +6198,7 @@ }, "/Accounts/{accountId}/Calls/WebRTC/Token": { "post": { + "tags": ["Calls"], "summary": "Make a JWT for WebRTC calling", "operationId": "make-a-webrtc-jwt", "parameters": [ @@ -5988,7 +6234,7 @@ }, "/Accounts/{accountId}/Conferences": { "post": { - "tags": [], + "tags": ["Conferences"], "summary": "Create a Conference", "operationId": "create-a-conference", "parameters": [ @@ -6021,7 +6267,7 @@ } }, "get": { - "tags": [], + "tags": ["Conferences"], "summary": "List Conferences", "operationId": "list-conferences", "parameters": [ @@ -6082,7 +6328,7 @@ }, "/Accounts/{accountId}/Conferences/{conferenceId}": { "post": { - "tags": [], + "tags": ["Conferences"], "summary": "Update a Conference", "operationId": "update-a-conference", "parameters": [ @@ -6117,7 +6363,7 @@ } }, "get": { - "tags": [], + "tags": ["Conferences"], "summary": "Get a Conference", "operationId": "get-a-conference", "parameters": [ @@ -6151,7 +6397,7 @@ }, "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}": { "post": { - "tags": [], + "tags": ["Conferences"], "summary": "Update a Participant", "operationId": "update-a-participant", "parameters": [ @@ -6202,7 +6448,7 @@ } }, "get": { - "tags": [], + "tags": ["Conferences"], "summary": "Get a Participant", "operationId": "get-a-participant", "parameters": [ @@ -6243,7 +6489,7 @@ } }, "delete": { - "tags": [], + "tags": ["Conferences"], "summary": "Remove a Participant", "operationId": "remove-a-participant", "parameters": [ @@ -6279,7 +6525,7 @@ }, "/Accounts/{accountId}/Conferences/{conferenceId}/Participants": { "get": { - "tags": [], + "tags": ["Conferences"], "summary": "List Participants", "operationId": "list-participants", "parameters": [ @@ -6340,7 +6586,7 @@ }, "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings": { "get": { - "tags": [], + "tags": ["Conferences"], "summary": "List Conference Recordings", "operationId": "list-conference-recordings", "parameters": [ @@ -6392,7 +6638,7 @@ }, "/Accounts/{accountId}/Queues/{queueId}": { "post": { - "tags": [], + "tags": ["Queues"], "summary": "Update a Queue", "operationId": "update-a-queue", "parameters": [ @@ -6434,7 +6680,7 @@ } }, "get": { - "tags": [], + "tags": ["Queues"], "summary": "Get a Queue", "operationId": "get-a-queue", "parameters": [ @@ -6468,7 +6714,7 @@ }, "/Accounts/{accountId}/Queues": { "get": { - "tags": [], + "tags": ["Queues"], "summary": "List Active Queues", "operationId": "list-active-queues", "parameters": [ @@ -6500,7 +6746,7 @@ } }, "post": { - "tags": [], + "tags": ["Queues"], "summary": "Create a Queue", "operationId": "create-a-queue", "parameters": [ @@ -6535,7 +6781,7 @@ }, "/Accounts/{accountId}/Queues/{queueId}/Members/Front": { "get": { - "tags": [], + "tags": ["Queues"], "summary": "Get Head Member", "operationId": "get-head-member", "parameters": [ @@ -6567,7 +6813,7 @@ } }, "post": { - "tags": [], + "tags": ["Queues"], "summary": "Dequeue Head Member", "operationId": "dequeue-head-member", "parameters": [ @@ -6601,7 +6847,7 @@ }, "/Accounts/{accountId}/Queues/{queueId}/Members": { "get": { - "tags": [], + "tags": ["Queues"], "summary": "List Members", "operationId": "list-members", "parameters": [ @@ -6635,7 +6881,7 @@ }, "/Accounts/{accountId}/Queues/{queueId}/Members/{callId}": { "get": { - "tags": [], + "tags": ["Queues"], "summary": "Get a Member", "operationId": "get-a-member", "parameters": [ @@ -6676,7 +6922,7 @@ } }, "post": { - "tags": [], + "tags": ["Queues"], "summary": "Dequeue a Member", "operationId": "dequeue-a-member", "parameters": [ @@ -6719,7 +6965,7 @@ }, "/Accounts/{accountId}/Logs": { "get": { - "tags": [], + "tags": ["Logs"], "summary": "List All Account Logs", "operationId": "list-all-account-logs", "parameters": [ @@ -6742,7 +6988,7 @@ } }, "post": { - "tags": [], + "tags": ["Logs"], "summary": "Filter Logs", "operationId": "filter-logs", "parameters": [ @@ -6778,7 +7024,7 @@ }, "/Accounts/{accountId}/Recordings": { "get": { - "tags": [], + "tags": ["Recordings"], "summary": "List Recordings", "operationId": "list-recordings", "parameters": [ @@ -6830,7 +7076,7 @@ }, "/Accounts/{accountId}/Recordings/{recordingId}": { "get": { - "tags": [], + "tags": ["Recordings"], "summary": "Get a Recording", "operationId": "get-a-recording", "parameters": [ @@ -6862,7 +7108,7 @@ "deprecated": false }, "delete": { - "tags": [], + "tags": ["Recordings"], "summary": "Delete a Recording", "operationId": "delete-a-recording", "parameters": [ @@ -6889,7 +7135,7 @@ }, "/Accounts/{accountId}/Recordings/{recordingId}/Stream": { "get": { - "tags": [], + "tags": ["Recordings"], "summary": "Stream a Recording File", "operationId": "stream-a-recording-file", "parameters": [ @@ -6908,9 +7154,9 @@ ], "responses": { "200": { - "description": "Streaming a Recording represented with audio/x-wav mime-type", + "description": "Streaming a Recording represented with audio/wav mime-type", "content": { - "audio/x-wav": { + "audio/wav": { "schema": { "type": "string", "format": "binary" @@ -6924,7 +7170,7 @@ }, "/Accounts/{accountId}/Recordings/{recordingId}/Download": { "get": { - "tags": [], + "tags": ["Recordings"], "summary": "Download a Recording File", "operationId": "download-a-recording-file", "parameters": [ @@ -6943,9 +7189,9 @@ ], "responses": { "200": { - "description": "Download a Recording file represented with audio/x-wav mime-type", + "description": "Download a Recording file represented with audio/wav mime-type", "content": { - "audio/x-wav": { + "audio/wav": { "schema": { "type": "string", "format": "binary" @@ -6959,7 +7205,7 @@ }, "/Accounts/{accountId}/Messages": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "List SMS Messages", "operationId": "list-sms-messages", "parameters": [ @@ -7054,7 +7300,7 @@ "deprecated": false }, "post": { - "tags": [], + "tags": ["Messages"], "summary": "Send an SMS Message", "operationId": "send-an-sms-message", "parameters": [ @@ -7090,7 +7336,7 @@ }, "/Accounts/{accountId}/Messages/{messageId}": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get an SMS Message", "operationId": "get-an-sms-message", "parameters": [ @@ -7124,7 +7370,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/Campaigns": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get list of SMS 10DLC Campaigns", "operationId": "get-tenDLC-sms-campaigns", "parameters": [ @@ -7202,7 +7448,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get a 10DLC SMS Campaign", "operationId": "get-tenDLC-sms-campaign", "parameters": [ @@ -7236,7 +7482,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get list of SMS 10DLC Partner Campaigns", "operationId": "get-tenDLC-sms-partnerCampaigns", "parameters": [ @@ -7323,7 +7569,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get a 10DLC SMS Partner Campaign", "operationId": "get-tenDLC-sms-partnerCampaign", "parameters": [ @@ -7357,7 +7603,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/Brands": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get list of SMS 10DLC Brands", "operationId": "get-tenDLC-sms-brands", "parameters": [ @@ -7424,7 +7670,7 @@ }, "/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get a 10DLC SMS Brand", "operationId": "get-tenDLC-sms-brand", "parameters": [ @@ -7458,7 +7704,7 @@ }, "/Accounts/{accountId}/Messages/TollFree/Campaigns": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get list of TollFree Campaigns", "operationId": "get-tollFree-sms-campaigns", "parameters": [ @@ -7503,7 +7749,7 @@ }, "/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}": { "get": { - "tags": [], + "tags": ["Messages"], "summary": "Get a TollFree SMS Campaign", "operationId": "get-tollFree-sms-campaign", "parameters": [ @@ -7537,7 +7783,7 @@ }, "/Accounts/{accountId}/Exports": { "get": { - "tags": [], + "tags": ["Exports"], "summary": "List Exports", "operationId": "list-exports", "responses": { @@ -7577,7 +7823,7 @@ "post": { "summary": "Create an Export", "operationId": "create-export", - "tags": [], + "tags": ["Exports"], "requestBody": { "description": "A JSON object containing export creation parameters", "content": { @@ -7609,7 +7855,7 @@ }, "/Accounts/{accountId}/Exports/{exportId}": { "get": { - "tags": [], + "tags": ["Exports"], "summary": "Get an Export", "operationId": "get-an-export", "parameters": [ @@ -7641,7 +7887,7 @@ } }, "delete": { - "tags": [], + "tags": ["Exports"], "summary": "Delete an Export", "operationId": "delete-an-export", "parameters": [ @@ -7668,7 +7914,7 @@ }, "/Accounts/{accountId}/Exports/{exportId}/Download": { "get": { - "tags": [], + "tags": ["Exports"], "summary": "Download an Export", "operationId": "download-an-export", "parameters": [ @@ -7699,8 +7945,559 @@ } } } + }, + "/Accounts/{accountId}/Blobs": { + "summary": "Operations affecting the whole set of Blobs belonging to an account.", + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + } + ], + "get": { + "summary": "List Blobs belonging to an account.", + "description": "List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API.", + "tags": ["Blobs"], + "responses": { + "200": { + "description": "Single page of blob list results.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobListResponse" + }, + "example": { + "total": 2, + "start": 0, + "end": 1, + "page": 0, + "numPages": 1, + "pageSize": 100, + "nextPageUri": null, + "blobs": [ + { + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "alias": "my-blob-alias", + "revision": 1, + "dateCreated": "2006-01-02T15:04:05.000Z", + "dateUpdated": "2006-01-02T15:04:05.000Z", + "expiresAt": "2006-01-02T15:04:05.000Z", + "blob": { + "field0": "value0", + "field1": 1, + "field2": true + } + }, + { + "blobId": "BL487ec3f6e03b340553f35f29c8f118cdf3eae08b", + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "alias": "another-blob", + "revision": 1, + "dateCreated": "2006-01-02T16:04:05.000Z", + "dateUpdated": "2006-01-02T16:04:05.000Z", + "expiresAt": "2006-01-02T16:04:05.000Z", + "blob": { + "data": "example" + } + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/error400" + }, + "500": { + "$ref": "#/components/responses/error500" + }, + "504": { + "$ref": "#/components/responses/error504" + } + }, + "operationId": "list-blobs", + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "alias", + "description": "Filter blobs by alias" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "description": "Used to reference pages of a list of blobs" + } + ] + }, + "post": { + "tags": ["Blobs"], + "summary": "Create a Blob", + "description": "Create a new Blob belonging to the requesting account.", + "operationId": "create-blob", + "requestBody": { + "description": "An object defining a new blob. A request body must be provided but the blob may be empty.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBlobRequest" + }, + "examples": { + "plain_empty_blob": { + "value": { + "blob": {} + } + }, + "setting_blob_content": { + "value": { + "blob": { + "key0": "value0", + "key1": 1, + "key2": { + "keyA": true, + "keyB": [1, 1, 2, 3, 5, 8, 13, 21] + } + } + } + }, + "setting_alias_blob": { + "value": { + "alias": "my_custom_blob_identifier", + "blob": { + "key": "value" + } + } + }, + "setting_expiresAt_blob": { + "value": { + "expiresAt": "2025-01-04T15:04:05.060Z", + "blob": { + "key": 45 + } + } + }, + "setting_everything_blob": { + "value": { + "alias": "my_custom_blob_identifier", + "expiresAt": "2025-01-04T15:04:05.060Z", + "blob": { + "key0": "value", + "key1": 45 + } + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful creation of a new blob.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResult" + }, + "examples": { + "plain_empty_blob": { + "value": { + "revision": 1, + "dateCreated": "2025-01-02T15:04:05.000Z", + "dateUpdated": "2025-01-02T15:04:05.000Z", + "accountId": "AC387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "alias": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "expiresAt": "2025-01-03T00:04:05.000Z", + "blob": {} + } + }, + "setting_blob_content": { + "value": { + "revision": 1, + "dateCreated": "2025-01-02T15:04:05.000Z", + "dateUpdated": "2025-01-02T15:04:05.000Z", + "accountId": "AC387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "alias": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "expiresAt": "2025-01-03T00:04:05.000Z", + "blob": { + "key0": "value0", + "key1": 1, + "key2": { + "keyA": true, + "keyB": [1, 1, 2, 3, 5, 8, 13, 21] + } + } + } + }, + "setting_alias_blob": { + "value": { + "revision": 1, + "dateCreated": "2025-01-02T15:04:05.000Z", + "dateUpdated": "2025-01-02T15:04:05.000Z", + "accountId": "AC387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "alias": "my_custom_blob_identifier", + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "expiresAt": "2025-01-03T00:04:05.000Z", + "blob": { + "key": "value" + } + } + }, + "setting_expiresAt_blob": { + "value": { + "revision": 1, + "dateCreated": "2025-01-02T15:04:05.000Z", + "dateUpdated": "2025-01-02T15:04:05.000Z", + "accountId": "AC387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "alias": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "expiresAt": "2025-01-04T15:04:05.060Z", + "blob": { + "key": 45 + } + } + }, + "setting_everything_blob": { + "value": { + "revision": 1, + "dateCreated": "2025-01-02T15:04:05.000Z", + "dateUpdated": "2025-01-02T15:04:05.000Z", + "accountId": "AC387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "alias": "my_custom_blob_identifier", + "expiresAt": "2025-01-04T15:04:05.060Z", + "blob": { + "key0": "value", + "key1": 45 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/error400" + }, + "409": { + "description": "A blob with the provided alias already exists oln the requesting account and so this new blob is rejected as there cannot be duplicate alises.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 108, + "call": "Request conflicts with another resource", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#108", + "details": { + "explanation": "alias already exists for another blob on this account" + } + } + } + } + }, + "413": { + "description": "The blob exceeded one of the size limits. Either it itself is too large or it would push the total sum of all blobs over the account's limit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformError" + }, + "example": { + "code": 80, + "call": "Missing Required Parameter(s)", + "url": "https://docs.freeclimb.com/reference/error-and-warning-dictionary#80", + "details": { + "explanation": "blob exceeds per-blob size limit" + } + } + } + } + }, + "422": { + "$ref": "#/components/responses/error422" + }, + "500": { + "$ref": "#/components/responses/error500" + } + } + } + }, + "/Accounts/{accountId}/Blobs/{blobId}": { + "summary": "Operations affecting an individual blob belonging to an account.", + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + }, + { + "name": "blobId", + "in": "path", + "description": "String that uniquely identifies this Blob resource.", + "required": true, + "schema": { + "$ref": "#/components/schemas/blobId" + } + } + ], + "get": { + "summary": "Get Blob", + "tags": ["Blobs"], + "responses": { + "200": { + "description": "Retrieve a Blob.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResult" + }, + "example": { + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "alias": "my-blob-alias", + "revision": 1, + "dateCreated": "2006-01-02T15:04:05.000Z", + "dateUpdated": "2006-01-02T15:04:05.000Z", + "expiresAt": "2006-01-02T15:04:05.000Z", + "blob": { + "field0": "value0", + "field1": 1, + "field2": true + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/error404" + }, + "500": { + "$ref": "#/components/responses/error500" + }, + "504": { + "$ref": "#/components/responses/error504" + } + }, + "operationId": "get-blob", + "description": "Retrieves a specified blob" + }, + "delete": { + "summary": "Delete Blob", + "tags": ["Blobs"], + "responses": { + "200": { + "description": "Blob keys deleted successfully, remaining blob returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResult" + } + } + } + }, + "204": { + "$ref": "#/components/responses/success204" + }, + "404": { + "$ref": "#/components/responses/error404" + }, + "422": { + "$ref": "#/components/responses/error422" + }, + "500": { + "$ref": "#/components/responses/error500" + }, + "504": { + "$ref": "#/components/responses/error504" + } + }, + "operationId": "delete-blob", + "description": "Deletes a blob or specific keys from a blob. If no keys are specified in the request body, the entire blob is deleted (returns 204). If specific keys are provided, only those keys are removed and the remaining blob is returned (returns 200)." + }, + "patch": { + "summary": "Modify Blob", + "tags": ["Blobs"], + "responses": { + "200": { + "description": "Blob keys successfully modified, updated blob returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResult" + }, + "example": { + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "alias": "new_conversation_id", + "revision": 2, + "dateCreated": "2006-01-02T15:04:05.000Z", + "dateUpdated": "2006-01-02T15:04:05.000Z", + "expiresAt": "2006-01-02T15:04:05.000Z", + "blob": { + "field0": "value0_redux", + "field4": "value4" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/error404" + }, + "409": { + "$ref": "#/components/responses/error409" + }, + "413": { + "$ref": "#/components/responses/error413" + }, + "500": { + "$ref": "#/components/responses/error500" + } + }, + "operationId": "modify-blob", + "requestBody": { + "description": "Request body to specify keys to modify. Or new keys to add onto the already existing blob", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyBlobRequest" + }, + "example": { + "alias": "new_conversation_id", + "blob": { + "field0": "value0_redux", + "field4": "value4" + } + } + } + } + }, + "description": "Modifys a pre existing blob by either adding new fields, or modifying existing fields" + }, + "put": { + "summary": "Replace Blob", + "tags": ["Blobs"], + "responses": { + "200": { + "description": "Replaces all keys in blob with those provided.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobResult" + }, + "example": { + "blobId": "BL387ec3f6e03b340553f35f29c8f118cdf3eae08a", + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "alias": "new_conversation_id", + "revision": 2, + "dateCreated": "2006-01-02T15:04:05.000Z", + "dateUpdated": "2006-01-02T15:04:05.000Z", + "expiresAt": "2006-01-02T15:04:05.000Z", + "blob": { + "field0": "value0_redux", + "field4": "value4" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/error404" + }, + "409": { + "$ref": "#/components/responses/error409" + }, + "413": { + "$ref": "#/components/responses/error413" + }, + "500": { + "$ref": "#/components/responses/error500" + } + }, + "operationId": "replace-blob", + "requestBody": { + "description": "JSON object containing blob key the contents of which will be used to override the enitre blob contents.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplaceBlobRequest" + }, + "example": { + "blob": { + "field0": "value0_redux", + "field4": "value4" + } + } + } + } + }, + "description": "Replaces the blob content with the provided values." + } } }, + "tags": [ + { + "name": "Accounts", + "description": "API for managing whole Accounts" + }, + { + "name": "Applications", + "description": "API for managing Applications" + }, + { + "name": "AvailablePhoneNumbers", + "description": "API for managing AvailablePhoneNumbers" + }, + { + "name": "IncomingPhoneNumbers", + "description": "API for managing IncomingPhoneNumbers" + }, + { + "name": "KnowledgeBases", + "description": "API for managing KnowledgeBases" + }, + { + "name": "Calls", + "description": "API for managing Calls" + }, + { + "name": "Conferences", + "description": "API for managing Conferences" + }, + { + "name": "Queues", + "description": "API for managing Queues" + }, + { + "name": "Logs", + "description": "API for managing Logs" + }, + { + "name": "Recordings", + "description": "API for managing Recordings" + }, + { + "name": "Messages", + "description": "API for managing Messages" + }, + { + "name": "Exports", + "description": "API for managing Exports" + }, + { + "name": "Blobs", + "description": "API for managing Blobs" + } + ], "x-headers": [], "x-explorer-enabled": true, "x-proxy-enabled": true, diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index 48134d3..7e5e4ef 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -18,14 +18,15 @@ describe "DefaultApi" do before do # run before each test + @account_id_test_value = "AC0123456789abcdefABCDEF0123456789abcdef00" Freeclimb.configure do |config| # Configure HTTP basic authorization: fc config.scheme = "http" config.host = "http://127.0.0.1:4010/" config.base_path = "/" config.server_index = nil - config.username = "ACCOUNT_ID" - config.password = "API_KEY" + config.username = @account_id_test_value + config.password = "API_KEY56789abcdefABCDEF0123456789abcdef00" end @api_client = Freeclimb::ApiClient.new @@ -258,6 +259,26 @@ @export_id_delete_an_export_test_value = "delete_exportId_example" @export_id_get_an_export_test_value = "get_exportId_example" + + @create_blob_request_create_blob_test_value = Freeclimb::CreateBlobRequest.new({_alias: "alias_example", expires_at: "expires_at_example", blob: {}}) + + @blob_id_delete_blob_test_value = "BL0123456789abcdefABCDEF0123456789abcdef00" + + @blob_id_get_blob_test_value = "BL0123456789abcdefABCDEF0123456789abcdef00" + + @alias_list_blobs_test_value = "alias_example" + + @blob_id_modify_blob_test_value = "BL0123456789abcdefABCDEF0123456789abcdef00" + + @key_delete_blob_test_value = ["key_example"] + + @cursor_list_blobs_test_value = "cursor_example" + + @modify_blob_request_modify_blob_test_value = Freeclimb::ModifyBlobRequest.new({blob: {}, _alias: "alias_example"}) + + @replace_blob_request_replace_blob_test_value = Freeclimb::ReplaceBlobRequest.new({blob: {}}) + + @blob_id_replace_blob_test_value = "BL0123456789abcdefABCDEF0123456789abcdef00" end after do @@ -354,6 +375,27 @@ end end + # unit tests for create_blob + # Create a Blob + # Create a new Blob belonging to the requesting account. + # @param create_blob_request An object defining a new blob. A request body must be provided but the blob may be empty. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + describe "create_blob test" do + it "should work" do + create_blob_request = @create_blob_request_create_blob_test_value + + result = @api_instance.create_blob( + create_blob_request, + {} + ) + + expect(result).to be_a Freeclimb::BlobResult + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for create_export # Create an Export # @param [Hash] opts the optional parameters @@ -475,6 +517,27 @@ end end + # unit tests for delete_blob + # Delete Blob + # Deletes a blob or specific keys from a blob. If no keys are specified in the request body, the entire blob is deleted (returns 204). If specific keys are provided, only those keys are removed and the remaining blob is returned (returns 200). + # @param blob_id String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + describe "delete_blob test" do + it "should work" do + blob_id = @blob_id_delete_blob_test_value + + result = @api_instance.delete_blob( + blob_id, + {} + ) + + expect(result).to be_a Freeclimb::BlobResult + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for dequeue_a_member # Dequeue a Member # @param queue_id String that uniquely identifies the Queue that the Member belongs to. @@ -796,6 +859,27 @@ end end + # unit tests for get_blob + # Get Blob + # Retrieves a specified blob + # @param blob_id String that uniquely identifies this Blob resource. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + describe "get_blob test" do + it "should work" do + blob_id = @blob_id_get_blob_test_value + + result = @api_instance.get_blob( + blob_id, + {} + ) + + expect(result).to be_a Freeclimb::BlobResult + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_head_member # Get Head Member # @param queue_id String that uniquely identifies the Queue that the Member belongs to. @@ -1067,6 +1151,23 @@ end end + # unit tests for list_blobs + # List Blobs belonging to an account. + # List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API. + # @param [Hash] opts the optional parameters + # @return [BlobListResponse] + describe "list_blobs test" do + it "should work" do + result = @api_instance.list_blobs( + {} + ) + + expect(result).to be_a Freeclimb::BlobListResponse + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for list_call_logs # List Call Logs # @param call_id String that uniquely identifies this call resource. @@ -1235,8 +1336,6 @@ # @option opts [String] :country Country of this phone number. # @option opts [String] :application_id ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. # @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it. - # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it # @option opts [Boolean] :capabilities_voice # @option opts [Boolean] :capabilities_sms @@ -1254,8 +1353,6 @@ country = @country_list_incoming_numbers_test_value application_id = @application_id_list_incoming_numbers_test_value has_application = @has_application_list_incoming_numbers_test_value - voice_enabled = @voice_enabled_list_incoming_numbers_test_value - sms_enabled = @sms_enabled_list_incoming_numbers_test_value has_campaign = @has_campaign_list_incoming_numbers_test_value capabilities_voice = @capabilities_voice_list_incoming_numbers_test_value capabilities_sms = @capabilities_sms_list_incoming_numbers_test_value @@ -1267,7 +1364,7 @@ result = @api_instance.list_incoming_numbers( { - phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, voice_enabled: voice_enabled, sms_enabled: sms_enabled, has_campaign: has_campaign, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code, tfn_campaign_id: tfn_campaign_id, offnet: offnet + phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, 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 } ) @@ -1425,6 +1522,29 @@ end end + # unit tests for modify_blob + # Modify Blob + # Modifys a pre existing blob by either adding new fields, or modifying existing fields + # @param blob_id String that uniquely identifies this Blob resource. + # @param modify_blob_request Request body to specify keys to modify. Or new keys to add onto the already existing blob + # @param [Hash] opts the optional parameters + # @return [BlobResult] + describe "modify_blob test" do + it "should work" do + blob_id = @blob_id_modify_blob_test_value + modify_blob_request = @modify_blob_request_modify_blob_test_value + + result = @api_instance.modify_blob( + blob_id, modify_blob_request, + {} + ) + + expect(result).to be_a Freeclimb::BlobResult + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for remove_a_participant # Remove a Participant # @param conference_id ID of the conference this participant is in. @@ -1446,6 +1566,29 @@ end end + # unit tests for replace_blob + # Replace Blob + # Replaces the blob content with the provided values. + # @param blob_id String that uniquely identifies this Blob resource. + # @param replace_blob_request JSON object containing blob key the contents of which will be used to override the enitre blob contents. + # @param [Hash] opts the optional parameters + # @return [BlobResult] + describe "replace_blob test" do + it "should work" do + blob_id = @blob_id_replace_blob_test_value + replace_blob_request = @replace_blob_request_replace_blob_test_value + + result = @api_instance.replace_blob( + blob_id, replace_blob_request, + {} + ) + + expect(result).to be_a Freeclimb::BlobResult + + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for send_an_sms_message # Send an SMS Message # @param message_request Details to create a message @@ -1661,7 +1804,7 @@ filter_logs_request, {} ) - result.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1677,7 +1820,7 @@ result = @api_instance.get_ten_dlc_sms_brands( {} ) - result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Brands?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Brands?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::SMSTenDLCBrandsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1698,7 +1841,7 @@ brand_id: brand_id } ) - result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Campaigns?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Campaigns?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::SMSTenDLCCampaignsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1719,7 +1862,7 @@ brand_id: brand_id } ) - result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::SMSTenDLCPartnerCampaignsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1735,7 +1878,7 @@ result = @api_instance.get_toll_free_sms_campaigns( {} ) - result.next_page_uri = "/Accounts/{accountId}/Messages/TollFree/Campaigns?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Messages/TollFree/Campaigns?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::SMSTollFreeCampaignsListResult # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1756,7 +1899,7 @@ _alias: _alias } ) - result.next_page_uri = "/Accounts/{accountId}/Queues?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Queues?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::QueueList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1772,7 +1915,7 @@ result = @api_instance.list_all_account_logs( {} ) - result.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1793,7 +1936,7 @@ _alias: _alias } ) - result.next_page_uri = "/Accounts/{accountId}/Applications?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Applications?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::ApplicationList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1832,13 +1975,30 @@ phone_number: phone_number, region: region, country: country, voice_enabled: voice_enabled, sms_enabled: sms_enabled, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code } ) - result.next_page_uri = "/AvailablePhoneNumbers?cursor=1" + result.next_page_uri = "/AvailablePhoneNumbers?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::AvailableNumberList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end + # unit tests for get_next_page list_blobs + # List Blobs belonging to an account. + # List Blobs belonging to an account. Results are returned in paginated lists mirroring other listing features in the API. + # @param [Hash] opts the optional parameters + # @return [BlobListResponse] + describe "list_blobs_get_next_page test" do + it "should work" do + result = @api_instance.list_blobs( + {} + ) + result.next_page_uri = "/Accounts/{accountId}/Blobs?cursor=1".sub("{accountId}", @account_id_test_value) + next_page_result = @api_instance.get_next_page(result) + expect(next_page_result).to be_a Freeclimb::BlobListResponse + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_next_page list_call_logs # List Call Logs # @param call_id String that uniquely identifies this call resource. @@ -1852,7 +2012,7 @@ call_id, {} ) - result.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Logs?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Logs?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::LogList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1876,7 +2036,7 @@ date_created: date_created } ) - result.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Recordings?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Recordings?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::RecordingList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1915,7 +2075,7 @@ 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, risk_score_min: risk_score_min, risk_score_max: risk_score_max } ) - result.next_page_uri = "/Accounts/{accountId}/Calls?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Calls?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::CallList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1941,7 +2101,7 @@ call_id: call_id, date_created: date_created } ) - result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::RecordingList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1968,7 +2128,7 @@ status: status, _alias: _alias, date_created: date_created, date_updated: date_updated } ) - result.next_page_uri = "/Accounts/{accountId}/Conferences?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Conferences?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::ConferenceList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -1991,7 +2151,7 @@ status: status, cursor: cursor } ) - result.next_page_uri = "/Accounts/{accountId}/Exports?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Exports?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::ExportList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -2007,8 +2167,6 @@ # @option opts [String] :country Country of this phone number. # @option opts [String] :application_id ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. # @option opts [Boolean] :has_application Indication of whether the phone number has an application linked to it. - # @option opts [Boolean] :voice_enabled Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - # @option opts [Boolean] :sms_enabled Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. # @option opts [Boolean] :has_campaign Indication of whether the phone number has a campaign associated with it # @option opts [Boolean] :capabilities_voice # @option opts [Boolean] :capabilities_sms @@ -2026,8 +2184,6 @@ country = @country_list_incoming_numbers_test_value application_id = @application_id_list_incoming_numbers_test_value has_application = @has_application_list_incoming_numbers_test_value - voice_enabled = @voice_enabled_list_incoming_numbers_test_value - sms_enabled = @sms_enabled_list_incoming_numbers_test_value has_campaign = @has_campaign_list_incoming_numbers_test_value capabilities_voice = @capabilities_voice_list_incoming_numbers_test_value capabilities_sms = @capabilities_sms_list_incoming_numbers_test_value @@ -2039,10 +2195,10 @@ result = @api_instance.list_incoming_numbers( { - phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, voice_enabled: voice_enabled, sms_enabled: sms_enabled, has_campaign: has_campaign, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code, tfn_campaign_id: tfn_campaign_id, offnet: offnet + phone_number: phone_number, _alias: _alias, region: region, country: country, application_id: application_id, has_application: has_application, has_campaign: has_campaign, capabilities_voice: capabilities_voice, capabilities_sms: capabilities_sms, capabilities_toll_free: capabilities_toll_free, capabilities_ten_dlc: capabilities_ten_dlc, capabilities_short_code: capabilities_short_code, tfn_campaign_id: tfn_campaign_id, offnet: offnet } ) - result.next_page_uri = "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::IncomingNumberList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -2062,7 +2218,7 @@ queue_id, {} ) - result.next_page_uri = "/Accounts/{accountId}/Queues/{queueId}/Members?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Queues/{queueId}/Members?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::QueueMemberList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -2090,7 +2246,7 @@ talk: talk, listen: listen, dtmf_pass_through: dtmf_pass_through } ) - result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::ConferenceParticipantList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -2115,7 +2271,7 @@ call_id: call_id, conference_id: conference_id, date_created: date_created } ) - result.next_page_uri = "/Accounts/{accountId}/Recordings?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Recordings?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::RecordingList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers @@ -2150,7 +2306,7 @@ to: to, from: from, begin_time: begin_time, end_time: end_time, direction: direction, campaign_id: campaign_id, brand_id: brand_id, is10_dlc: is10_dlc } ) - result.next_page_uri = "/Accounts/{accountId}/Messages?cursor=1" + result.next_page_uri = "/Accounts/{accountId}/Messages?cursor=1".sub("{accountId}", @account_id_test_value) next_page_result = @api_instance.get_next_page(result) expect(next_page_result).to be_a Freeclimb::MessagesList # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/spec/models/account_result_spec.rb b/spec/models/account_result_spec.rb index 7ed1b81..2f898fb 100644 --- a/spec/models/account_result_spec.rb +++ b/spec/models/account_result_spec.rb @@ -242,7 +242,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_subresource_uris = Object.new instance_1 = Freeclimb::AccountResult.new( uri: "TS", @@ -265,7 +265,7 @@ status: Freeclimb::AccountStatus::CLOSED, - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) instance_2 = Freeclimb::AccountResult.new( uri: "TS", @@ -288,7 +288,7 @@ status: Freeclimb::AccountStatus::CLOSED, - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/available_number_spec.rb b/spec/models/available_number_spec.rb index b5404bc..160c526 100644 --- a/spec/models/available_number_spec.rb +++ b/spec/models/available_number_spec.rb @@ -46,20 +46,6 @@ end end - describe 'test attribute "voice_enabled"' do - it "should work" do - instance.voice_enabled = false - expect(instance.voice_enabled).to eq(false) - end - end - - describe 'test attribute "sms_enabled"' do - it "should work" do - instance.sms_enabled = false - expect(instance.sms_enabled).to eq(false) - end - end - describe 'test attribute "region"' do it "should work" do instance.region = "TEST_STRING" @@ -84,10 +70,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -103,10 +85,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS", @@ -124,10 +102,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS", @@ -147,10 +121,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -167,34 +137,26 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Capabilities = Capabilities.new + obj_capabilities = Object.new instance_1 = Freeclimb::AvailableNumber.new( - capabilities: obj_Capabilities, + capabilities: obj_capabilities, campaign_id: "TS", phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" ) instance_2 = Freeclimb::AvailableNumber.new( - capabilities: obj_Capabilities, + capabilities: obj_capabilities, campaign_id: "TS", phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -210,10 +172,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -225,10 +183,6 @@ phone_number: "ST", - voice_enabled: false, - - sms_enabled: false, - region: "ST", country: "ST" @@ -246,10 +200,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -267,10 +217,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -282,10 +228,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -303,10 +245,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -324,13 +262,6 @@ expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String) end - it "deserializes the data of voice_enabled" do - expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass) - end - - it "deserializes the data of sms_enabled" do - expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass) - end it "deserializes the data of region" do expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String) end @@ -349,10 +280,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -370,10 +297,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -390,10 +313,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -405,10 +324,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -423,10 +338,6 @@ phone_number: "TS", - voice_enabled: true, - - sms_enabled: true, - region: "TS", country: "TS" @@ -440,12 +351,6 @@ it "returns phone_number in the form of hash" do expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number) end - it "returns voice_enabled in the form of hash" do - expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled) - end - it "returns sms_enabled in the form of hash" do - expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled) - end it "returns region in the form of hash" do expect(instance._to_hash(instance.region)).to eq(instance.region) end diff --git a/spec/models/blob_list_response_spec.rb b/spec/models/blob_list_response_spec.rb new file mode 100644 index 0000000..efe7993 --- /dev/null +++ b/spec/models/blob_list_response_spec.rb @@ -0,0 +1,502 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::BlobListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::BlobListResponse do + let(:instance) { Freeclimb::BlobListResponse.new } + + describe "test an instance of BlobListResponse" do + it "should create an instance of BlobListResponse" do + expect(instance).to be_instance_of(Freeclimb::BlobListResponse) + end + end + + describe 'test attribute "total"' do + it "should work" do + instance.total = 1 + expect(instance.total).to eq(1) + end + end + + describe 'test attribute "start"' do + it "should work" do + 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) + end + end + + describe 'test attribute "page"' do + it "should work" do + instance.page = 1 + expect(instance.page).to eq(1) + end + end + + describe 'test attribute "num_pages"' do + it "should work" do + 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) + end + end + + describe 'test attribute "next_page_uri"' do + it "should work" do + instance.next_page_uri = "TEST_STRING" + expect(instance.next_page_uri).to eq("TEST_STRING") + end + end + + describe 'test attribute "blobs"' do + it "should work" do + instance.blobs = ["ELEMENT_1", "ELEMENT_2"] + expect(instance.blobs).to eq(["ELEMENT_1", "ELEMENT_2"]) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::BlobListResponse" do + expect { + Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [], + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::BlobListResponse.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + instance_2 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::BlobListResponse.new( + total: 2, + + start: 2, + + _end: 2, + + page: 2, + + num_pages: 2, + + page_size: 2, + + next_page_uri: "TS", + + blobs: [] + ) + instance_2 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "ST", + + blobs: nil + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + instance_2 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + + 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::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + it "deserializes the data of total" do + expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer) + end + + it "deserializes the data of start" do + expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer) + end + + it "deserializes the data of _end" do + expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer) + end + + it "deserializes the data of page" do + expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer) + end + + it "deserializes the data of num_pages" do + expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer) + end + + it "deserializes the data of page_size" do + expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer) + end + + it "deserializes the data of next_page_uri" do + expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String) + end + + it "deserializes the data of blobs" do + expect(instance._deserialize("Array", instance.blobs)).to be_a_kind_of(Array) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + instance_1 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + instance_2 = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::BlobListResponse.new( + total: 1, + + start: 1, + + _end: 1, + + page: 1, + + num_pages: 1, + + page_size: 1, + + next_page_uri: "TS", + + blobs: [] + ) + it "returns total in the form of hash" do + expect(instance._to_hash(instance.total)).to eq(instance.total) + end + it "returns start in the form of hash" do + expect(instance._to_hash(instance.start)).to eq(instance.start) + end + it "returns _end in the form of hash" do + expect(instance._to_hash(instance._end)).to eq(instance._end) + end + it "returns page in the form of hash" do + expect(instance._to_hash(instance.page)).to eq(instance.page) + end + it "returns num_pages in the form of hash" do + expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages) + end + it "returns page_size in the form of hash" do + expect(instance._to_hash(instance.page_size)).to eq(instance.page_size) + end + it "returns next_page_uri in the form of hash" do + expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri) + end + it "returns blobs in the form of hash" do + expect(instance._to_hash(instance.blobs)).to eq(instance.blobs) + end + end +end diff --git a/spec/models/blob_result_spec.rb b/spec/models/blob_result_spec.rb new file mode 100644 index 0000000..430af98 --- /dev/null +++ b/spec/models/blob_result_spec.rb @@ -0,0 +1,489 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::BlobResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::BlobResult do + let(:instance) { Freeclimb::BlobResult.new } + + describe "test an instance of BlobResult" do + it "should create an instance of BlobResult" do + expect(instance).to be_instance_of(Freeclimb::BlobResult) + end + end + + describe 'test attribute "blob_id"' do + it "should work" do + instance.blob_id = "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7" + expect(instance.blob_id).to eq("BL88615a9b4ca7e9aad57d9057773fc74268b9caf7") + end + end + + describe 'test attribute "account_id"' do + it "should work" do + instance.account_id = "AC0534faec6b32da45f36166674d65b3903f784141" + expect(instance.account_id).to eq("AC0534faec6b32da45f36166674d65b3903f784141") + end + end + + describe 'test attribute "_alias"' do + it "should assign a value of maxLength" do + instance._alias = "T" * 64 + expect(instance._alias).to eq("T" * 64) + end + it "should not assign a value over maxLength" do + expect { instance._alias = "T" * (64 + 1) }.to raise_error(ArgumentError) + end + end + + describe 'test attribute "revision"' do + it "should work" do + instance.revision = 1 + expect(instance.revision).to eq(1) + end + end + + describe 'test attribute "date_created"' do + it "should work" do + instance.date_created = "2022-07-05T15:17:05Z" + expect(instance.date_created).to eq("2022-07-05T15:17:05Z") + end + end + + describe 'test attribute "date_updated"' do + it "should work" do + instance.date_updated = "2022-07-05T15:17:05Z" + expect(instance.date_updated).to eq("2022-07-05T15:17:05Z") + end + end + + describe 'test attribute "expires_at"' do + it "should work" do + instance.expires_at = "2022-07-05T15:17:05Z" + expect(instance.expires_at).to eq("2022-07-05T15:17:05Z") + end + end + + describe 'test attribute "blob"' do + it "should work" do + testObject = Object.new + instance.blob = testObject + expect(instance.blob).to eq(testObject) + + instance.blob = Object.new + expect(instance.blob).to be_instance_of(Object) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::BlobResult" do + expect { + Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::BlobResult.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_blob = Object.new + + instance_1 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + blob: obj_blob + ) + instance_2 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + blob: obj_blob + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 2, + + blob: Object.new, + + blob: Object.new + ) + instance_2 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf71", + + account_id: "AC0534faec6b32da45f36166674d65b3903f7841411", + + _alias: "ST", + + revision: 1, + + blob: Object.new + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + instance_2 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.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::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + it "deserializes the data of blob_id" do + expect(instance._deserialize("String", instance.blob_id)).to be_a_kind_of(String) + end + + it "deserializes the data of account_id" do + expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String) + end + + it "deserializes the data of _alias" do + expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) + end + + it "deserializes the data of revision" do + expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer) + end + + it "deserializes the data of date_created" do + expect(instance._deserialize("Time", instance.date_created)).to be_a_kind_of(Time) + end + + it "deserializes the data of date_updated" do + expect(instance._deserialize("Time", instance.date_updated)).to be_a_kind_of(Time) + end + + it "deserializes the data of expires_at" do + expect(instance._deserialize("Time", instance.expires_at)).to be_a_kind_of(Time) + end + + it "deserializes the data of blob" do + expect(instance._deserialize("Object", instance.blob)).to be_a_kind_of(Object) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: Object.new + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + obj = Object.new + + instance_1 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: obj + ) + instance_2 = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z", + + blob: obj + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::BlobResult.new( + blob_id: "BL88615a9b4ca7e9aad57d9057773fc74268b9caf7", + + account_id: "AC0534faec6b32da45f36166674d65b3903f784141", + + _alias: "TS", + + revision: 1, + + date_created: "2022-07-05T15:17:05Z", + + date_updated: "2022-07-05T15:17:05Z", + + expires_at: "2022-07-05T15:17:05Z" + ) + it "returns blob_id in the form of hash" do + expect(instance._to_hash(instance.blob_id)).to eq(instance.blob_id) + end + it "returns account_id in the form of hash" do + expect(instance._to_hash(instance.account_id)).to eq(instance.account_id) + end + it "returns _alias in the form of hash" do + expect(instance._to_hash(instance._alias)).to eq(instance._alias) + end + it "returns revision in the form of hash" do + expect(instance._to_hash(instance.revision)).to eq(instance.revision) + end + it "returns date_created in the form of hash" do + expect(instance._to_hash(instance.date_created)).to eq(instance.date_created) + end + it "returns date_updated in the form of hash" do + expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated) + end + it "returns expires_at in the form of hash" do + expect(instance._to_hash(instance.expires_at)).to eq(instance.expires_at) + end + it "returns blob in the form of hash" do + expect(instance._to_hash(instance.blob)).to eq(instance.blob) + end + end +end diff --git a/spec/models/call_result_spec.rb b/spec/models/call_result_spec.rb index 7e84aec..8e234e1 100644 --- a/spec/models/call_result_spec.rb +++ b/spec/models/call_result_spec.rb @@ -404,7 +404,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_subresource_uris = Object.new instance_1 = Freeclimb::CallResult.new( uri: "TS", @@ -443,7 +443,7 @@ answered_by: Freeclimb::AnsweredBy::HUMAN, - subresource_uris: obj_Object, + subresource_uris: obj_subresource_uris, application_id: "TS" ) @@ -484,7 +484,7 @@ answered_by: Freeclimb::AnsweredBy::HUMAN, - subresource_uris: obj_Object, + subresource_uris: obj_subresource_uris, application_id: "TS" ) diff --git a/spec/models/conference_result_spec.rb b/spec/models/conference_result_spec.rb index 3f77865..0f4b4c0 100644 --- a/spec/models/conference_result_spec.rb +++ b/spec/models/conference_result_spec.rb @@ -298,7 +298,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_subresource_uris = Object.new instance_1 = Freeclimb::ConferenceResult.new( uri: "TS", @@ -327,7 +327,7 @@ status_callback_url: "TS", - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) instance_2 = Freeclimb::ConferenceResult.new( uri: "TS", @@ -356,7 +356,7 @@ status_callback_url: "TS", - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/create_blob_request_spec.rb b/spec/models/create_blob_request_spec.rb new file mode 100644 index 0000000..53c01d6 --- /dev/null +++ b/spec/models/create_blob_request_spec.rb @@ -0,0 +1,273 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::CreateBlobRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::CreateBlobRequest do + let(:instance) { Freeclimb::CreateBlobRequest.new } + + describe "test an instance of CreateBlobRequest" do + it "should create an instance of CreateBlobRequest" do + expect(instance).to be_instance_of(Freeclimb::CreateBlobRequest) + end + end + + describe 'test attribute "_alias"' do + it "should assign a value of maxLength" do + instance._alias = "T" * 64 + expect(instance._alias).to eq("T" * 64) + end + it "should not assign a value over maxLength" do + expect { instance._alias = "T" * (64 + 1) }.to raise_error(ArgumentError) + end + end + + describe 'test attribute "expires_at"' do + it "should work" do + instance.expires_at = "TEST_STRING" + expect(instance.expires_at).to eq("TEST_STRING") + end + end + + describe 'test attribute "blob"' do + it "should work" do + testObject = Object.new + instance.blob = testObject + expect(instance.blob).to eq(testObject) + + instance.blob = Object.new + expect(instance.blob).to be_instance_of(Object) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::CreateBlobRequest" do + expect { + Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::CreateBlobRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_blob = Object.new + + instance_1 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: obj_blob + ) + instance_2 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: obj_blob + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new, + + blob: Object.new + ) + instance_2 = Freeclimb::CreateBlobRequest.new( + _alias: "ST", + + expires_at: "ST", + + blob: Object.new + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + instance_2 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.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::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + it "deserializes the data of _alias" do + expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) + end + + it "deserializes the data of expires_at" do + expect(instance._deserialize("String", instance.expires_at)).to be_a_kind_of(String) + end + + it "deserializes the data of blob" do + expect(instance._deserialize("Object", instance.blob)).to be_a_kind_of(Object) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: Object.new + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + obj = Object.new + + instance_1 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: obj + ) + instance_2 = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS", + + blob: obj + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::CreateBlobRequest.new( + _alias: "TS", + + expires_at: "TS" + ) + it "returns _alias in the form of hash" do + expect(instance._to_hash(instance._alias)).to eq(instance._alias) + end + it "returns expires_at in the form of hash" do + expect(instance._to_hash(instance.expires_at)).to eq(instance.expires_at) + end + it "returns blob in the form of hash" do + expect(instance._to_hash(instance.blob)).to eq(instance.blob) + end + end +end diff --git a/spec/models/export_request_spec.rb b/spec/models/export_request_spec.rb index c94a08a..2127aba 100644 --- a/spec/models/export_request_spec.rb +++ b/spec/models/export_request_spec.rb @@ -129,27 +129,27 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_ExportRequestOutput = ExportRequestOutput.new + obj_output = Object.new - obj_Object = Object.new + obj_query = Object.new instance_1 = Freeclimb::ExportRequest.new( resource_type: Freeclimb::ExportResourceType::MESSAGES, format: [], - output: obj_ExportRequestOutput, + output: obj_output, - query: obj_Object + query: obj_query ) instance_2 = Freeclimb::ExportRequest.new( resource_type: Freeclimb::ExportResourceType::MESSAGES, format: [], - output: obj_ExportRequestOutput, + output: obj_output, - query: obj_Object + query: obj_query ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/export_result_spec.rb b/spec/models/export_result_spec.rb index fb771b4..917db5f 100644 --- a/spec/models/export_result_spec.rb +++ b/spec/models/export_result_spec.rb @@ -268,9 +268,9 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_query = Object.new - obj_ExportResultOutput = ExportResultOutput.new + obj_output = Object.new instance_1 = Freeclimb::ExportResult.new( account_id: "TS", @@ -291,11 +291,11 @@ resource_type: Freeclimb::ExportResourceType::MESSAGES, - query: obj_Object, + query: obj_query, format: [], - output: obj_ExportResultOutput + output: obj_output ) instance_2 = Freeclimb::ExportResult.new( account_id: "TS", @@ -316,11 +316,11 @@ resource_type: Freeclimb::ExportResourceType::MESSAGES, - query: obj_Object, + query: obj_query, format: [], - output: obj_ExportResultOutput + output: obj_output ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/incoming_number_result_spec.rb b/spec/models/incoming_number_result_spec.rb index d449084..8f8f5de 100644 --- a/spec/models/incoming_number_result_spec.rb +++ b/spec/models/incoming_number_result_spec.rb @@ -116,20 +116,6 @@ end end - describe 'test attribute "voice_enabled"' do - it "should work" do - instance.voice_enabled = false - expect(instance.voice_enabled).to eq(false) - end - end - - describe 'test attribute "sms_enabled"' do - it "should work" do - instance.sms_enabled = false - expect(instance.sms_enabled).to eq(false) - end - end - describe 'test attribute "offnet"' do it "should work" do instance.offnet = false @@ -174,10 +160,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -213,10 +195,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new, @@ -254,10 +232,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new, @@ -297,10 +271,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -317,9 +287,9 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Capabilities = Capabilities.new + obj_capabilities = Object.new - obj_TFN = TFN.new + obj_tfn = Object.new instance_1 = Freeclimb::IncomingNumberResult.new( uri: "TS", @@ -330,7 +300,7 @@ revision: 1, - capabilities: obj_Capabilities, + capabilities: obj_capabilities, campaign_id: "TS", @@ -348,13 +318,9 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, - tfn: obj_TFN + tfn: obj_tfn ) instance_2 = Freeclimb::IncomingNumberResult.new( uri: "TS", @@ -365,7 +331,7 @@ revision: 1, - capabilities: obj_Capabilities, + capabilities: obj_capabilities, campaign_id: "TS", @@ -383,13 +349,9 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, - tfn: obj_TFN + tfn: obj_tfn ) expect(instance_1.eql?(instance_2)).to eq(true) end @@ -422,10 +384,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -457,10 +415,6 @@ country: "ST", - voice_enabled: false, - - sms_enabled: false, - offnet: false, tfn: TFN.new @@ -498,10 +452,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -539,10 +489,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -574,10 +520,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -615,10 +557,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -675,14 +613,6 @@ expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String) end - it "deserializes the data of voice_enabled" do - expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass) - end - - it "deserializes the data of sms_enabled" do - expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass) - end - it "deserializes the data of offnet" do expect(instance._deserialize("Boolean", instance.offnet)).to be_a_kind_of(TrueClass) end @@ -721,10 +651,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -762,10 +688,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: TFN.new @@ -804,10 +726,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: obj @@ -839,10 +757,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true, tfn: obj @@ -877,10 +791,6 @@ country: "TS", - voice_enabled: true, - - sms_enabled: true, - offnet: true ) it "returns uri in the form of hash" do @@ -922,12 +832,6 @@ it "returns country in the form of hash" do expect(instance._to_hash(instance.country)).to eq(instance.country) end - it "returns voice_enabled in the form of hash" do - expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled) - end - it "returns sms_enabled in the form of hash" do - expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled) - end it "returns offnet in the form of hash" do expect(instance._to_hash(instance.offnet)).to eq(instance.offnet) end diff --git a/spec/models/log_result_spec.rb b/spec/models/log_result_spec.rb index 333ded0..a49dba8 100644 --- a/spec/models/log_result_spec.rb +++ b/spec/models/log_result_spec.rb @@ -178,7 +178,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_metadata = Object.new instance_1 = Freeclimb::LogResult.new( timestamp: 1, @@ -193,7 +193,7 @@ message: "TS", - metadata: obj_Object + metadata: obj_metadata ) instance_2 = Freeclimb::LogResult.new( timestamp: 1, @@ -208,7 +208,7 @@ message: "TS", - metadata: obj_Object + metadata: obj_metadata ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/message_result_spec.rb b/spec/models/message_result_spec.rb index 58dbebd..0b49eee 100644 --- a/spec/models/message_result_spec.rb +++ b/spec/models/message_result_spec.rb @@ -380,7 +380,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_TFN = TFN.new + obj_tfn = Object.new instance_1 = Freeclimb::MessageResult.new( uri: "TS", @@ -413,7 +413,7 @@ media_urls: [], - tfn: obj_TFN, + tfn: obj_tfn, phone_number_id: "TS", @@ -450,7 +450,7 @@ media_urls: [], - tfn: obj_TFN, + tfn: obj_tfn, phone_number_id: "TS", diff --git a/spec/models/modify_blob_request_spec.rb b/spec/models/modify_blob_request_spec.rb new file mode 100644 index 0000000..bbd09b3 --- /dev/null +++ b/spec/models/modify_blob_request_spec.rb @@ -0,0 +1,226 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::ModifyBlobRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::ModifyBlobRequest do + let(:instance) { Freeclimb::ModifyBlobRequest.new } + + describe "test an instance of ModifyBlobRequest" do + it "should create an instance of ModifyBlobRequest" do + expect(instance).to be_instance_of(Freeclimb::ModifyBlobRequest) + end + end + + describe 'test attribute "blob"' do + it "should work" do + testObject = Object.new + instance.blob = testObject + expect(instance.blob).to eq(testObject) + + instance.blob = Object.new + expect(instance.blob).to be_instance_of(Object) + end + end + + describe 'test attribute "_alias"' do + it "should assign a value of maxLength" do + instance._alias = "T" * 64 + expect(instance._alias).to eq("T" * 64) + end + it "should not assign a value over maxLength" do + expect { instance._alias = "T" * (64 + 1) }.to raise_error(ArgumentError) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::ModifyBlobRequest" do + expect { + Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS", + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ModifyBlobRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_blob = Object.new + + instance_1 = Freeclimb::ModifyBlobRequest.new( + blob: obj_blob, + + _alias: "TS" + ) + instance_2 = Freeclimb::ModifyBlobRequest.new( + blob: obj_blob, + + _alias: "TS" + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + blob: Object.new, + + _alias: "TS" + ) + instance_2 = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "ST" + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + instance_2 = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + + expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash)) + end + end + + describe 'test method "_deserialize"' do + instance = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + + it "deserializes the data of blob" do + expect(instance._deserialize("Object", instance.blob)).to be_a_kind_of(Object) + end + + it "deserializes the data of _alias" do + expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::ModifyBlobRequest.new( + blob: Object.new, + + _alias: "TS" + ) + 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::ModifyBlobRequest.new( + blob: obj, + + _alias: "TS" + ) + instance_2 = Freeclimb::ModifyBlobRequest.new( + blob: obj, + + _alias: "TS" + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::ModifyBlobRequest.new( + _alias: "TS" + ) + it "returns blob in the form of hash" do + expect(instance._to_hash(instance.blob)).to eq(instance.blob) + end + it "returns _alias in the form of hash" do + expect(instance._to_hash(instance._alias)).to eq(instance._alias) + end + end +end diff --git a/spec/models/platform_error_spec.rb b/spec/models/platform_error_spec.rb new file mode 100644 index 0000000..bc3d9d5 --- /dev/null +++ b/spec/models/platform_error_spec.rb @@ -0,0 +1,318 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::PlatformError +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::PlatformError do + let(:instance) { Freeclimb::PlatformError.new } + + describe "test an instance of PlatformError" do + it "should create an instance of PlatformError" do + expect(instance).to be_instance_of(Freeclimb::PlatformError) + end + end + + describe 'test attribute "code"' do + it "should work" do + instance.code = 1 + expect(instance.code).to eq(1) + end + end + + describe 'test attribute "call"' do + it "should work" do + instance.call = "TEST_STRING" + expect(instance.call).to eq("TEST_STRING") + end + end + + describe 'test attribute "url"' do + it "should work" do + instance.url = "TEST_STRING" + expect(instance.url).to eq("TEST_STRING") + end + end + + describe 'test attribute "details"' do + it "should work" do + testObject = Object.new + instance.details = testObject + expect(instance.details).to eq(testObject) + + instance.details = Object.new + expect(instance.details).to be_instance_of(Object) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::PlatformError" do + expect { + Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::PlatformError.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_details = Object.new + + instance_1 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: obj_details + ) + instance_2 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: obj_details + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::PlatformError.new( + code: 2, + + call: "TS", + + url: "TS", + + details: Object.new, + + details: Object.new + ) + instance_2 = Freeclimb::PlatformError.new( + code: 1, + + call: "ST", + + url: "ST", + + details: Object.new + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + instance_2 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.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::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + it "deserializes the data of code" do + expect(instance._deserialize("Integer", instance.code)).to be_a_kind_of(Integer) + end + + it "deserializes the data of call" do + expect(instance._deserialize("String", instance.call)).to be_a_kind_of(String) + end + + it "deserializes the data of url" do + expect(instance._deserialize("String", instance.url)).to be_a_kind_of(String) + end + + it "deserializes the data of details" do + expect(instance._deserialize("Object", instance.details)).to be_a_kind_of(Object) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: Object.new + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + obj = Object.new + + instance_1 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: obj + ) + instance_2 = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS", + + details: obj + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::PlatformError.new( + code: 1, + + call: "TS", + + url: "TS" + ) + it "returns code in the form of hash" do + expect(instance._to_hash(instance.code)).to eq(instance.code) + end + it "returns call in the form of hash" do + expect(instance._to_hash(instance.call)).to eq(instance.call) + end + it "returns url in the form of hash" do + expect(instance._to_hash(instance.url)).to eq(instance.url) + end + it "returns details in the form of hash" do + expect(instance._to_hash(instance.details)).to eq(instance.details) + end + end +end diff --git a/spec/models/queue_result_spec.rb b/spec/models/queue_result_spec.rb index cb7d83b..380ea35 100644 --- a/spec/models/queue_result_spec.rb +++ b/spec/models/queue_result_spec.rb @@ -231,7 +231,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_Object = Object.new + obj_subresource_uris = Object.new instance_1 = Freeclimb::QueueResult.new( uri: "TS", @@ -254,7 +254,7 @@ average_queue_removal_time: 1, - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) instance_2 = Freeclimb::QueueResult.new( uri: "TS", @@ -277,7 +277,7 @@ average_queue_removal_time: 1, - subresource_uris: obj_Object + subresource_uris: obj_subresource_uris ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/replace_blob_request_spec.rb b/spec/models/replace_blob_request_spec.rb new file mode 100644 index 0000000..580604a --- /dev/null +++ b/spec/models/replace_blob_request_spec.rb @@ -0,0 +1,176 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::ReplaceBlobRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::ReplaceBlobRequest do + let(:instance) { Freeclimb::ReplaceBlobRequest.new } + + describe "test an instance of ReplaceBlobRequest" do + it "should create an instance of ReplaceBlobRequest" do + expect(instance).to be_instance_of(Freeclimb::ReplaceBlobRequest) + end + end + + describe 'test attribute "blob"' do + it "should work" do + testObject = Object.new + instance.blob = testObject + expect(instance.blob).to eq(testObject) + + instance.blob = Object.new + expect(instance.blob).to be_instance_of(Object) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::ReplaceBlobRequest" do + expect { + Freeclimb::ReplaceBlobRequest.new( + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::ReplaceBlobRequest.new( + blob: Object.new, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::ReplaceBlobRequest.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + obj_blob = Object.new + + instance_1 = Freeclimb::ReplaceBlobRequest.new( + blob: obj_blob + ) + instance_2 = Freeclimb::ReplaceBlobRequest.new( + blob: obj_blob + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new, + + blob: Object.new + ) + instance_2 = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + instance_2 = Freeclimb::ReplaceBlobRequest.new( + blob: Object.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::ReplaceBlobRequest.new( + blob: Object.new + ) + + it "deserializes the data of blob" do + expect(instance._deserialize("Object", instance.blob)).to be_a_kind_of(Object) + end + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::ReplaceBlobRequest.new( + blob: Object.new + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + obj = Object.new + + instance_1 = Freeclimb::ReplaceBlobRequest.new( + blob: obj + ) + instance_2 = Freeclimb::ReplaceBlobRequest.new( + blob: obj + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::ReplaceBlobRequest.new + + it "returns blob in the form of hash" do + expect(instance._to_hash(instance.blob)).to eq(instance.blob) + end + end +end diff --git a/spec/models/say_spec.rb b/spec/models/say_spec.rb index d6811c4..0dc5c56 100644 --- a/spec/models/say_spec.rb +++ b/spec/models/say_spec.rb @@ -39,6 +39,13 @@ end end + describe 'test attribute "engine"' do + it "should work" do + instance.engine = TTSEngine.new + expect(instance.engine).to be_instance_of(TTSEngine) + end + end + describe 'test attribute "loop"' do it "should work" do instance.loop = 1 @@ -61,6 +68,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -74,6 +83,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true, @@ -89,6 +100,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true, @@ -106,6 +119,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -122,11 +137,15 @@ describe 'test method "eql?"' do it "checks if objects are equal" do + obj_engine = Object.new + instance_1 = Freeclimb::Say.new( text: "TS", language: "TS", + engine: obj_engine, + loop: 1, privacy_mode: true @@ -136,6 +155,8 @@ language: "TS", + engine: obj_engine, + loop: 1, privacy_mode: true @@ -149,6 +170,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 2, privacy_mode: true @@ -158,6 +181,8 @@ language: "ST", + engine: TTSEngine.new, + loop: 1, privacy_mode: false @@ -173,6 +198,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -188,6 +215,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -197,6 +226,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -212,6 +243,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -224,6 +257,10 @@ expect(instance._deserialize("String", instance.language)).to be_a_kind_of(String) end + it "deserializes the data of engine" do + expect(instance._deserialize("Object", instance.engine)).to be_a_kind_of(TTSEngine) + end + it "deserializes the data of loop" do expect(instance._deserialize("Integer", instance.loop)).to be_a_kind_of(Integer) end @@ -240,6 +277,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -255,6 +294,8 @@ language: "TS", + engine: TTSEngine.new, + loop: 1, privacy_mode: true @@ -262,11 +303,15 @@ expect(instance.to_hash).to be_a_kind_of(Hash) end it "creates equal hash for two equal objects" do + obj = TTSEngine.new + instance_1 = Freeclimb::Say.new( text: "TS", language: "TS", + engine: obj, + loop: 1, privacy_mode: true @@ -276,6 +321,8 @@ language: "TS", + engine: obj, + loop: 1, privacy_mode: true @@ -300,6 +347,9 @@ it "returns language in the form of hash" do expect(instance._to_hash(instance.language)).to eq(instance.language) end + it "returns engine in the form of hash" do + expect(instance._to_hash(instance.engine)).to eq(instance.engine) + end it "returns loop in the form of hash" do expect(instance._to_hash(instance.loop)).to eq(instance.loop) end diff --git a/spec/models/sms_ten_dlc_partner_campaign_spec.rb b/spec/models/sms_ten_dlc_partner_campaign_spec.rb index 1807925..51d6cad 100644 --- a/spec/models/sms_ten_dlc_partner_campaign_spec.rb +++ b/spec/models/sms_ten_dlc_partner_campaign_spec.rb @@ -545,7 +545,7 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_SMSTenDLCPartnerCampaignBrand = SMSTenDLCPartnerCampaignBrand.new + obj_brand = Object.new instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", @@ -602,7 +602,7 @@ optout_message: "TS", - brand: obj_SMSTenDLCPartnerCampaignBrand + brand: obj_brand ) instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new( account_id: "TS", @@ -659,7 +659,7 @@ optout_message: "TS", - brand: obj_SMSTenDLCPartnerCampaignBrand + brand: obj_brand ) expect(instance_1.eql?(instance_2)).to eq(true) end diff --git a/spec/models/transcribe_utterance_spec.rb b/spec/models/transcribe_utterance_spec.rb index c756eb2..aa8a7d2 100644 --- a/spec/models/transcribe_utterance_spec.rb +++ b/spec/models/transcribe_utterance_spec.rb @@ -152,14 +152,14 @@ describe 'test method "eql?"' do it "checks if objects are equal" do - obj_TranscribeUtteranceRecord = TranscribeUtteranceRecord.new + obj_record = Object.new instance_1 = Freeclimb::TranscribeUtterance.new( action_url: "TS", play_beep: true, - record: obj_TranscribeUtteranceRecord, + record: obj_record, privacy_for_logging: true, @@ -172,7 +172,7 @@ play_beep: true, - record: obj_TranscribeUtteranceRecord, + record: obj_record, privacy_for_logging: true, diff --git a/spec/models/tts_engine_name_spec.rb b/spec/models/tts_engine_name_spec.rb new file mode 100644 index 0000000..2885582 --- /dev/null +++ b/spec/models/tts_engine_name_spec.rb @@ -0,0 +1,75 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::TTSEngineName +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::TTSEngineName do + let(:instance) { Freeclimb::TTSEngineName.new } + + describe "test an instance of TTSEngineName" do + it "should create an instance of TTSEngineName" do + expect(instance).to be_instance_of(Freeclimb::TTSEngineName) + end + end + + describe 'test attribute "FREECLIMB_STANDARD"' do + it "should work" do + expect { Freeclimb::TTSEngineName::FREECLIMB_STANDARD = "freeclimb.standard" }.not_to raise_error + end + it "should serialize to enum" do + expectedValue = Freeclimb::TTSEngineName::FREECLIMB_STANDARD + calculatedValue = Freeclimb::TTSEngineName.build_from_hash("freeclimb.standard") + expect(expectedValue).to eq(calculatedValue) + end + it "should deserialize to string" do + expectedValue = "freeclimb.standard" + calculatedValue = Freeclimb::TTSEngineName::FREECLIMB_STANDARD + expect(expectedValue).to eq(calculatedValue) + end + end + + describe 'test attribute "FREECLIMB_NEURAL"' do + it "should work" do + expect { Freeclimb::TTSEngineName::FREECLIMB_NEURAL = "freeclimb.neural" }.not_to raise_error + end + it "should serialize to enum" do + expectedValue = Freeclimb::TTSEngineName::FREECLIMB_NEURAL + calculatedValue = Freeclimb::TTSEngineName.build_from_hash("freeclimb.neural") + expect(expectedValue).to eq(calculatedValue) + end + it "should deserialize to string" do + expectedValue = "freeclimb.neural" + calculatedValue = Freeclimb::TTSEngineName::FREECLIMB_NEURAL + expect(expectedValue).to eq(calculatedValue) + end + end + + describe 'test attribute "ELEVEN_LABS"' do + it "should work" do + expect { Freeclimb::TTSEngineName::ELEVEN_LABS = "ElevenLabs" }.not_to raise_error + end + it "should serialize to enum" do + expectedValue = Freeclimb::TTSEngineName::ELEVEN_LABS + calculatedValue = Freeclimb::TTSEngineName.build_from_hash("ElevenLabs") + expect(expectedValue).to eq(calculatedValue) + end + it "should deserialize to string" do + expectedValue = "ElevenLabs" + calculatedValue = Freeclimb::TTSEngineName::ELEVEN_LABS + expect(expectedValue).to eq(calculatedValue) + end + end +end diff --git a/spec/models/tts_engine_spec.rb b/spec/models/tts_engine_spec.rb new file mode 100644 index 0000000..7909cfe --- /dev/null +++ b/spec/models/tts_engine_spec.rb @@ -0,0 +1,183 @@ +# #FreeClimb API +# +# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. +# +# The version of the OpenAPI document: 1.0.0 +# Contact: support@freeclimb.com +# Generated by: https://openapi-generator.tech +# OpenAPI Generator version: 7.9.0 +# + +require "spec_helper" +require "json" +require "date" +include Freeclimb + +# Unit tests for Freeclimb::TTSEngine +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Freeclimb::TTSEngine do + let(:instance) { Freeclimb::TTSEngine.new } + + describe "test an instance of TTSEngine" do + it "should create an instance of TTSEngine" do + expect(instance).to be_instance_of(Freeclimb::TTSEngine) + end + end + + describe 'test attribute "name"' do + it "assigns value FREECLIMB_STANDARD" do + instance.name = Freeclimb::TTSEngineName::FREECLIMB_STANDARD + expect(instance.name).to eq(Freeclimb::TTSEngineName::FREECLIMB_STANDARD) + end + it "assigns value FREECLIMB_NEURAL" do + instance.name = Freeclimb::TTSEngineName::FREECLIMB_NEURAL + expect(instance.name).to eq(Freeclimb::TTSEngineName::FREECLIMB_NEURAL) + end + it "assigns value ELEVEN_LABS" do + instance.name = Freeclimb::TTSEngineName::ELEVEN_LABS + expect(instance.name).to eq(Freeclimb::TTSEngineName::ELEVEN_LABS) + end + end + describe 'test attribute "parameters"' do + it "should work" do + testObject = Object.new + instance.parameters = testObject + expect(instance.parameters).to eq(testObject) + end + end + + describe 'test method "initialize"' do + it "properly initializes with values" do + expect { + Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + }.not_to raise_error + end + it "fails to initialize with input argument that is not a hash in Freeclimb::TTSEngine" do + expect { + Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + it "fails to initialize with invalid attribute" do + expect { + Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD, + + invalid_attribute: true + ) + }.to raise_error(ArgumentError) + end + end + + describe 'test method "valid"' do + it "checks if properties are valid" do + instance = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance.valid?).to eq(true) + end + + skip "checks if properties are invalid" do + instance = Freeclimb::TTSEngine.new + + expect(instance.valid?).to eq(false) + end + end + + describe 'test method "eql?"' do + it "checks if objects are equal" do + instance_1 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + instance_2 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance_1.eql?(instance_2)).to eq(true) + end + + it "checks if objects are not equal" do + instance_1 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD, + + parameters: Object.new + ) + instance_2 = Freeclimb::TTSEngine.new( + name: nil + ) + expect(instance_1.eql?(instance_2)).to eq(false) + end + end + + describe 'test method "hash"' do + it "calculates hash code" do + instance = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance.hash).to be_a_kind_of(Integer) + end + end + + describe 'test method "build_from_hash"' do + it "builds equivalent model from hash code" do + instance_1 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + instance_2 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + + 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 + Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + end + + describe 'test method "to_s"' do + it "returns the string representation of the object" do + instance = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance.to_s).to eq(instance.to_hash.to_s) + end + end + + describe 'test method "to_hash"' do + it "returns the object in the form of hash" do + instance = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance.to_hash).to be_a_kind_of(Hash) + end + it "creates equal hash for two equal objects" do + instance_1 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + instance_2 = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + expect(instance_1.to_hash).to eq(instance_2.to_hash) + end + end + + describe 'test method "_to_hash"' do + instance = Freeclimb::TTSEngine.new( + name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD + ) + it "returns name in the form of hash" do + expect(instance._to_hash(instance.name)).to eq(instance.name) + end + it "returns parameters in the form of hash" do + expect(instance._to_hash(instance.parameters)).to eq(instance.parameters) + end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7aa7cb2..9c79633 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -119,7 +119,7 @@ Freeclimb.configure do |config| # Configure HTTP basic authorization: fc - config.username = "TEST_ACCOUNT_ID" + config.username = "AC0123456789abcdefABCDEF0123456789abcdef00" config.password = "TEST_API_KEY" end