moov_ruby 0.1.32 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/moov/images.rb +328 -0
- data/lib/moov/models/components/imagemetadatarequest.rb +33 -0
- data/lib/moov/models/components/imagemetadatarequest.rbi +13 -0
- data/lib/moov/models/components/imagemetadatavalidationerror.rb +33 -0
- data/lib/moov/models/components/imagemetadatavalidationerror.rbi +13 -0
- data/lib/moov/models/components/imageupdaterequestmultipart.rb +39 -0
- data/lib/moov/models/components/imageupdaterequestmultipart.rbi +15 -0
- data/lib/moov/models/components/imageupdaterequestmultipart_image.rb +37 -0
- data/lib/moov/models/components/imageupdaterequestmultipart_image.rbi +15 -0
- data/lib/moov/models/components/imageuploadrequestmultipart.rb +37 -0
- data/lib/moov/models/components/imageuploadrequestmultipart.rbi +15 -0
- data/lib/moov/models/components/imageuploadrequestmultipart_image.rb +37 -0
- data/lib/moov/models/components/imageuploadrequestmultipart_image.rbi +15 -0
- data/lib/moov/models/components/metadata.rb +35 -0
- data/lib/moov/models/components/metadata.rbi +13 -0
- data/lib/moov/models/components.rb +7 -0
- data/lib/moov/models/errors/imagerequestvalidationerror.rb +41 -0
- data/lib/moov/models/errors/imagerequestvalidationerror.rbi +17 -0
- data/lib/moov/models/errors.rb +1 -0
- data/lib/moov/models/operations/updateimage_request.rb +53 -0
- data/lib/moov/models/operations/updateimage_request.rbi +19 -0
- data/lib/moov/models/operations/updateimage_response.rb +49 -0
- data/lib/moov/models/operations/updateimage_response.rbi +21 -0
- data/lib/moov/models/operations/uploadimage_request.rb +49 -0
- data/lib/moov/models/operations/uploadimage_request.rbi +17 -0
- data/lib/moov/models/operations/uploadimage_response.rb +49 -0
- data/lib/moov/models/operations/uploadimage_response.rbi +21 -0
- data/lib/moov/models/operations.rb +4 -0
- data/lib/moov/sdkconfiguration.rb +3 -3
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43b1f0068532c9cc3baecdd1eed939316d8f519997e88e4acbe981eca91deb10
|
4
|
+
data.tar.gz: b2e5c8bfc2a4d561f732f51e171983776f1695fbb506f4f597b241043edd08ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c96aba431fd2b743f468b2de01df35a7aaed6c3df1e7350ea3fe0b2b8c8a8095acba329c01fad5b2f2594ee6aca18b552b8c53b37378f9193b35a0608a5d8d
|
7
|
+
data.tar.gz: b7753c66dbb1debd795185420879e9f348865a8873f188055621372ff1a11ea27d64f3a5506f97fffb2f8ba6188cf552e41ae019d3be7f97088b09750466f94a
|
data/lib/moov/images.rb
CHANGED
@@ -157,6 +157,168 @@ module Moov
|
|
157
157
|
end
|
158
158
|
|
159
159
|
|
160
|
+
sig { params(image_upload_request_multi_part: Models::Components::ImageUploadRequestMultiPart, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UploadImageResponse) }
|
161
|
+
def upload(image_upload_request_multi_part:, account_id:, x_moov_version: nil, timeout_ms: nil)
|
162
|
+
# upload - Upload a new PNG, JPEG, or WebP image with optional metadata.
|
163
|
+
# Duplicate images, and requests larger than 16MB will be rejected.
|
164
|
+
request = Models::Operations::UploadImageRequest.new(
|
165
|
+
account_id: account_id,
|
166
|
+
image_upload_request_multi_part: image_upload_request_multi_part,
|
167
|
+
x_moov_version: x_moov_version
|
168
|
+
)
|
169
|
+
url, params = @sdk_configuration.get_server_details
|
170
|
+
base_url = Utils.template_url(url, params)
|
171
|
+
url = Utils.generate_url(
|
172
|
+
Models::Operations::UploadImageRequest,
|
173
|
+
base_url,
|
174
|
+
'/accounts/{accountID}/images',
|
175
|
+
request,
|
176
|
+
@sdk_configuration.globals
|
177
|
+
)
|
178
|
+
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
179
|
+
headers = T.cast(headers, T::Hash[String, String])
|
180
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :image_upload_request_multi_part, :multipart)
|
181
|
+
headers['content-type'] = req_content_type
|
182
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
183
|
+
|
184
|
+
if form
|
185
|
+
body = Utils.encode_form(form)
|
186
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
187
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
188
|
+
else
|
189
|
+
body = data
|
190
|
+
end
|
191
|
+
headers['Accept'] = 'application/json'
|
192
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
193
|
+
|
194
|
+
security = @sdk_configuration.security_source&.call
|
195
|
+
|
196
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
197
|
+
timeout ||= @sdk_configuration.timeout
|
198
|
+
|
199
|
+
|
200
|
+
connection = @sdk_configuration.client
|
201
|
+
|
202
|
+
hook_ctx = SDKHooks::HookContext.new(
|
203
|
+
config: @sdk_configuration,
|
204
|
+
base_url: base_url,
|
205
|
+
oauth2_scopes: nil,
|
206
|
+
operation_id: 'uploadImage',
|
207
|
+
security_source: @sdk_configuration.security_source
|
208
|
+
)
|
209
|
+
|
210
|
+
error = T.let(nil, T.nilable(StandardError))
|
211
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
212
|
+
|
213
|
+
|
214
|
+
begin
|
215
|
+
http_response = T.must(connection).post(url) do |req|
|
216
|
+
req.body = body
|
217
|
+
req.headers.merge!(headers)
|
218
|
+
req.options.timeout = timeout unless timeout.nil?
|
219
|
+
Utils.configure_request_security(req, security)
|
220
|
+
|
221
|
+
@sdk_configuration.hooks.before_request(
|
222
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
223
|
+
hook_ctx: hook_ctx
|
224
|
+
),
|
225
|
+
request: req
|
226
|
+
)
|
227
|
+
end
|
228
|
+
rescue StandardError => e
|
229
|
+
error = e
|
230
|
+
ensure
|
231
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
232
|
+
http_response = @sdk_configuration.hooks.after_error(
|
233
|
+
error: error,
|
234
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
235
|
+
hook_ctx: hook_ctx
|
236
|
+
),
|
237
|
+
response: http_response
|
238
|
+
)
|
239
|
+
else
|
240
|
+
http_response = @sdk_configuration.hooks.after_success(
|
241
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
242
|
+
hook_ctx: hook_ctx
|
243
|
+
),
|
244
|
+
response: http_response
|
245
|
+
)
|
246
|
+
end
|
247
|
+
|
248
|
+
if http_response.nil?
|
249
|
+
raise error if !error.nil?
|
250
|
+
raise 'no response'
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
255
|
+
if Utils.match_status_code(http_response.status, ['201'])
|
256
|
+
if Utils.match_content_type(content_type, 'application/json')
|
257
|
+
http_response = @sdk_configuration.hooks.after_success(
|
258
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
259
|
+
hook_ctx: hook_ctx
|
260
|
+
),
|
261
|
+
response: http_response
|
262
|
+
)
|
263
|
+
response_data = http_response.env.response_body
|
264
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::ImageMetadata)
|
265
|
+
response = Models::Operations::UploadImageResponse.new(
|
266
|
+
status_code: http_response.status,
|
267
|
+
content_type: content_type,
|
268
|
+
raw_response: http_response,
|
269
|
+
headers: http_response.headers,
|
270
|
+
image_metadata: T.unsafe(obj)
|
271
|
+
)
|
272
|
+
|
273
|
+
return response
|
274
|
+
else
|
275
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
276
|
+
end
|
277
|
+
elsif Utils.match_status_code(http_response.status, ['400', '409'])
|
278
|
+
if Utils.match_content_type(content_type, 'application/json')
|
279
|
+
http_response = @sdk_configuration.hooks.after_success(
|
280
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
281
|
+
hook_ctx: hook_ctx
|
282
|
+
),
|
283
|
+
response: http_response
|
284
|
+
)
|
285
|
+
response_data = http_response.env.response_body
|
286
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
287
|
+
obj.raw_response = http_response
|
288
|
+
raise obj
|
289
|
+
else
|
290
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
291
|
+
end
|
292
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
293
|
+
if Utils.match_content_type(content_type, 'application/json')
|
294
|
+
http_response = @sdk_configuration.hooks.after_success(
|
295
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
296
|
+
hook_ctx: hook_ctx
|
297
|
+
),
|
298
|
+
response: http_response
|
299
|
+
)
|
300
|
+
response_data = http_response.env.response_body
|
301
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ImageRequestValidationError)
|
302
|
+
obj.raw_response = http_response
|
303
|
+
raise obj
|
304
|
+
else
|
305
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
306
|
+
end
|
307
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
308
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
309
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
310
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
311
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
312
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
313
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
314
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
315
|
+
else
|
316
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
317
|
+
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
|
160
322
|
sig { params(account_id: ::String, image_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetImageMetadataResponse) }
|
161
323
|
def get_metadata(account_id:, image_id:, x_moov_version: nil, timeout_ms: nil)
|
162
324
|
# get_metadata - Retrieve metadata for a specific image by its ID.
|
@@ -276,6 +438,172 @@ module Moov
|
|
276
438
|
end
|
277
439
|
|
278
440
|
|
441
|
+
sig { params(image_update_request_multi_part: Models::Components::ImageUpdateRequestMultiPart, account_id: ::String, image_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateImageResponse) }
|
442
|
+
def update(image_update_request_multi_part:, account_id:, image_id:, x_moov_version: nil, timeout_ms: nil)
|
443
|
+
# update - Update an existing image and/or its metadata.
|
444
|
+
#
|
445
|
+
# Duplicate images, and requests larger than 16MB will be rejected. Omit any
|
446
|
+
# form parts you do not wish to update. Existing metadata can be cleared by
|
447
|
+
# sending `null` for the `metadata` form part.
|
448
|
+
request = Models::Operations::UpdateImageRequest.new(
|
449
|
+
account_id: account_id,
|
450
|
+
image_id: image_id,
|
451
|
+
image_update_request_multi_part: image_update_request_multi_part,
|
452
|
+
x_moov_version: x_moov_version
|
453
|
+
)
|
454
|
+
url, params = @sdk_configuration.get_server_details
|
455
|
+
base_url = Utils.template_url(url, params)
|
456
|
+
url = Utils.generate_url(
|
457
|
+
Models::Operations::UpdateImageRequest,
|
458
|
+
base_url,
|
459
|
+
'/accounts/{accountID}/images/{imageID}',
|
460
|
+
request,
|
461
|
+
@sdk_configuration.globals
|
462
|
+
)
|
463
|
+
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
464
|
+
headers = T.cast(headers, T::Hash[String, String])
|
465
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :image_update_request_multi_part, :multipart)
|
466
|
+
headers['content-type'] = req_content_type
|
467
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
468
|
+
|
469
|
+
if form
|
470
|
+
body = Utils.encode_form(form)
|
471
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
472
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
473
|
+
else
|
474
|
+
body = data
|
475
|
+
end
|
476
|
+
headers['Accept'] = 'application/json'
|
477
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
478
|
+
|
479
|
+
security = @sdk_configuration.security_source&.call
|
480
|
+
|
481
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
482
|
+
timeout ||= @sdk_configuration.timeout
|
483
|
+
|
484
|
+
|
485
|
+
connection = @sdk_configuration.client
|
486
|
+
|
487
|
+
hook_ctx = SDKHooks::HookContext.new(
|
488
|
+
config: @sdk_configuration,
|
489
|
+
base_url: base_url,
|
490
|
+
oauth2_scopes: nil,
|
491
|
+
operation_id: 'updateImage',
|
492
|
+
security_source: @sdk_configuration.security_source
|
493
|
+
)
|
494
|
+
|
495
|
+
error = T.let(nil, T.nilable(StandardError))
|
496
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
497
|
+
|
498
|
+
|
499
|
+
begin
|
500
|
+
http_response = T.must(connection).patch(url) do |req|
|
501
|
+
req.body = body
|
502
|
+
req.headers.merge!(headers)
|
503
|
+
req.options.timeout = timeout unless timeout.nil?
|
504
|
+
Utils.configure_request_security(req, security)
|
505
|
+
|
506
|
+
@sdk_configuration.hooks.before_request(
|
507
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
508
|
+
hook_ctx: hook_ctx
|
509
|
+
),
|
510
|
+
request: req
|
511
|
+
)
|
512
|
+
end
|
513
|
+
rescue StandardError => e
|
514
|
+
error = e
|
515
|
+
ensure
|
516
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
517
|
+
http_response = @sdk_configuration.hooks.after_error(
|
518
|
+
error: error,
|
519
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
520
|
+
hook_ctx: hook_ctx
|
521
|
+
),
|
522
|
+
response: http_response
|
523
|
+
)
|
524
|
+
else
|
525
|
+
http_response = @sdk_configuration.hooks.after_success(
|
526
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
527
|
+
hook_ctx: hook_ctx
|
528
|
+
),
|
529
|
+
response: http_response
|
530
|
+
)
|
531
|
+
end
|
532
|
+
|
533
|
+
if http_response.nil?
|
534
|
+
raise error if !error.nil?
|
535
|
+
raise 'no response'
|
536
|
+
end
|
537
|
+
end
|
538
|
+
|
539
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
540
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
541
|
+
if Utils.match_content_type(content_type, 'application/json')
|
542
|
+
http_response = @sdk_configuration.hooks.after_success(
|
543
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
544
|
+
hook_ctx: hook_ctx
|
545
|
+
),
|
546
|
+
response: http_response
|
547
|
+
)
|
548
|
+
response_data = http_response.env.response_body
|
549
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::ImageMetadata)
|
550
|
+
response = Models::Operations::UpdateImageResponse.new(
|
551
|
+
status_code: http_response.status,
|
552
|
+
content_type: content_type,
|
553
|
+
raw_response: http_response,
|
554
|
+
headers: http_response.headers,
|
555
|
+
image_metadata: T.unsafe(obj)
|
556
|
+
)
|
557
|
+
|
558
|
+
return response
|
559
|
+
else
|
560
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
561
|
+
end
|
562
|
+
elsif Utils.match_status_code(http_response.status, ['400', '409'])
|
563
|
+
if Utils.match_content_type(content_type, 'application/json')
|
564
|
+
http_response = @sdk_configuration.hooks.after_success(
|
565
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
566
|
+
hook_ctx: hook_ctx
|
567
|
+
),
|
568
|
+
response: http_response
|
569
|
+
)
|
570
|
+
response_data = http_response.env.response_body
|
571
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
572
|
+
obj.raw_response = http_response
|
573
|
+
raise obj
|
574
|
+
else
|
575
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
576
|
+
end
|
577
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
578
|
+
if Utils.match_content_type(content_type, 'application/json')
|
579
|
+
http_response = @sdk_configuration.hooks.after_success(
|
580
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
581
|
+
hook_ctx: hook_ctx
|
582
|
+
),
|
583
|
+
response: http_response
|
584
|
+
)
|
585
|
+
response_data = http_response.env.response_body
|
586
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ImageRequestValidationError)
|
587
|
+
obj.raw_response = http_response
|
588
|
+
raise obj
|
589
|
+
else
|
590
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
591
|
+
end
|
592
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
593
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
594
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
595
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
596
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
597
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
598
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
599
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
600
|
+
else
|
601
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
602
|
+
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
606
|
+
|
279
607
|
sig { params(account_id: ::String, image_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::DeleteImageResponse) }
|
280
608
|
def delete(account_id:, image_id:, x_moov_version: nil, timeout_ms: nil)
|
281
609
|
# delete - Permanently delete an image by its ID.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
# Request body for creating or updating image metadata.
|
12
|
+
class ImageMetadataRequest
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# Alternative text for the image.
|
17
|
+
field :alt_text, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('altText') } }
|
18
|
+
|
19
|
+
sig { params(alt_text: T.nilable(::String)).void }
|
20
|
+
def initialize(alt_text: nil)
|
21
|
+
@alt_text = alt_text
|
22
|
+
end
|
23
|
+
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
25
|
+
def ==(other)
|
26
|
+
return false unless other.is_a? self.class
|
27
|
+
return false unless @alt_text == other.alt_text
|
28
|
+
true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageMetadataRequest
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageMetadataRequest
|
11
|
+
def alt_text(); end
|
12
|
+
def alt_text=(str_); end
|
13
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
|
12
|
+
class ImageMetadataValidationError
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :alt_text, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('altText') } }
|
18
|
+
|
19
|
+
sig { params(alt_text: T.nilable(::String)).void }
|
20
|
+
def initialize(alt_text: nil)
|
21
|
+
@alt_text = alt_text
|
22
|
+
end
|
23
|
+
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
25
|
+
def ==(other)
|
26
|
+
return false unless other.is_a? self.class
|
27
|
+
return false unless @alt_text == other.alt_text
|
28
|
+
true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageMetadataValidationError
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageMetadataValidationError
|
11
|
+
def alt_text(); end
|
12
|
+
def alt_text=(str_); end
|
13
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
# Multipart request body for updating an image and/or its metadata.
|
12
|
+
class ImageUpdateRequestMultiPart
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :image, Crystalline::Nilable.new(Models::Components::ImageUpdateRequestMultiPartImage), { 'multipart_form': { 'file': true, 'field_name': 'image' } }
|
18
|
+
# JSON-encoded metadata to update for the image.
|
19
|
+
#
|
20
|
+
# Omit this field if not updating metadata, or send `null` to clear existing metadata.
|
21
|
+
field :metadata, Crystalline::Nilable.new(Models::Components::Metadata), { 'multipart_form': { 'field_name': 'metadata', 'json': true } }
|
22
|
+
|
23
|
+
sig { params(image: T.nilable(Models::Components::ImageUpdateRequestMultiPartImage), metadata: T.nilable(Models::Components::Metadata)).void }
|
24
|
+
def initialize(image: nil, metadata: nil)
|
25
|
+
@image = image
|
26
|
+
@metadata = metadata
|
27
|
+
end
|
28
|
+
|
29
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
30
|
+
def ==(other)
|
31
|
+
return false unless other.is_a? self.class
|
32
|
+
return false unless @image == other.image
|
33
|
+
return false unless @metadata == other.metadata
|
34
|
+
true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageUpdateRequestMultiPart
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageUpdateRequestMultiPart
|
11
|
+
def image(); end
|
12
|
+
def image=(str_); end
|
13
|
+
def metadata(); end
|
14
|
+
def metadata=(str_); end
|
15
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
|
12
|
+
class ImageUpdateRequestMultiPartImage
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :file_name, ::String, { 'multipart_form': { 'field_name': 'fileName' } }
|
18
|
+
|
19
|
+
field :content, ::String, { 'multipart_form': { 'content': true } }
|
20
|
+
|
21
|
+
sig { params(file_name: ::String, content: ::String).void }
|
22
|
+
def initialize(file_name:, content:)
|
23
|
+
@file_name = file_name
|
24
|
+
@content = content
|
25
|
+
end
|
26
|
+
|
27
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
28
|
+
def ==(other)
|
29
|
+
return false unless other.is_a? self.class
|
30
|
+
return false unless @file_name == other.file_name
|
31
|
+
return false unless @content == other.content
|
32
|
+
true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageUpdateRequestMultiPartImage
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageUpdateRequestMultiPartImage
|
11
|
+
def file_name(); end
|
12
|
+
def file_name=(str_); end
|
13
|
+
def content(); end
|
14
|
+
def content=(str_); end
|
15
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
# Multipart request body for uploading an image with optional metadata.
|
12
|
+
class ImageUploadRequestMultiPart
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :image, Models::Components::ImageUploadRequestMultiPartImage, { 'multipart_form': { 'file': true, 'field_name': 'image' } }
|
18
|
+
# Optional, json-encoded metadata to associate with the uploaded image.
|
19
|
+
field :metadata, Crystalline::Nilable.new(Models::Components::ImageMetadataRequest), { 'multipart_form': { 'field_name': 'metadata', 'json': true } }
|
20
|
+
|
21
|
+
sig { params(image: Models::Components::ImageUploadRequestMultiPartImage, metadata: T.nilable(Models::Components::ImageMetadataRequest)).void }
|
22
|
+
def initialize(image:, metadata: nil)
|
23
|
+
@image = image
|
24
|
+
@metadata = metadata
|
25
|
+
end
|
26
|
+
|
27
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
28
|
+
def ==(other)
|
29
|
+
return false unless other.is_a? self.class
|
30
|
+
return false unless @image == other.image
|
31
|
+
return false unless @metadata == other.metadata
|
32
|
+
true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageUploadRequestMultiPart
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageUploadRequestMultiPart
|
11
|
+
def image(); end
|
12
|
+
def image=(str_); end
|
13
|
+
def metadata(); end
|
14
|
+
def metadata=(str_); end
|
15
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
|
12
|
+
class ImageUploadRequestMultiPartImage
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :file_name, ::String, { 'multipart_form': { 'field_name': 'fileName' } }
|
18
|
+
|
19
|
+
field :content, ::String, { 'multipart_form': { 'content': true } }
|
20
|
+
|
21
|
+
sig { params(file_name: ::String, content: ::String).void }
|
22
|
+
def initialize(file_name:, content:)
|
23
|
+
@file_name = file_name
|
24
|
+
@content = content
|
25
|
+
end
|
26
|
+
|
27
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
28
|
+
def ==(other)
|
29
|
+
return false unless other.is_a? self.class
|
30
|
+
return false unless @file_name == other.file_name
|
31
|
+
return false unless @content == other.content
|
32
|
+
true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::ImageUploadRequestMultiPartImage
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::ImageUploadRequestMultiPartImage
|
11
|
+
def file_name(); end
|
12
|
+
def file_name=(str_); end
|
13
|
+
def content(); end
|
14
|
+
def content=(str_); end
|
15
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Components
|
10
|
+
|
11
|
+
# JSON-encoded metadata to update for the image.
|
12
|
+
#
|
13
|
+
# Omit this field if not updating metadata, or send `null` to clear existing metadata.
|
14
|
+
class Metadata
|
15
|
+
extend T::Sig
|
16
|
+
include Crystalline::MetadataFields
|
17
|
+
|
18
|
+
# Alternative text for the image.
|
19
|
+
field :alt_text, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('altText') } }
|
20
|
+
|
21
|
+
sig { params(alt_text: T.nilable(::String)).void }
|
22
|
+
def initialize(alt_text: nil)
|
23
|
+
@alt_text = alt_text
|
24
|
+
end
|
25
|
+
|
26
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
27
|
+
def ==(other)
|
28
|
+
return false unless other.is_a? self.class
|
29
|
+
return false unless @alt_text == other.alt_text
|
30
|
+
true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Components::Metadata
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Components::Metadata
|
11
|
+
def alt_text(); end
|
12
|
+
def alt_text=(str_); end
|
13
|
+
end
|
@@ -249,6 +249,12 @@ module Moov
|
|
249
249
|
autoload :GrantType, 'moov/models/components/granttype.rb'
|
250
250
|
autoload :GuestProfile, 'moov/models/components/guestprofile.rb'
|
251
251
|
autoload :ImageMetadata, 'moov/models/components/imagemetadata.rb'
|
252
|
+
autoload :ImageMetadataRequest, 'moov/models/components/imagemetadatarequest.rb'
|
253
|
+
autoload :ImageMetadataValidationError, 'moov/models/components/imagemetadatavalidationerror.rb'
|
254
|
+
autoload :ImageUpdateRequestMultiPart, 'moov/models/components/imageupdaterequestmultipart.rb'
|
255
|
+
autoload :ImageUpdateRequestMultiPartImage, 'moov/models/components/imageupdaterequestmultipart_image.rb'
|
256
|
+
autoload :ImageUploadRequestMultiPart, 'moov/models/components/imageuploadrequestmultipart.rb'
|
257
|
+
autoload :ImageUploadRequestMultiPartImage, 'moov/models/components/imageuploadrequestmultipart_image.rb'
|
252
258
|
autoload :IncurredFee, 'moov/models/components/incurredfee.rb'
|
253
259
|
autoload :IndividualName, 'moov/models/components/individualname.rb'
|
254
260
|
autoload :IndividualNameError, 'moov/models/components/individualnameerror.rb'
|
@@ -542,6 +548,7 @@ module Moov
|
|
542
548
|
autoload :Kind, 'moov/models/components/kind.rb'
|
543
549
|
autoload :Logo, 'moov/models/components/logo.rb'
|
544
550
|
autoload :Manual, 'moov/models/components/manual.rb'
|
551
|
+
autoload :Metadata, 'moov/models/components/metadata.rb'
|
545
552
|
autoload :Phone, 'moov/models/components/phone.rb'
|
546
553
|
autoload :PullPaymentMethodID, 'moov/models/components/pullpaymentmethodid.rb'
|
547
554
|
autoload :PullPaymentMethodIDUnion, 'moov/models/components/pullpaymentmethodid_union.rb'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Errors
|
10
|
+
|
11
|
+
|
12
|
+
class ImageRequestValidationError < StandardError
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :image, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('image') } }
|
18
|
+
|
19
|
+
field :metadata, Crystalline::Nilable.new(Models::Components::ImageMetadataValidationError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('metadata') } }
|
20
|
+
# Raw HTTP response; suitable for custom response parsing
|
21
|
+
field :raw_response, Crystalline::Nilable.new(::Faraday::Response), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('-') } }
|
22
|
+
|
23
|
+
sig { params(image: T.nilable(::String), metadata: T.nilable(Models::Components::ImageMetadataValidationError), raw_response: T.nilable(::Faraday::Response)).void }
|
24
|
+
def initialize(image: nil, metadata: nil, raw_response: nil)
|
25
|
+
@image = image
|
26
|
+
@metadata = metadata
|
27
|
+
@raw_response = raw_response
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
31
|
+
def ==(other)
|
32
|
+
return false unless other.is_a? self.class
|
33
|
+
return false unless @image == other.image
|
34
|
+
return false unless @metadata == other.metadata
|
35
|
+
return false unless @raw_response == other.raw_response
|
36
|
+
true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Errors::ImageRequestValidationError
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Errors::ImageRequestValidationError
|
11
|
+
def image(); end
|
12
|
+
def image=(str_); end
|
13
|
+
def metadata(); end
|
14
|
+
def metadata=(str_); end
|
15
|
+
def raw_response(); end
|
16
|
+
def raw_response=(str_); end
|
17
|
+
end
|
data/lib/moov/models/errors.rb
CHANGED
@@ -23,6 +23,7 @@ module Moov
|
|
23
23
|
autoload :FileUploadValidationError, 'moov/models/errors/fileuploadvalidationerror.rb'
|
24
24
|
autoload :FileValidationError, 'moov/models/errors/filevalidationerror.rb'
|
25
25
|
autoload :GenericError, 'moov/models/errors/genericerror.rb'
|
26
|
+
autoload :ImageRequestValidationError, 'moov/models/errors/imagerequestvalidationerror.rb'
|
26
27
|
autoload :LinkApplePayError, 'moov/models/errors/linkapplepayerror.rb'
|
27
28
|
autoload :LinkCardError, 'moov/models/errors/linkcarderror.rb'
|
28
29
|
autoload :ListTransfersValidationError, 'moov/models/errors/listtransfersvalidationerror.rb'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Operations
|
10
|
+
|
11
|
+
|
12
|
+
class UpdateImageRequest
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :account_id, ::String, { 'path_param': { 'field_name': 'accountID', 'style': 'simple', 'explode': false } }
|
18
|
+
|
19
|
+
field :image_id, ::String, { 'path_param': { 'field_name': 'imageID', 'style': 'simple', 'explode': false } }
|
20
|
+
|
21
|
+
field :image_update_request_multi_part, Models::Components::ImageUpdateRequestMultiPart, { 'request': { 'media_type': 'multipart/form-data' } }
|
22
|
+
# Specify an API version.
|
23
|
+
#
|
24
|
+
# API versioning follows the format `vYYYY.QQ.BB`, where
|
25
|
+
# - `YYYY` is the year
|
26
|
+
# - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
27
|
+
# - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
28
|
+
# - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
29
|
+
#
|
30
|
+
# The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
31
|
+
field :x_moov_version, Crystalline::Nilable.new(::String), { 'header': { 'field_name': 'x-moov-version', 'style': 'simple', 'explode': false } }
|
32
|
+
|
33
|
+
sig { params(account_id: ::String, image_id: ::String, image_update_request_multi_part: Models::Components::ImageUpdateRequestMultiPart, x_moov_version: T.nilable(::String)).void }
|
34
|
+
def initialize(account_id:, image_id:, image_update_request_multi_part:, x_moov_version: 'v2024.01.00')
|
35
|
+
@account_id = account_id
|
36
|
+
@image_id = image_id
|
37
|
+
@image_update_request_multi_part = image_update_request_multi_part
|
38
|
+
@x_moov_version = x_moov_version
|
39
|
+
end
|
40
|
+
|
41
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
42
|
+
def ==(other)
|
43
|
+
return false unless other.is_a? self.class
|
44
|
+
return false unless @account_id == other.account_id
|
45
|
+
return false unless @image_id == other.image_id
|
46
|
+
return false unless @image_update_request_multi_part == other.image_update_request_multi_part
|
47
|
+
return false unless @x_moov_version == other.x_moov_version
|
48
|
+
true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Operations::UpdateImageRequest
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Operations::UpdateImageRequest
|
11
|
+
def account_id(); end
|
12
|
+
def account_id=(str_); end
|
13
|
+
def image_id(); end
|
14
|
+
def image_id=(str_); end
|
15
|
+
def image_update_request_multi_part(); end
|
16
|
+
def image_update_request_multi_part=(str_); end
|
17
|
+
def x_moov_version(); end
|
18
|
+
def x_moov_version=(str_); end
|
19
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Operations
|
10
|
+
|
11
|
+
|
12
|
+
class UpdateImageResponse
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# HTTP response content type for this operation
|
17
|
+
field :content_type, ::String
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# Raw HTTP response; suitable for custom response parsing
|
21
|
+
field :raw_response, ::Faraday::Response
|
22
|
+
|
23
|
+
field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
|
24
|
+
# The request completed successfully.
|
25
|
+
field :image_metadata, Crystalline::Nilable.new(Models::Components::ImageMetadata)
|
26
|
+
|
27
|
+
sig { params(content_type: ::String, status_code: ::Integer, raw_response: ::Faraday::Response, headers: T::Hash[Symbol, T::Array[::String]], image_metadata: T.nilable(Models::Components::ImageMetadata)).void }
|
28
|
+
def initialize(content_type:, status_code:, raw_response:, headers:, image_metadata: nil)
|
29
|
+
@content_type = content_type
|
30
|
+
@status_code = status_code
|
31
|
+
@raw_response = raw_response
|
32
|
+
@headers = headers
|
33
|
+
@image_metadata = image_metadata
|
34
|
+
end
|
35
|
+
|
36
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
37
|
+
def ==(other)
|
38
|
+
return false unless other.is_a? self.class
|
39
|
+
return false unless @content_type == other.content_type
|
40
|
+
return false unless @status_code == other.status_code
|
41
|
+
return false unless @raw_response == other.raw_response
|
42
|
+
return false unless @headers == other.headers
|
43
|
+
return false unless @image_metadata == other.image_metadata
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Operations::UpdateImageResponse
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Operations::UpdateImageResponse
|
11
|
+
def content_type(); end
|
12
|
+
def content_type=(str_); end
|
13
|
+
def status_code(); end
|
14
|
+
def status_code=(str_); end
|
15
|
+
def raw_response(); end
|
16
|
+
def raw_response=(str_); end
|
17
|
+
def headers(); end
|
18
|
+
def headers=(str_); end
|
19
|
+
def image_metadata(); end
|
20
|
+
def image_metadata=(str_); end
|
21
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Operations
|
10
|
+
|
11
|
+
|
12
|
+
class UploadImageRequest
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
|
17
|
+
field :account_id, ::String, { 'path_param': { 'field_name': 'accountID', 'style': 'simple', 'explode': false } }
|
18
|
+
|
19
|
+
field :image_upload_request_multi_part, Models::Components::ImageUploadRequestMultiPart, { 'request': { 'media_type': 'multipart/form-data' } }
|
20
|
+
# Specify an API version.
|
21
|
+
#
|
22
|
+
# API versioning follows the format `vYYYY.QQ.BB`, where
|
23
|
+
# - `YYYY` is the year
|
24
|
+
# - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
25
|
+
# - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
26
|
+
# - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
27
|
+
#
|
28
|
+
# The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
29
|
+
field :x_moov_version, Crystalline::Nilable.new(::String), { 'header': { 'field_name': 'x-moov-version', 'style': 'simple', 'explode': false } }
|
30
|
+
|
31
|
+
sig { params(account_id: ::String, image_upload_request_multi_part: Models::Components::ImageUploadRequestMultiPart, x_moov_version: T.nilable(::String)).void }
|
32
|
+
def initialize(account_id:, image_upload_request_multi_part:, x_moov_version: 'v2024.01.00')
|
33
|
+
@account_id = account_id
|
34
|
+
@image_upload_request_multi_part = image_upload_request_multi_part
|
35
|
+
@x_moov_version = x_moov_version
|
36
|
+
end
|
37
|
+
|
38
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
39
|
+
def ==(other)
|
40
|
+
return false unless other.is_a? self.class
|
41
|
+
return false unless @account_id == other.account_id
|
42
|
+
return false unless @image_upload_request_multi_part == other.image_upload_request_multi_part
|
43
|
+
return false unless @x_moov_version == other.x_moov_version
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Operations::UploadImageRequest
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Operations::UploadImageRequest
|
11
|
+
def account_id(); end
|
12
|
+
def account_id=(str_); end
|
13
|
+
def image_upload_request_multi_part(); end
|
14
|
+
def image_upload_request_multi_part=(str_); end
|
15
|
+
def x_moov_version(); end
|
16
|
+
def x_moov_version=(str_); end
|
17
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module Moov
|
8
|
+
module Models
|
9
|
+
module Operations
|
10
|
+
|
11
|
+
|
12
|
+
class UploadImageResponse
|
13
|
+
extend T::Sig
|
14
|
+
include Crystalline::MetadataFields
|
15
|
+
|
16
|
+
# HTTP response content type for this operation
|
17
|
+
field :content_type, ::String
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# Raw HTTP response; suitable for custom response parsing
|
21
|
+
field :raw_response, ::Faraday::Response
|
22
|
+
|
23
|
+
field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
|
24
|
+
# The resource was successfully created.
|
25
|
+
field :image_metadata, Crystalline::Nilable.new(Models::Components::ImageMetadata)
|
26
|
+
|
27
|
+
sig { params(content_type: ::String, status_code: ::Integer, raw_response: ::Faraday::Response, headers: T::Hash[Symbol, T::Array[::String]], image_metadata: T.nilable(Models::Components::ImageMetadata)).void }
|
28
|
+
def initialize(content_type:, status_code:, raw_response:, headers:, image_metadata: nil)
|
29
|
+
@content_type = content_type
|
30
|
+
@status_code = status_code
|
31
|
+
@raw_response = raw_response
|
32
|
+
@headers = headers
|
33
|
+
@image_metadata = image_metadata
|
34
|
+
end
|
35
|
+
|
36
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
37
|
+
def ==(other)
|
38
|
+
return false unless other.is_a? self.class
|
39
|
+
return false unless @content_type == other.content_type
|
40
|
+
return false unless @status_code == other.status_code
|
41
|
+
return false unless @raw_response == other.raw_response
|
42
|
+
return false unless @headers == other.headers
|
43
|
+
return false unless @image_metadata == other.image_metadata
|
44
|
+
true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
5
|
+
class Moov::Models::Operations::UploadImageResponse
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class Moov::Models::Operations::UploadImageResponse
|
11
|
+
def content_type(); end
|
12
|
+
def content_type=(str_); end
|
13
|
+
def status_code(); end
|
14
|
+
def status_code=(str_); end
|
15
|
+
def raw_response(); end
|
16
|
+
def raw_response=(str_); end
|
17
|
+
def headers(); end
|
18
|
+
def headers=(str_); end
|
19
|
+
def image_metadata(); end
|
20
|
+
def image_metadata=(str_); end
|
21
|
+
end
|
@@ -292,6 +292,8 @@ module Moov
|
|
292
292
|
autoload :UpdateCardResponse, 'moov/models/operations/updatecard_response.rb'
|
293
293
|
autoload :UpdateDisputeEvidenceRequest, 'moov/models/operations/updatedisputeevidence_request.rb'
|
294
294
|
autoload :UpdateDisputeEvidenceResponse, 'moov/models/operations/updatedisputeevidence_response.rb'
|
295
|
+
autoload :UpdateImageRequest, 'moov/models/operations/updateimage_request.rb'
|
296
|
+
autoload :UpdateImageResponse, 'moov/models/operations/updateimage_response.rb'
|
295
297
|
autoload :UpdateIssuedCardRequest, 'moov/models/operations/updateissuedcard_request.rb'
|
296
298
|
autoload :UpdateIssuedCardResponse, 'moov/models/operations/updateissuedcard_response.rb'
|
297
299
|
autoload :UpdatePaymentLinkRequest, 'moov/models/operations/updatepaymentlink_request.rb'
|
@@ -316,6 +318,8 @@ module Moov
|
|
316
318
|
autoload :UploadDisputeEvidenceTextResponse, 'moov/models/operations/uploaddisputeevidencetext_response.rb'
|
317
319
|
autoload :UploadFileRequest, 'moov/models/operations/uploadfile_request.rb'
|
318
320
|
autoload :UploadFileResponse, 'moov/models/operations/uploadfile_response.rb'
|
321
|
+
autoload :UploadImageRequest, 'moov/models/operations/uploadimage_request.rb'
|
322
|
+
autoload :UploadImageResponse, 'moov/models/operations/uploadimage_response.rb'
|
319
323
|
autoload :UpsertBrandRequest, 'moov/models/operations/upsertbrand_request.rb'
|
320
324
|
autoload :UpsertBrandResponse, 'moov/models/operations/upsertbrand_response.rb'
|
321
325
|
autoload :UpsertUnderwritingRequest, 'moov/models/operations/upsertunderwriting_request.rb'
|
@@ -95,9 +95,9 @@ module Moov
|
|
95
95
|
@globals = globals.nil? ? {} : globals
|
96
96
|
@language = 'ruby'
|
97
97
|
@openapi_doc_version = 'latest'
|
98
|
-
@sdk_version = '0.
|
99
|
-
@gen_version = '2.
|
100
|
-
@user_agent = 'speakeasy-sdk/ruby 0.
|
98
|
+
@sdk_version = '0.2.0'
|
99
|
+
@gen_version = '2.727.4'
|
100
|
+
@user_agent = 'speakeasy-sdk/ruby 0.2.0 2.727.4 latest moov_ruby'
|
101
101
|
end
|
102
102
|
|
103
103
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moov_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Speakeasy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-10-
|
11
|
+
date: 2025-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -719,6 +719,18 @@ files:
|
|
719
719
|
- lib/moov/models/components/guestprofile.rbi
|
720
720
|
- lib/moov/models/components/imagemetadata.rb
|
721
721
|
- lib/moov/models/components/imagemetadata.rbi
|
722
|
+
- lib/moov/models/components/imagemetadatarequest.rb
|
723
|
+
- lib/moov/models/components/imagemetadatarequest.rbi
|
724
|
+
- lib/moov/models/components/imagemetadatavalidationerror.rb
|
725
|
+
- lib/moov/models/components/imagemetadatavalidationerror.rbi
|
726
|
+
- lib/moov/models/components/imageupdaterequestmultipart.rb
|
727
|
+
- lib/moov/models/components/imageupdaterequestmultipart.rbi
|
728
|
+
- lib/moov/models/components/imageupdaterequestmultipart_image.rb
|
729
|
+
- lib/moov/models/components/imageupdaterequestmultipart_image.rbi
|
730
|
+
- lib/moov/models/components/imageuploadrequestmultipart.rb
|
731
|
+
- lib/moov/models/components/imageuploadrequestmultipart.rbi
|
732
|
+
- lib/moov/models/components/imageuploadrequestmultipart_image.rb
|
733
|
+
- lib/moov/models/components/imageuploadrequestmultipart_image.rbi
|
722
734
|
- lib/moov/models/components/incurredfee.rb
|
723
735
|
- lib/moov/models/components/incurredfee.rbi
|
724
736
|
- lib/moov/models/components/individualname.rb
|
@@ -801,6 +813,8 @@ files:
|
|
801
813
|
- lib/moov/models/components/manualtermsofservice.rbi
|
802
814
|
- lib/moov/models/components/manualtermsofserviceupdate.rb
|
803
815
|
- lib/moov/models/components/manualtermsofserviceupdate.rbi
|
816
|
+
- lib/moov/models/components/metadata.rb
|
817
|
+
- lib/moov/models/components/metadata.rbi
|
804
818
|
- lib/moov/models/components/microdepositstatus.rb
|
805
819
|
- lib/moov/models/components/microdepositstatus.rbi
|
806
820
|
- lib/moov/models/components/minimumcommitment.rb
|
@@ -1348,6 +1362,8 @@ files:
|
|
1348
1362
|
- lib/moov/models/errors/filevalidationerror.rbi
|
1349
1363
|
- lib/moov/models/errors/genericerror.rb
|
1350
1364
|
- lib/moov/models/errors/genericerror.rbi
|
1365
|
+
- lib/moov/models/errors/imagerequestvalidationerror.rb
|
1366
|
+
- lib/moov/models/errors/imagerequestvalidationerror.rbi
|
1351
1367
|
- lib/moov/models/errors/linkapplepayerror.rb
|
1352
1368
|
- lib/moov/models/errors/linkapplepayerror.rbi
|
1353
1369
|
- lib/moov/models/errors/linkcarderror.rb
|
@@ -1977,6 +1993,10 @@ files:
|
|
1977
1993
|
- lib/moov/models/operations/updatedisputeevidence_request.rbi
|
1978
1994
|
- lib/moov/models/operations/updatedisputeevidence_response.rb
|
1979
1995
|
- lib/moov/models/operations/updatedisputeevidence_response.rbi
|
1996
|
+
- lib/moov/models/operations/updateimage_request.rb
|
1997
|
+
- lib/moov/models/operations/updateimage_request.rbi
|
1998
|
+
- lib/moov/models/operations/updateimage_response.rb
|
1999
|
+
- lib/moov/models/operations/updateimage_response.rbi
|
1980
2000
|
- lib/moov/models/operations/updateissuedcard_request.rb
|
1981
2001
|
- lib/moov/models/operations/updateissuedcard_request.rbi
|
1982
2002
|
- lib/moov/models/operations/updateissuedcard_response.rb
|
@@ -2025,6 +2045,10 @@ files:
|
|
2025
2045
|
- lib/moov/models/operations/uploadfile_request.rbi
|
2026
2046
|
- lib/moov/models/operations/uploadfile_response.rb
|
2027
2047
|
- lib/moov/models/operations/uploadfile_response.rbi
|
2048
|
+
- lib/moov/models/operations/uploadimage_request.rb
|
2049
|
+
- lib/moov/models/operations/uploadimage_request.rbi
|
2050
|
+
- lib/moov/models/operations/uploadimage_response.rb
|
2051
|
+
- lib/moov/models/operations/uploadimage_response.rbi
|
2028
2052
|
- lib/moov/models/operations/upsertbrand_request.rb
|
2029
2053
|
- lib/moov/models/operations/upsertbrand_request.rbi
|
2030
2054
|
- lib/moov/models/operations/upsertbrand_response.rb
|