freeclimb 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +18 -4
  5. data/docs/AvailableNumber.md +0 -4
  6. data/docs/BlobListResponse.md +32 -0
  7. data/docs/BlobResult.md +32 -0
  8. data/docs/CreateBlobRequest.md +22 -0
  9. data/docs/DefaultApi.md +449 -6
  10. data/docs/IncomingNumberResult.md +0 -4
  11. data/docs/ModifyBlobRequest.md +20 -0
  12. data/docs/PlatformError.md +24 -0
  13. data/docs/ReplaceBlobRequest.md +18 -0
  14. data/docs/Say.md +2 -0
  15. data/docs/TTSEngine.md +20 -0
  16. data/docs/TTSEngineName.md +18 -0
  17. data/lib/freeclimb/api/default_api.rb +715 -8
  18. data/lib/freeclimb/models/available_number.rb +1 -23
  19. data/lib/freeclimb/models/blob_list_response.rb +303 -0
  20. data/lib/freeclimb/models/blob_result.rb +332 -0
  21. data/lib/freeclimb/models/create_blob_request.rb +255 -0
  22. data/lib/freeclimb/models/incoming_number_result.rb +1 -23
  23. data/lib/freeclimb/models/modify_blob_request.rb +245 -0
  24. data/lib/freeclimb/models/platform_error.rb +244 -0
  25. data/lib/freeclimb/models/replace_blob_request.rb +221 -0
  26. data/lib/freeclimb/models/say.rb +10 -1
  27. data/lib/freeclimb/models/tts_engine.rb +250 -0
  28. data/lib/freeclimb/models/tts_engine_name.rb +36 -0
  29. data/lib/freeclimb/version.rb +1 -1
  30. data/lib/freeclimb.rb +8 -0
  31. data/openapi.json +894 -97
  32. data/spec/api/default_api_spec.rb +188 -32
  33. data/spec/models/account_result_spec.rb +3 -3
  34. data/spec/models/available_number_spec.rb +3 -98
  35. data/spec/models/blob_list_response_spec.rb +502 -0
  36. data/spec/models/blob_result_spec.rb +489 -0
  37. data/spec/models/call_result_spec.rb +3 -3
  38. data/spec/models/conference_result_spec.rb +3 -3
  39. data/spec/models/create_blob_request_spec.rb +273 -0
  40. data/spec/models/export_request_spec.rb +6 -6
  41. data/spec/models/export_result_spec.rb +6 -6
  42. data/spec/models/incoming_number_result_spec.rb +6 -102
  43. data/spec/models/log_result_spec.rb +3 -3
  44. data/spec/models/message_result_spec.rb +3 -3
  45. data/spec/models/modify_blob_request_spec.rb +226 -0
  46. data/spec/models/platform_error_spec.rb +318 -0
  47. data/spec/models/queue_result_spec.rb +3 -3
  48. data/spec/models/replace_blob_request_spec.rb +176 -0
  49. data/spec/models/say_spec.rb +50 -0
  50. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +3 -3
  51. data/spec/models/transcribe_utterance_spec.rb +3 -3
  52. data/spec/models/tts_engine_name_spec.rb +75 -0
  53. data/spec/models/tts_engine_spec.rb +183 -0
  54. data/spec/spec_helper.rb +1 -1
  55. metadata +26 -2
@@ -0,0 +1,250 @@
1
+ # #FreeClimb API
2
+ #
3
+ # FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0
6
+ # Contact: support@freeclimb.com
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 7.9.0
9
+ #
10
+
11
+ require "date"
12
+ require "time"
13
+
14
+ module Freeclimb
15
+ class TTSEngine
16
+ attr_accessor :name
17
+
18
+ # Parameters for the TTS engine. The parameters are specific to the engine and are documented in the engine's documentation.
19
+ attr_accessor :parameters
20
+
21
+ class EnumAttributeValidator
22
+ attr_reader :datatype
23
+ attr_reader :allowable_values
24
+
25
+ def initialize(datatype, allowable_values)
26
+ @allowable_values = allowable_values.map do |value|
27
+ case datatype.to_s
28
+ when /Integer/i
29
+ value.to_i
30
+ when /Float/i
31
+ value.to_f
32
+ else
33
+ value
34
+ end
35
+ end
36
+ end
37
+
38
+ def valid?(value)
39
+ !value || allowable_values.include?(value)
40
+ end
41
+ end
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ name: :name,
47
+ parameters: :parameters
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ name: :TTSEngineName,
60
+ parameters: :"Hash<String, Object>"
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if !attributes.is_a?(Hash)
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TTSEngine` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if !self.class.attribute_map.key?(k.to_sym)
79
+ 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
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:name)
85
+ self.name = attributes[:name]
86
+ end
87
+
88
+ if attributes.key?(:parameters)
89
+ if (value = attributes[:parameters]).is_a?(Hash)
90
+ self.parameters = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ []
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ if @name.nil?
105
+ false
106
+ else
107
+ list_invalid_properties.length == 0
108
+ end
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(other)
114
+ return true if equal?(other)
115
+ self.class == other.class &&
116
+ name == other.name &&
117
+ parameters == other.parameters
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(other)
123
+ self == other
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [name, parameters].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ new.build_from_hash(attributes)
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ send(:"#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = Freeclimb.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+ end
250
+ end
@@ -0,0 +1,36 @@
1
+ # #FreeClimb API
2
+ #
3
+ # FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0
6
+ # Contact: support@freeclimb.com
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 7.9.0
9
+ #
10
+
11
+ require "date"
12
+ require "time"
13
+
14
+ module Freeclimb
15
+ class TTSEngineName
16
+ FREECLIMB_STANDARD = "freeclimb.standard".freeze
17
+ FREECLIMB_NEURAL = "freeclimb.neural".freeze
18
+ ELEVEN_LABS = "ElevenLabs".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = TTSEngineName.constants.select { |c| TTSEngineName.const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #TTSEngineName" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -9,5 +9,5 @@
9
9
  #
10
10
 
11
11
  module Freeclimb
12
- VERSION = "5.3.0"
12
+ VERSION = "5.4.0"
13
13
  end
data/lib/freeclimb.rb CHANGED
@@ -26,6 +26,8 @@ require "freeclimb/models/application_result"
26
26
  require "freeclimb/models/available_number"
27
27
  require "freeclimb/models/available_number_list"
28
28
  require "freeclimb/models/barge_in_reason"
29
+ require "freeclimb/models/blob_list_response"
30
+ require "freeclimb/models/blob_result"
29
31
  require "freeclimb/models/buy_incoming_number_request"
30
32
  require "freeclimb/models/call_direction"
31
33
  require "freeclimb/models/call_ended_reason"
@@ -41,6 +43,7 @@ require "freeclimb/models/conference_participant_list"
41
43
  require "freeclimb/models/conference_participant_result"
42
44
  require "freeclimb/models/conference_result"
43
45
  require "freeclimb/models/conference_status"
46
+ require "freeclimb/models/create_blob_request"
44
47
  require "freeclimb/models/create_conference_request"
45
48
  require "freeclimb/models/create_web_rtc_token"
46
49
  require "freeclimb/models/export_list"
@@ -71,10 +74,12 @@ require "freeclimb/models/message_request"
71
74
  require "freeclimb/models/message_result"
72
75
  require "freeclimb/models/message_status"
73
76
  require "freeclimb/models/messages_list"
77
+ require "freeclimb/models/modify_blob_request"
74
78
  require "freeclimb/models/mutable_resource_model"
75
79
  require "freeclimb/models/pagination_model"
76
80
  require "freeclimb/models/percl_command"
77
81
  require "freeclimb/models/percl_script"
82
+ require "freeclimb/models/platform_error"
78
83
  require "freeclimb/models/play_beep"
79
84
  require "freeclimb/models/queue_list"
80
85
  require "freeclimb/models/queue_member"
@@ -85,6 +90,7 @@ require "freeclimb/models/queue_result_status"
85
90
  require "freeclimb/models/record_utterance_term_reason"
86
91
  require "freeclimb/models/recording_list"
87
92
  require "freeclimb/models/recording_result"
93
+ require "freeclimb/models/replace_blob_request"
88
94
  require "freeclimb/models/request_type"
89
95
  require "freeclimb/models/sms_ten_dlc_brand"
90
96
  require "freeclimb/models/sms_ten_dlc_brand_alt_business_id_type"
@@ -105,6 +111,8 @@ require "freeclimb/models/sms_toll_free_campaign_registration_status"
105
111
  require "freeclimb/models/sms_toll_free_campaigns_list_result"
106
112
  require "freeclimb/models/tfn"
107
113
  require "freeclimb/models/tfn_campaign"
114
+ require "freeclimb/models/tts_engine"
115
+ require "freeclimb/models/tts_engine_name"
108
116
  require "freeclimb/models/transcribe_reason"
109
117
  require "freeclimb/models/transcribe_term_reason"
110
118
  require "freeclimb/models/transcribe_utterance_record"