shotstack 0.1.4 → 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/lib/shotstack.rb +3 -1
- data/lib/shotstack/api/endpoints_api.rb +9 -7
- 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 +67 -11
- data/lib/shotstack/models/clip.rb +20 -8
- 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 +23 -11
- data/lib/shotstack/models/image_asset.rb +33 -12
- data/lib/shotstack/models/luma_asset.rb +20 -8
- data/lib/shotstack/models/offset.rb +19 -7
- data/lib/shotstack/models/output.rb +60 -15
- data/lib/shotstack/models/poster.rb +19 -7
- data/lib/shotstack/models/queued_response.rb +19 -7
- data/lib/shotstack/models/queued_response_data.rb +19 -7
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +19 -7
- data/lib/shotstack/models/render_response_data.rb +19 -7
- data/lib/shotstack/models/soundtrack.rb +19 -7
- data/lib/shotstack/models/thumbnail.rb +19 -7
- data/lib/shotstack/models/timeline.rb +19 -7
- data/lib/shotstack/models/title_asset.rb +19 -7
- data/lib/shotstack/models/track.rb +19 -7
- data/lib/shotstack/models/transition.rb +19 -7
- data/lib/shotstack/models/video_asset.rb +32 -11
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +2 -3
- metadata +5 -23
@@ -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,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
|
require_relative 'asset'
|
15
16
|
|
16
17
|
module Shotstack
|
@@ -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
|
@@ -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
|
# In and out transitions for a clip - i.e. fade in and fade out
|
@@ -51,6 +52,11 @@ module Shotstack
|
|
51
52
|
}
|
52
53
|
end
|
53
54
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
54
60
|
# Attribute type mapping.
|
55
61
|
def self.openapi_types
|
56
62
|
{
|
@@ -160,7 +166,9 @@ module Shotstack
|
|
160
166
|
def build_from_hash(attributes)
|
161
167
|
return nil unless attributes.is_a?(Hash)
|
162
168
|
self.class.openapi_types.each_pair do |key, type|
|
163
|
-
if
|
169
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
170
|
+
self.send("#{key}=", nil)
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
164
172
|
# check to ensure the input is an array given that the attribute
|
165
173
|
# is documented as an array but the input is not
|
166
174
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -168,7 +176,7 @@ module Shotstack
|
|
168
176
|
end
|
169
177
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
170
178
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
171
|
-
end
|
179
|
+
end
|
172
180
|
end
|
173
181
|
|
174
182
|
self
|
@@ -180,8 +188,8 @@ module Shotstack
|
|
180
188
|
# @return [Object] Deserialized data
|
181
189
|
def _deserialize(type, value)
|
182
190
|
case type.to_sym
|
183
|
-
when :
|
184
|
-
|
191
|
+
when :Time
|
192
|
+
Time.parse(value)
|
185
193
|
when :Date
|
186
194
|
Date.parse(value)
|
187
195
|
when :String
|
@@ -211,7 +219,9 @@ module Shotstack
|
|
211
219
|
end
|
212
220
|
end
|
213
221
|
else # model
|
214
|
-
|
222
|
+
# models (e.g. Pet) or oneOf
|
223
|
+
klass = Shotstack.const_get(type)
|
224
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
225
|
end
|
216
226
|
end
|
217
227
|
|
@@ -237,7 +247,7 @@ module Shotstack
|
|
237
247
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
238
248
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
239
249
|
end
|
240
|
-
|
250
|
+
|
241
251
|
hash[param] = _to_hash(value)
|
242
252
|
end
|
243
253
|
hash
|
@@ -260,5 +270,7 @@ module Shotstack
|
|
260
270
|
value
|
261
271
|
end
|
262
272
|
end
|
273
|
+
|
263
274
|
end
|
275
|
+
|
264
276
|
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
|
require_relative 'asset'
|
15
16
|
|
16
17
|
module Shotstack
|
@@ -28,23 +29,32 @@ module Shotstack
|
|
28
29
|
# Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
|
29
30
|
attr_accessor :volume
|
30
31
|
|
32
|
+
attr_accessor :crop
|
33
|
+
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
34
37
|
:'type' => :'type',
|
35
38
|
:'src' => :'src',
|
36
39
|
:'trim' => :'trim',
|
37
|
-
:'volume' => :'volume'
|
40
|
+
:'volume' => :'volume',
|
41
|
+
:'crop' => :'crop'
|
38
42
|
}
|
39
43
|
end
|
40
44
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
41
50
|
# Attribute type mapping.
|
42
51
|
def self.openapi_types
|
43
52
|
{
|
44
53
|
:'type' => :'String',
|
45
54
|
:'src' => :'String',
|
46
55
|
:'trim' => :'Float',
|
47
|
-
:'volume' => :'Float'
|
56
|
+
:'volume' => :'Float',
|
57
|
+
:'crop' => :'Crop'
|
48
58
|
}
|
49
59
|
end
|
50
60
|
|
@@ -86,6 +96,10 @@ module Shotstack
|
|
86
96
|
if attributes.key?(:'volume')
|
87
97
|
self.volume = attributes[:'volume']
|
88
98
|
end
|
99
|
+
|
100
|
+
if attributes.key?(:'crop')
|
101
|
+
self.crop = attributes[:'crop']
|
102
|
+
end
|
89
103
|
end
|
90
104
|
|
91
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -119,7 +133,8 @@ module Shotstack
|
|
119
133
|
type == o.type &&
|
120
134
|
src == o.src &&
|
121
135
|
trim == o.trim &&
|
122
|
-
volume == o.volume
|
136
|
+
volume == o.volume &&
|
137
|
+
crop == o.crop
|
123
138
|
end
|
124
139
|
|
125
140
|
# @see the `==` method
|
@@ -131,7 +146,7 @@ module Shotstack
|
|
131
146
|
# Calculates hash code according to all attributes.
|
132
147
|
# @return [Integer] Hash code
|
133
148
|
def hash
|
134
|
-
[type, src, trim, volume].hash
|
149
|
+
[type, src, trim, volume, crop].hash
|
135
150
|
end
|
136
151
|
|
137
152
|
# Builds the object from hash
|
@@ -147,7 +162,9 @@ module Shotstack
|
|
147
162
|
def build_from_hash(attributes)
|
148
163
|
return nil unless attributes.is_a?(Hash)
|
149
164
|
self.class.openapi_types.each_pair do |key, type|
|
150
|
-
if
|
165
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
+
self.send("#{key}=", nil)
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
151
168
|
# check to ensure the input is an array given that the attribute
|
152
169
|
# is documented as an array but the input is not
|
153
170
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -155,7 +172,7 @@ module Shotstack
|
|
155
172
|
end
|
156
173
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
157
174
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
158
|
-
end
|
175
|
+
end
|
159
176
|
end
|
160
177
|
|
161
178
|
self
|
@@ -167,8 +184,8 @@ module Shotstack
|
|
167
184
|
# @return [Object] Deserialized data
|
168
185
|
def _deserialize(type, value)
|
169
186
|
case type.to_sym
|
170
|
-
when :
|
171
|
-
|
187
|
+
when :Time
|
188
|
+
Time.parse(value)
|
172
189
|
when :Date
|
173
190
|
Date.parse(value)
|
174
191
|
when :String
|
@@ -198,7 +215,9 @@ module Shotstack
|
|
198
215
|
end
|
199
216
|
end
|
200
217
|
else # model
|
201
|
-
|
218
|
+
# models (e.g. Pet) or oneOf
|
219
|
+
klass = Shotstack.const_get(type)
|
220
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
221
|
end
|
203
222
|
end
|
204
223
|
|
@@ -224,7 +243,7 @@ module Shotstack
|
|
224
243
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
225
244
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
226
245
|
end
|
227
|
-
|
246
|
+
|
228
247
|
hash[param] = _to_hash(value)
|
229
248
|
end
|
230
249
|
hash
|
@@ -247,5 +266,7 @@ module Shotstack
|
|
247
266
|
value
|
248
267
|
end
|
249
268
|
end
|
269
|
+
|
250
270
|
end
|
271
|
+
|
251
272
|
end
|