freeclimb 5.2.0 → 5.3.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -1
  3. data/Gemfile.lock +3 -3
  4. data/README.md +17 -4
  5. data/docs/CallResult.md +2 -2
  6. data/docs/CreateConference.md +4 -2
  7. data/docs/DefaultApi.md +368 -1
  8. data/docs/ExportList.md +32 -0
  9. data/docs/ExportOutputType.md +16 -0
  10. data/docs/ExportRequest.md +24 -0
  11. data/docs/ExportRequestOutput.md +18 -0
  12. data/docs/ExportResourceType.md +17 -0
  13. data/docs/ExportResult.md +40 -0
  14. data/docs/ExportResultOutput.md +18 -0
  15. data/docs/ExportStatus.md +21 -0
  16. data/lib/freeclimb/api/default_api.rb +313 -0
  17. data/lib/freeclimb/models/call_result.rb +8 -8
  18. data/lib/freeclimb/models/create_conference.rb +15 -5
  19. data/lib/freeclimb/models/export_list.rb +304 -0
  20. data/lib/freeclimb/models/export_output_type.rb +34 -0
  21. data/lib/freeclimb/models/export_request.rb +276 -0
  22. data/lib/freeclimb/models/export_request_output.rb +243 -0
  23. data/lib/freeclimb/models/export_resource_type.rb +35 -0
  24. data/lib/freeclimb/models/export_result.rb +405 -0
  25. data/lib/freeclimb/models/export_result_output.rb +243 -0
  26. data/lib/freeclimb/models/export_status.rb +39 -0
  27. data/lib/freeclimb/version.rb +1 -1
  28. data/lib/freeclimb.rb +8 -0
  29. data/openapi.json +370 -2
  30. data/spec/api/default_api_spec.rb +141 -2
  31. data/spec/models/call_result_spec.rb +36 -36
  32. data/spec/models/create_conference_spec.rb +83 -35
  33. data/spec/models/export_list_spec.rb +502 -0
  34. data/spec/models/export_output_type_spec.rb +43 -0
  35. data/spec/models/export_request_output_spec.rb +162 -0
  36. data/spec/models/export_request_spec.rb +320 -0
  37. data/spec/models/export_resource_type_spec.rb +59 -0
  38. data/spec/models/export_result_output_spec.rb +162 -0
  39. data/spec/models/export_result_spec.rb +718 -0
  40. data/spec/models/export_status_spec.rb +123 -0
  41. data/yarn.lock +29 -29
  42. metadata +26 -2
@@ -0,0 +1,304 @@
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 ExportList
16
+ # Total amount of requested resource.
17
+ attr_accessor :total
18
+
19
+ # Resource index at start of current page
20
+ attr_accessor :start
21
+
22
+ # Resource index at end of current page
23
+ attr_accessor :_end
24
+
25
+ # Current page
26
+ attr_accessor :page
27
+
28
+ # Total number of pages
29
+ attr_accessor :num_pages
30
+
31
+ # Number of items per page
32
+ attr_accessor :page_size
33
+
34
+ # Uri to retrieve the next page of items
35
+ attr_accessor :next_page_uri
36
+
37
+ attr_accessor :exports
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ total: :total,
43
+ start: :start,
44
+ _end: :end,
45
+ page: :page,
46
+ num_pages: :numPages,
47
+ page_size: :pageSize,
48
+ next_page_uri: :nextPageUri,
49
+ exports: :exports
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ total: :Integer,
62
+ start: :Integer,
63
+ _end: :Integer,
64
+ page: :Integer,
65
+ num_pages: :Integer,
66
+ page_size: :Integer,
67
+ next_page_uri: :String,
68
+ exports: :"Array<ExportResult>"
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ :total,
76
+ :start,
77
+ :_end,
78
+ :page,
79
+ :num_pages,
80
+ :page_size,
81
+ :next_page_uri,
82
+ :exports
83
+ ])
84
+ end
85
+
86
+ # List of class defined in allOf (OpenAPI v3)
87
+ def self.openapi_all_of
88
+ [
89
+ :PaginationModel
90
+ ]
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if !attributes.is_a?(Hash)
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ExportList` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if !self.class.attribute_map.key?(k.to_sym)
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ExportList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:total)
109
+ self.total = attributes[:total]
110
+ end
111
+
112
+ if attributes.key?(:start)
113
+ self.start = attributes[:start]
114
+ end
115
+
116
+ if attributes.key?(:_end)
117
+ self._end = attributes[:_end]
118
+ end
119
+
120
+ if attributes.key?(:page)
121
+ self.page = attributes[:page]
122
+ end
123
+
124
+ if attributes.key?(:num_pages)
125
+ self.num_pages = attributes[:num_pages]
126
+ end
127
+
128
+ if attributes.key?(:page_size)
129
+ self.page_size = attributes[:page_size]
130
+ end
131
+
132
+ if attributes.key?(:next_page_uri)
133
+ self.next_page_uri = attributes[:next_page_uri]
134
+ end
135
+
136
+ if attributes.key?(:exports)
137
+ if (value = attributes[:exports]).is_a?(Array)
138
+ self.exports = value
139
+ end
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ []
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ if @total.nil?
153
+ false
154
+ else
155
+ list_invalid_properties.length == 0
156
+ end
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(other)
162
+ return true if equal?(other)
163
+ self.class == other.class &&
164
+ total == other.total &&
165
+ start == other.start &&
166
+ _end == other._end &&
167
+ page == other.page &&
168
+ num_pages == other.num_pages &&
169
+ page_size == other.page_size &&
170
+ next_page_uri == other.next_page_uri &&
171
+ exports == other.exports
172
+ end
173
+
174
+ # @see the `==` method
175
+ # @param [Object] Object to be compared
176
+ def eql?(other)
177
+ self == other
178
+ end
179
+
180
+ # Calculates hash code according to all attributes.
181
+ # @return [Integer] Hash code
182
+ def hash
183
+ [total, start, _end, page, num_pages, page_size, next_page_uri, exports].hash
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def self.build_from_hash(attributes)
190
+ new.build_from_hash(attributes)
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ self.class.openapi_types.each_pair do |key, type|
199
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
200
+ send(:"#{key}=", nil)
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
205
+ send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
206
+ end
207
+ elsif !attributes[self.class.attribute_map[key]].nil?
208
+ send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
209
+ end
210
+ end
211
+
212
+ self
213
+ end
214
+
215
+ # Deserializes the data based on type
216
+ # @param string type Data type
217
+ # @param string value Value to be deserialized
218
+ # @return [Object] Deserialized data
219
+ def _deserialize(type, value)
220
+ case type.to_sym
221
+ when :Time
222
+ Time.parse(value)
223
+ when :Date
224
+ Date.parse(value)
225
+ when :String
226
+ value.to_s
227
+ when :Integer
228
+ value.to_i
229
+ when :Float
230
+ value.to_f
231
+ when :Boolean
232
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
233
+ true
234
+ else
235
+ false
236
+ end
237
+ when :Object
238
+ # generic object (usually a Hash), return directly
239
+ value
240
+ when /\AArray<(?<inner_type>.+)>\z/
241
+ inner_type = Regexp.last_match[:inner_type]
242
+ value.map { |v| _deserialize(inner_type, v) }
243
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
244
+ k_type = Regexp.last_match[:k_type]
245
+ v_type = Regexp.last_match[:v_type]
246
+ {}.tap do |hash|
247
+ value.each do |k, v|
248
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
249
+ end
250
+ end
251
+ else # model
252
+ # models (e.g. Pet) or oneOf
253
+ klass = Freeclimb.const_get(type)
254
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
255
+ end
256
+ end
257
+
258
+ # Returns the string representation of the object
259
+ # @return [String] String presentation of the object
260
+ def to_s
261
+ to_hash.to_s
262
+ end
263
+
264
+ # to_body is an alias to to_hash (backward compatibility)
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_body
267
+ to_hash
268
+ end
269
+
270
+ # Returns the object in the form of hash
271
+ # @return [Hash] Returns the object in the form of hash
272
+ def to_hash
273
+ hash = {}
274
+ self.class.attribute_map.each_pair do |attr, param|
275
+ value = send(attr)
276
+ if value.nil?
277
+ is_nullable = self.class.openapi_nullable.include?(attr)
278
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
279
+ end
280
+
281
+ hash[param] = _to_hash(value)
282
+ end
283
+ hash
284
+ end
285
+
286
+ # Outputs non-array value in the form of hash
287
+ # For object, use to_hash. Otherwise, just return the value
288
+ # @param [Object] value Any valid value
289
+ # @return [Hash] Returns the value in the form of hash
290
+ def _to_hash(value)
291
+ if value.is_a?(Array)
292
+ value.compact.map { |v| _to_hash(v) }
293
+ elsif value.is_a?(Hash)
294
+ {}.tap do |hash|
295
+ value.each { |k, v| hash[k] = _to_hash(v) }
296
+ end
297
+ elsif value.respond_to? :to_hash
298
+ value.to_hash
299
+ else
300
+ value
301
+ end
302
+ end
303
+ end
304
+ end
@@ -0,0 +1,34 @@
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 ExportOutputType
16
+ CSV = "csv".freeze
17
+
18
+ # Builds the enum from string
19
+ # @param [String] The enum value in the form of the string
20
+ # @return [String] The enum value
21
+ def self.build_from_hash(value)
22
+ new.build_from_hash(value)
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def build_from_hash(value)
29
+ constantValues = ExportOutputType.constants.select { |c| ExportOutputType.const_get(c) == value }
30
+ raise "Invalid ENUM value #{value} for class #ExportOutputType" if constantValues.empty?
31
+ value
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,276 @@
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 ExportRequest
16
+ attr_accessor :resource_type
17
+
18
+ attr_accessor :format
19
+
20
+ attr_accessor :output
21
+
22
+ attr_accessor :query
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ resource_type: :resourceType,
50
+ format: :format,
51
+ output: :output,
52
+ query: :query
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ resource_type: :ExportResourceType,
65
+ format: :"Array<String>",
66
+ output: :ExportRequestOutput,
67
+ query: :Object
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if !attributes.is_a?(Hash)
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::ExportRequest` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if !self.class.attribute_map.key?(k.to_sym)
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::ExportRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:resource_type)
92
+ self.resource_type = attributes[:resource_type]
93
+ end
94
+
95
+ if attributes.key?(:format)
96
+ if (value = attributes[:format]).is_a?(Array)
97
+ self.format = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:output)
102
+ self.output = attributes[:output]
103
+ end
104
+
105
+ if attributes.key?(:query)
106
+ self.query = attributes[:query]
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = []
114
+ if @resource_type.nil?
115
+ invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.')
116
+ end
117
+
118
+ if @output.nil?
119
+ invalid_properties.push('invalid value for "output", output cannot be nil.')
120
+ end
121
+
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ if @resource_type.nil?
129
+ false
130
+ else
131
+ list_invalid_properties.length == 0
132
+ end
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(other)
138
+ return true if equal?(other)
139
+ self.class == other.class &&
140
+ resource_type == other.resource_type &&
141
+ format == other.format &&
142
+ output == other.output &&
143
+ query == other.query
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(other)
149
+ self == other
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [resource_type, format, output, query].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ new.build_from_hash(attributes)
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def build_from_hash(attributes)
169
+ return nil unless attributes.is_a?(Hash)
170
+ self.class.openapi_types.each_pair do |key, type|
171
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
172
+ send(:"#{key}=", nil)
173
+ elsif type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
177
+ send(:"#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
178
+ end
179
+ elsif !attributes[self.class.attribute_map[key]].nil?
180
+ send(:"#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
181
+ end
182
+ end
183
+
184
+ self
185
+ end
186
+
187
+ # Deserializes the data based on type
188
+ # @param string type Data type
189
+ # @param string value Value to be deserialized
190
+ # @return [Object] Deserialized data
191
+ def _deserialize(type, value)
192
+ case type.to_sym
193
+ when :Time
194
+ Time.parse(value)
195
+ when :Date
196
+ Date.parse(value)
197
+ when :String
198
+ value.to_s
199
+ when :Integer
200
+ value.to_i
201
+ when :Float
202
+ value.to_f
203
+ when :Boolean
204
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
205
+ true
206
+ else
207
+ false
208
+ end
209
+ when :Object
210
+ # generic object (usually a Hash), return directly
211
+ value
212
+ when /\AArray<(?<inner_type>.+)>\z/
213
+ inner_type = Regexp.last_match[:inner_type]
214
+ value.map { |v| _deserialize(inner_type, v) }
215
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
216
+ k_type = Regexp.last_match[:k_type]
217
+ v_type = Regexp.last_match[:v_type]
218
+ {}.tap do |hash|
219
+ value.each do |k, v|
220
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
221
+ end
222
+ end
223
+ else # model
224
+ # models (e.g. Pet) or oneOf
225
+ klass = Freeclimb.const_get(type)
226
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
227
+ end
228
+ end
229
+
230
+ # Returns the string representation of the object
231
+ # @return [String] String presentation of the object
232
+ def to_s
233
+ to_hash.to_s
234
+ end
235
+
236
+ # to_body is an alias to to_hash (backward compatibility)
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_body
239
+ to_hash
240
+ end
241
+
242
+ # Returns the object in the form of hash
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_hash
245
+ hash = {}
246
+ self.class.attribute_map.each_pair do |attr, param|
247
+ value = send(attr)
248
+ if value.nil?
249
+ is_nullable = self.class.openapi_nullable.include?(attr)
250
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
+ end
252
+
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map { |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end
275
+ end
276
+ end