shotstack 0.1.0 → 0.1.5
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.
- checksums.yaml +4 -4
- data/README.md +17 -12
- data/lib/shotstack.rb +3 -1
- data/lib/shotstack/api/endpoints_api.rb +20 -11
- data/lib/shotstack/api_client.rb +49 -45
- data/lib/shotstack/api_error.rb +1 -1
- data/lib/shotstack/configuration.rb +35 -8
- data/lib/shotstack/models/audio_asset.rb +70 -12
- data/lib/shotstack/models/clip.rb +27 -13
- data/lib/shotstack/models/crop.rb +346 -0
- data/lib/shotstack/models/edit.rb +19 -7
- data/lib/shotstack/models/font.rb +19 -7
- data/lib/shotstack/models/html_asset.rb +25 -13
- data/lib/shotstack/models/image_asset.rb +34 -13
- data/lib/shotstack/models/luma_asset.rb +20 -8
- data/lib/shotstack/models/offset.rb +23 -7
- data/lib/shotstack/models/output.rb +60 -15
- data/lib/shotstack/models/poster.rb +19 -7
- data/lib/shotstack/models/queued_response.rb +21 -7
- data/lib/shotstack/models/queued_response_data.rb +21 -9
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +21 -7
- data/lib/shotstack/models/render_response_data.rb +100 -28
- data/lib/shotstack/models/soundtrack.rb +22 -8
- data/lib/shotstack/models/thumbnail.rb +19 -7
- data/lib/shotstack/models/timeline.rb +19 -7
- data/lib/shotstack/models/title_asset.rb +24 -12
- data/lib/shotstack/models/track.rb +19 -7
- data/lib/shotstack/models/transition.rb +25 -13
- data/lib/shotstack/models/video_asset.rb +33 -12
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +6 -7
- metadata +9 -28
- data/shotstack-0.0.11.gem +0 -0
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module Shotstack
|
|
16
17
|
# A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
|
|
@@ -18,7 +19,7 @@ module Shotstack
|
|
|
18
19
|
# The URL of the mp3 audio file. The URL must be publicly accessible or include credentials.
|
|
19
20
|
attr_accessor :src
|
|
20
21
|
|
|
21
|
-
# The effect to apply to the audio file
|
|
22
|
+
# The effect to apply to the audio file <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>
|
|
22
23
|
attr_accessor :effect
|
|
23
24
|
|
|
24
25
|
# Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).
|
|
@@ -55,6 +56,11 @@ module Shotstack
|
|
|
55
56
|
}
|
|
56
57
|
end
|
|
57
58
|
|
|
59
|
+
# Returns all the JSON keys this model knows about
|
|
60
|
+
def self.acceptable_attributes
|
|
61
|
+
attribute_map.values
|
|
62
|
+
end
|
|
63
|
+
|
|
58
64
|
# Attribute type mapping.
|
|
59
65
|
def self.openapi_types
|
|
60
66
|
{
|
|
@@ -95,6 +101,8 @@ module Shotstack
|
|
|
95
101
|
|
|
96
102
|
if attributes.key?(:'volume')
|
|
97
103
|
self.volume = attributes[:'volume']
|
|
104
|
+
else
|
|
105
|
+
self.volume = 1
|
|
98
106
|
end
|
|
99
107
|
end
|
|
100
108
|
|
|
@@ -163,7 +171,9 @@ module Shotstack
|
|
|
163
171
|
def build_from_hash(attributes)
|
|
164
172
|
return nil unless attributes.is_a?(Hash)
|
|
165
173
|
self.class.openapi_types.each_pair do |key, type|
|
|
166
|
-
if
|
|
174
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
175
|
+
self.send("#{key}=", nil)
|
|
176
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
167
177
|
# check to ensure the input is an array given that the attribute
|
|
168
178
|
# is documented as an array but the input is not
|
|
169
179
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -171,7 +181,7 @@ module Shotstack
|
|
|
171
181
|
end
|
|
172
182
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
173
183
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
174
|
-
end
|
|
184
|
+
end
|
|
175
185
|
end
|
|
176
186
|
|
|
177
187
|
self
|
|
@@ -183,8 +193,8 @@ module Shotstack
|
|
|
183
193
|
# @return [Object] Deserialized data
|
|
184
194
|
def _deserialize(type, value)
|
|
185
195
|
case type.to_sym
|
|
186
|
-
when :
|
|
187
|
-
|
|
196
|
+
when :Time
|
|
197
|
+
Time.parse(value)
|
|
188
198
|
when :Date
|
|
189
199
|
Date.parse(value)
|
|
190
200
|
when :String
|
|
@@ -214,7 +224,9 @@ module Shotstack
|
|
|
214
224
|
end
|
|
215
225
|
end
|
|
216
226
|
else # model
|
|
217
|
-
|
|
227
|
+
# models (e.g. Pet) or oneOf
|
|
228
|
+
klass = Shotstack.const_get(type)
|
|
229
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
218
230
|
end
|
|
219
231
|
end
|
|
220
232
|
|
|
@@ -240,7 +252,7 @@ module Shotstack
|
|
|
240
252
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
253
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
254
|
end
|
|
243
|
-
|
|
255
|
+
|
|
244
256
|
hash[param] = _to_hash(value)
|
|
245
257
|
end
|
|
246
258
|
hash
|
|
@@ -263,5 +275,7 @@ module Shotstack
|
|
|
263
275
|
value
|
|
264
276
|
end
|
|
265
277
|
end
|
|
278
|
+
|
|
266
279
|
end
|
|
280
|
+
|
|
267
281
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module Shotstack
|
|
16
17
|
# Generate a thumbnail image for the video at a specific point from the timeline.
|
|
@@ -29,6 +30,11 @@ module Shotstack
|
|
|
29
30
|
}
|
|
30
31
|
end
|
|
31
32
|
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
32
38
|
# Attribute type mapping.
|
|
33
39
|
def self.openapi_types
|
|
34
40
|
{
|
|
@@ -124,7 +130,9 @@ module Shotstack
|
|
|
124
130
|
def build_from_hash(attributes)
|
|
125
131
|
return nil unless attributes.is_a?(Hash)
|
|
126
132
|
self.class.openapi_types.each_pair do |key, type|
|
|
127
|
-
if
|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
136
|
# check to ensure the input is an array given that the attribute
|
|
129
137
|
# is documented as an array but the input is not
|
|
130
138
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -132,7 +140,7 @@ module Shotstack
|
|
|
132
140
|
end
|
|
133
141
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
134
142
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
135
|
-
end
|
|
143
|
+
end
|
|
136
144
|
end
|
|
137
145
|
|
|
138
146
|
self
|
|
@@ -144,8 +152,8 @@ module Shotstack
|
|
|
144
152
|
# @return [Object] Deserialized data
|
|
145
153
|
def _deserialize(type, value)
|
|
146
154
|
case type.to_sym
|
|
147
|
-
when :
|
|
148
|
-
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
149
157
|
when :Date
|
|
150
158
|
Date.parse(value)
|
|
151
159
|
when :String
|
|
@@ -175,7 +183,9 @@ module Shotstack
|
|
|
175
183
|
end
|
|
176
184
|
end
|
|
177
185
|
else # model
|
|
178
|
-
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = Shotstack.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
189
|
end
|
|
180
190
|
end
|
|
181
191
|
|
|
@@ -201,7 +211,7 @@ module Shotstack
|
|
|
201
211
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
212
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
213
|
end
|
|
204
|
-
|
|
214
|
+
|
|
205
215
|
hash[param] = _to_hash(value)
|
|
206
216
|
end
|
|
207
217
|
hash
|
|
@@ -224,5 +234,7 @@ module Shotstack
|
|
|
224
234
|
value
|
|
225
235
|
end
|
|
226
236
|
end
|
|
237
|
+
|
|
227
238
|
end
|
|
239
|
+
|
|
228
240
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module Shotstack
|
|
16
17
|
# A timeline represents the contents of a video edit over time, in seconds. A timeline consists of layers called tracks. Tracks are composed of titles, images or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
|
|
@@ -36,6 +37,11 @@ module Shotstack
|
|
|
36
37
|
}
|
|
37
38
|
end
|
|
38
39
|
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
39
45
|
# Attribute type mapping.
|
|
40
46
|
def self.openapi_types
|
|
41
47
|
{
|
|
@@ -144,7 +150,9 @@ module Shotstack
|
|
|
144
150
|
def build_from_hash(attributes)
|
|
145
151
|
return nil unless attributes.is_a?(Hash)
|
|
146
152
|
self.class.openapi_types.each_pair do |key, type|
|
|
147
|
-
if
|
|
153
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
154
|
+
self.send("#{key}=", nil)
|
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
156
|
# check to ensure the input is an array given that the attribute
|
|
149
157
|
# is documented as an array but the input is not
|
|
150
158
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -152,7 +160,7 @@ module Shotstack
|
|
|
152
160
|
end
|
|
153
161
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
154
162
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
155
|
-
end
|
|
163
|
+
end
|
|
156
164
|
end
|
|
157
165
|
|
|
158
166
|
self
|
|
@@ -164,8 +172,8 @@ module Shotstack
|
|
|
164
172
|
# @return [Object] Deserialized data
|
|
165
173
|
def _deserialize(type, value)
|
|
166
174
|
case type.to_sym
|
|
167
|
-
when :
|
|
168
|
-
|
|
175
|
+
when :Time
|
|
176
|
+
Time.parse(value)
|
|
169
177
|
when :Date
|
|
170
178
|
Date.parse(value)
|
|
171
179
|
when :String
|
|
@@ -195,7 +203,9 @@ module Shotstack
|
|
|
195
203
|
end
|
|
196
204
|
end
|
|
197
205
|
else # model
|
|
198
|
-
|
|
206
|
+
# models (e.g. Pet) or oneOf
|
|
207
|
+
klass = Shotstack.const_get(type)
|
|
208
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
199
209
|
end
|
|
200
210
|
end
|
|
201
211
|
|
|
@@ -221,7 +231,7 @@ module Shotstack
|
|
|
221
231
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
222
232
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
223
233
|
end
|
|
224
|
-
|
|
234
|
+
|
|
225
235
|
hash[param] = _to_hash(value)
|
|
226
236
|
end
|
|
227
237
|
hash
|
|
@@ -244,5 +254,7 @@ module Shotstack
|
|
|
244
254
|
value
|
|
245
255
|
end
|
|
246
256
|
end
|
|
257
|
+
|
|
247
258
|
end
|
|
259
|
+
|
|
248
260
|
end
|
|
@@ -6,35 +6,36 @@
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
require_relative 'asset'
|
|
15
16
|
|
|
16
17
|
module Shotstack
|
|
17
18
|
# The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
|
|
18
19
|
class TitleAsset < Asset
|
|
19
|
-
# The type of asset - set to
|
|
20
|
+
# The type of asset - set to `title` for titles.
|
|
20
21
|
attr_accessor :type
|
|
21
22
|
|
|
22
23
|
# The title text string - i.e. \"My Title\".
|
|
23
24
|
attr_accessor :text
|
|
24
25
|
|
|
25
|
-
# Uses a preset to apply font properties and styling to the title.
|
|
26
|
+
# Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>
|
|
26
27
|
attr_accessor :style
|
|
27
28
|
|
|
28
29
|
# Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.
|
|
29
30
|
attr_accessor :color
|
|
30
31
|
|
|
31
|
-
# Set the relative size of the text using predefined sizes from xx-small to xx-large.
|
|
32
|
+
# Set the relative size of the text using predefined sizes from xx-small to xx-large. <ul> <li>`xx-small`</li> <li>`x-small`</li> <li>`small`</li> <li>`medium`</li> <li>`large`</li> <li>`x-large`</li> <li>`xx-large`</li> </ul>
|
|
32
33
|
attr_accessor :size
|
|
33
34
|
|
|
34
|
-
# Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.
|
|
35
|
+
# Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background.
|
|
35
36
|
attr_accessor :background
|
|
36
37
|
|
|
37
|
-
# Place the title in one of nine predefined positions of the viewport.
|
|
38
|
+
# Place the title in one of nine predefined positions of the viewport. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>
|
|
38
39
|
attr_accessor :position
|
|
39
40
|
|
|
40
41
|
attr_accessor :offset
|
|
@@ -75,6 +76,11 @@ module Shotstack
|
|
|
75
76
|
}
|
|
76
77
|
end
|
|
77
78
|
|
|
79
|
+
# Returns all the JSON keys this model knows about
|
|
80
|
+
def self.acceptable_attributes
|
|
81
|
+
attribute_map.values
|
|
82
|
+
end
|
|
83
|
+
|
|
78
84
|
# Attribute type mapping.
|
|
79
85
|
def self.openapi_types
|
|
80
86
|
{
|
|
@@ -250,7 +256,9 @@ module Shotstack
|
|
|
250
256
|
def build_from_hash(attributes)
|
|
251
257
|
return nil unless attributes.is_a?(Hash)
|
|
252
258
|
self.class.openapi_types.each_pair do |key, type|
|
|
253
|
-
if
|
|
259
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
260
|
+
self.send("#{key}=", nil)
|
|
261
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
254
262
|
# check to ensure the input is an array given that the attribute
|
|
255
263
|
# is documented as an array but the input is not
|
|
256
264
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -258,7 +266,7 @@ module Shotstack
|
|
|
258
266
|
end
|
|
259
267
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
260
268
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
261
|
-
end
|
|
269
|
+
end
|
|
262
270
|
end
|
|
263
271
|
|
|
264
272
|
self
|
|
@@ -270,8 +278,8 @@ module Shotstack
|
|
|
270
278
|
# @return [Object] Deserialized data
|
|
271
279
|
def _deserialize(type, value)
|
|
272
280
|
case type.to_sym
|
|
273
|
-
when :
|
|
274
|
-
|
|
281
|
+
when :Time
|
|
282
|
+
Time.parse(value)
|
|
275
283
|
when :Date
|
|
276
284
|
Date.parse(value)
|
|
277
285
|
when :String
|
|
@@ -301,7 +309,9 @@ module Shotstack
|
|
|
301
309
|
end
|
|
302
310
|
end
|
|
303
311
|
else # model
|
|
304
|
-
|
|
312
|
+
# models (e.g. Pet) or oneOf
|
|
313
|
+
klass = Shotstack.const_get(type)
|
|
314
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
305
315
|
end
|
|
306
316
|
end
|
|
307
317
|
|
|
@@ -327,7 +337,7 @@ module Shotstack
|
|
|
327
337
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
328
338
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
329
339
|
end
|
|
330
|
-
|
|
340
|
+
|
|
331
341
|
hash[param] = _to_hash(value)
|
|
332
342
|
end
|
|
333
343
|
hash
|
|
@@ -350,5 +360,7 @@ module Shotstack
|
|
|
350
360
|
value
|
|
351
361
|
end
|
|
352
362
|
end
|
|
363
|
+
|
|
353
364
|
end
|
|
365
|
+
|
|
354
366
|
end
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version:
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module Shotstack
|
|
16
17
|
# A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
@@ -25,6 +26,11 @@ module Shotstack
|
|
|
25
26
|
}
|
|
26
27
|
end
|
|
27
28
|
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
|
30
|
+
def self.acceptable_attributes
|
|
31
|
+
attribute_map.values
|
|
32
|
+
end
|
|
33
|
+
|
|
28
34
|
# Attribute type mapping.
|
|
29
35
|
def self.openapi_types
|
|
30
36
|
{
|
|
@@ -111,7 +117,9 @@ module Shotstack
|
|
|
111
117
|
def build_from_hash(attributes)
|
|
112
118
|
return nil unless attributes.is_a?(Hash)
|
|
113
119
|
self.class.openapi_types.each_pair do |key, type|
|
|
114
|
-
if
|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
121
|
+
self.send("#{key}=", nil)
|
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
115
123
|
# check to ensure the input is an array given that the attribute
|
|
116
124
|
# is documented as an array but the input is not
|
|
117
125
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -119,7 +127,7 @@ module Shotstack
|
|
|
119
127
|
end
|
|
120
128
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
121
129
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
122
|
-
end
|
|
130
|
+
end
|
|
123
131
|
end
|
|
124
132
|
|
|
125
133
|
self
|
|
@@ -131,8 +139,8 @@ module Shotstack
|
|
|
131
139
|
# @return [Object] Deserialized data
|
|
132
140
|
def _deserialize(type, value)
|
|
133
141
|
case type.to_sym
|
|
134
|
-
when :
|
|
135
|
-
|
|
142
|
+
when :Time
|
|
143
|
+
Time.parse(value)
|
|
136
144
|
when :Date
|
|
137
145
|
Date.parse(value)
|
|
138
146
|
when :String
|
|
@@ -162,7 +170,9 @@ module Shotstack
|
|
|
162
170
|
end
|
|
163
171
|
end
|
|
164
172
|
else # model
|
|
165
|
-
|
|
173
|
+
# models (e.g. Pet) or oneOf
|
|
174
|
+
klass = Shotstack.const_get(type)
|
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
166
176
|
end
|
|
167
177
|
end
|
|
168
178
|
|
|
@@ -188,7 +198,7 @@ module Shotstack
|
|
|
188
198
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
199
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
200
|
end
|
|
191
|
-
|
|
201
|
+
|
|
192
202
|
hash[param] = _to_hash(value)
|
|
193
203
|
end
|
|
194
204
|
hash
|
|
@@ -211,5 +221,7 @@ module Shotstack
|
|
|
211
221
|
value
|
|
212
222
|
end
|
|
213
223
|
end
|
|
224
|
+
|
|
214
225
|
end
|
|
226
|
+
|
|
215
227
|
end
|