moov_ruby 26.10.0.pre.dev.7 → 26.10.0.pre.dev.9
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/card_issuing.rb +538 -0
- data/lib/moov/files.rb +186 -0
- data/lib/moov/invoices.rb +180 -0
- data/lib/moov/issuing_transactions.rb +246 -0
- data/lib/moov/models/components/applicationscope.rb +1 -0
- data/lib/moov/models/components/authorizationsimulationasyncresponse.rb +32 -0
- data/lib/moov/models/components/authorizationsimulationasyncresponse.rbi +13 -0
- data/lib/moov/models/components/bankaccount.rb +7 -2
- data/lib/moov/models/components/bankaccount.rbi +2 -0
- data/lib/moov/models/components/bankaccountpayload.rb +7 -2
- data/lib/moov/models/components/bankaccountpayload.rbi +2 -0
- data/lib/moov/models/components/capturestatus.rb +1 -0
- data/lib/moov/models/components/cardpaymentrefundprocessingdetails.rb +6 -2
- data/lib/moov/models/components/cardpaymentrefundprocessingdetails.rbi +2 -0
- data/lib/moov/models/components/createauthorizationsimulation.rb +40 -0
- data/lib/moov/models/components/createauthorizationsimulation.rbi +17 -0
- data/lib/moov/models/components/{createcancellation.rb → createclearingsimulation.rb} +5 -7
- data/lib/moov/models/components/{createcancellation.rbi → createclearingsimulation.rbi} +2 -2
- data/lib/moov/models/components/createdtransfer.rb +2 -1
- data/lib/moov/models/components/createinvoice.rb +14 -2
- data/lib/moov/models/components/createinvoice.rbi +6 -0
- data/lib/moov/models/components/createinvoicenotification.rb +32 -0
- data/lib/moov/models/components/createinvoicenotification.rbi +13 -0
- data/lib/moov/models/components/createtransfer.rb +6 -2
- data/lib/moov/models/components/createtransfer.rbi +2 -0
- data/lib/moov/models/components/createtransferdestination.rb +2 -14
- data/lib/moov/models/components/createtransferdestination.rbi +0 -6
- data/lib/moov/models/components/createtransferrailoptions.rb +48 -0
- data/lib/moov/models/components/createtransferrailoptions.rbi +21 -0
- data/lib/moov/models/components/createtransferresponse.rb +27 -0
- data/lib/moov/models/components/createtransferresponse.rbi +11 -0
- data/lib/moov/models/components/createtransfersource.rb +2 -10
- data/lib/moov/models/components/createtransfersource.rbi +0 -4
- data/lib/moov/models/components/disbursementpaymentmethodtype.rb +1 -0
- data/lib/moov/models/components/incurredfee.rb +6 -2
- data/lib/moov/models/components/incurredfee.rbi +2 -0
- data/lib/moov/models/components/invoice.rb +6 -2
- data/lib/moov/models/components/invoice.rbi +2 -0
- data/lib/moov/models/components/invoicenotificationlimitedchannel.rb +36 -0
- data/lib/moov/models/components/invoicenotificationlimitedchannel.rbi +15 -0
- data/lib/moov/models/components/invoicepaymentoptions.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptions.rbi +17 -0
- data/lib/moov/models/components/invoicepaymentoptionserror.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptionserror.rbi +17 -0
- data/lib/moov/models/components/invoicepaymentoptionsupdate.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptionsupdate.rbi +17 -0
- data/lib/moov/models/components/issuedcardactivity.rb +78 -0
- data/lib/moov/models/components/issuedcardactivity.rbi +33 -0
- data/lib/moov/models/components/{wirecreditpaymentmethod_paymentmethodtype.rb → notificationchannel.rb} +2 -2
- data/lib/moov/models/components/{wirefailurecode.rbi → notificationchannel.rbi} +2 -2
- data/lib/moov/models/components/paymentmethodsbankaccount.rb +7 -2
- data/lib/moov/models/components/paymentmethodsbankaccount.rbi +2 -0
- data/lib/moov/models/components/paymentmethodtype.rb +0 -1
- data/lib/moov/models/components/product.rb +1 -1
- data/lib/moov/models/components/productrequest.rb +1 -1
- data/lib/moov/models/components/pushtocardoptions.rb +6 -2
- data/lib/moov/models/components/pushtocardoptions.rbi +2 -0
- data/lib/moov/models/components/riskverificationoutcome.rb +23 -0
- data/lib/moov/models/components/riskverificationoutcome.rbi +11 -0
- data/lib/moov/models/components/simulationissuingmerchantdata.rb +56 -0
- data/lib/moov/models/components/simulationissuingmerchantdata.rbi +25 -0
- data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rb +56 -0
- data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rbi +25 -0
- data/lib/moov/models/components/transfer.rb +2 -1
- data/lib/moov/models/components/transferauthorization.rb +9 -2
- data/lib/moov/models/components/transferauthorization.rbi +2 -0
- data/lib/moov/models/components/transferoptions.rb +3 -3
- data/lib/moov/models/components/transferpaymentmethodsbankaccount.rb +7 -2
- data/lib/moov/models/components/transferpaymentmethodsbankaccount.rbi +2 -0
- data/lib/moov/models/components/transferpaymentmethodtype.rb +0 -1
- data/lib/moov/models/components/transferprocessingdetails.rb +2 -6
- data/lib/moov/models/components/transferprocessingdetails.rbi +0 -2
- data/lib/moov/models/components/transferrailoptions.rb +2 -6
- data/lib/moov/models/components/transferrailoptions.rbi +0 -2
- data/lib/moov/models/components/transfertype.rb +0 -1
- data/lib/moov/models/components/updateinvoice.rb +6 -2
- data/lib/moov/models/components/updateinvoice.rbi +2 -0
- data/lib/moov/models/components/wallettransactiontype.rb +0 -1
- data/lib/moov/models/components/webhookdatatransferstatus.rb +1 -0
- data/lib/moov/models/components.rb +15 -10
- data/lib/moov/models/errors/authorizationsimulationvalidationerror.rb +44 -0
- data/lib/moov/models/errors/authorizationsimulationvalidationerror.rbi +19 -0
- data/lib/moov/models/errors/clearingsimulationvalidationerror.rb +36 -0
- data/lib/moov/models/errors/clearingsimulationvalidationerror.rbi +15 -0
- data/lib/moov/models/errors/createinvoiceerror.rb +14 -2
- data/lib/moov/models/errors/createinvoiceerror.rbi +6 -0
- data/lib/moov/models/errors/invoicenotificationerror.rb +36 -0
- data/lib/moov/models/errors/invoicenotificationerror.rbi +15 -0
- data/lib/moov/models/errors/invoicenotificationratelimitederror.rb +44 -0
- data/lib/moov/models/errors/invoicenotificationratelimitederror.rbi +19 -0
- data/lib/moov/models/errors/transfer_error.rb +2 -1
- data/lib/moov/models/errors/updateinvoiceerror.rb +6 -2
- data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -0
- data/lib/moov/models/errors.rb +4 -0
- data/lib/moov/models/operations/createauthorizationsimulation_request.rb +36 -0
- data/lib/moov/models/operations/createauthorizationsimulation_request.rbi +15 -0
- data/lib/moov/models/operations/createauthorizationsimulation_response.rb +52 -0
- data/lib/moov/models/operations/createauthorizationsimulation_response.rbi +23 -0
- data/lib/moov/models/operations/createclearingsimulation_request.rb +40 -0
- data/lib/moov/models/operations/createclearingsimulation_request.rbi +17 -0
- data/lib/moov/models/operations/createclearingsimulation_response.rb +52 -0
- data/lib/moov/models/operations/createclearingsimulation_response.rbi +23 -0
- data/lib/moov/models/operations/createinvoicenotification_request.rb +40 -0
- data/lib/moov/models/operations/createinvoicenotification_request.rbi +17 -0
- data/lib/moov/models/operations/{createcancellation_response.rb → createinvoicenotification_response.rb} +3 -7
- data/lib/moov/models/operations/{createcancellation_response.rbi → createinvoicenotification_response.rbi} +2 -4
- data/lib/moov/models/operations/createreversalsimulation_request.rb +36 -0
- data/lib/moov/models/operations/createreversalsimulation_request.rbi +15 -0
- data/lib/moov/models/operations/createreversalsimulation_response.rb +52 -0
- data/lib/moov/models/operations/createreversalsimulation_response.rbi +23 -0
- data/lib/moov/models/operations/createtransfer_response.rb +5 -5
- data/lib/moov/models/operations/createtransfer_response.rbi +2 -2
- data/lib/moov/models/operations/downloadfile_request.rb +36 -0
- data/lib/moov/models/operations/downloadfile_request.rbi +15 -0
- data/lib/moov/models/operations/downloadfile_response.rb +64 -0
- data/lib/moov/models/operations/downloadfile_response.rbi +29 -0
- data/lib/moov/models/operations/getissuedcardactivity_request.rb +36 -0
- data/lib/moov/models/operations/getissuedcardactivity_request.rbi +15 -0
- data/lib/moov/models/operations/getissuedcardactivity_response.rb +48 -0
- data/lib/moov/models/operations/getissuedcardactivity_response.rbi +21 -0
- data/lib/moov/models/operations/getpaymentmethod_response.rb +2 -2
- data/lib/moov/models/operations/initiaterefund_request.rb +1 -1
- data/lib/moov/models/operations/listissuedcardactivity_request.rb +60 -0
- data/lib/moov/models/operations/listissuedcardactivity_request.rbi +27 -0
- data/lib/moov/models/operations/listissuedcardactivity_response.rb +48 -0
- data/lib/moov/models/operations/listissuedcardactivity_response.rbi +21 -0
- data/lib/moov/models/operations/listpaymentmethods_response.rb +2 -2
- data/lib/moov/models/operations/listtransfers_request.rb +6 -2
- data/lib/moov/models/operations/listtransfers_request.rbi +2 -0
- data/lib/moov/models/operations.rb +14 -2
- data/lib/moov/payment_methods.rb +2 -2
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/transfers.rb +3 -156
- metadata +68 -26
- data/lib/moov/models/components/createtransferdestinationwire.rb +0 -32
- data/lib/moov/models/components/createtransferdestinationwire.rbi +0 -13
- data/lib/moov/models/components/wirecreditpaymentmethod.rb +0 -40
- data/lib/moov/models/components/wirecreditpaymentmethod.rbi +0 -17
- data/lib/moov/models/components/wirecreditpaymentmethod_paymentmethodtype.rbi +0 -11
- data/lib/moov/models/components/wirecredittransferpaymentmethod.rb +0 -40
- data/lib/moov/models/components/wirecredittransferpaymentmethod.rbi +0 -17
- data/lib/moov/models/components/wirecredittransferpaymentmethod_paymentmethodtype.rb +0 -18
- data/lib/moov/models/components/wirecredittransferpaymentmethod_paymentmethodtype.rbi +0 -11
- data/lib/moov/models/components/wirefailurecode.rb +0 -28
- data/lib/moov/models/components/wireoptions.rb +0 -32
- data/lib/moov/models/components/wireoptions.rbi +0 -13
- data/lib/moov/models/components/wiretransactionstatus.rb +0 -23
- data/lib/moov/models/components/wiretransactionstatus.rbi +0 -11
- data/lib/moov/models/components/wiretransferprocessingdetails.rb +0 -40
- data/lib/moov/models/components/wiretransferprocessingdetails.rbi +0 -17
- data/lib/moov/models/operations/createcancellation_request.rb +0 -40
- data/lib/moov/models/operations/createcancellation_request.rbi +0 -17
data/lib/moov/files.rb
CHANGED
|
@@ -452,5 +452,191 @@ module Moov
|
|
|
452
452
|
|
|
453
453
|
end
|
|
454
454
|
end
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
sig { params(account_id: ::String, file_id: ::String, timeout_ms: T.nilable(Integer), accept_header_override: T.nilable(String), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::DownloadFileResponse) }
|
|
458
|
+
def download(account_id:, file_id:, timeout_ms: nil, accept_header_override: nil, http_headers: nil)
|
|
459
|
+
# download - Download the contents of a file associated with a specific Moov account. Files reserved for
|
|
460
|
+
# internal Moov use are not available through this endpoint.
|
|
461
|
+
#
|
|
462
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
463
|
+
# you'll need to specify the `/accounts/{accountID}/files.download` scope.
|
|
464
|
+
request = Models::Operations::DownloadFileRequest.new(
|
|
465
|
+
account_id: account_id,
|
|
466
|
+
file_id: file_id
|
|
467
|
+
)
|
|
468
|
+
url, params = @sdk_configuration.get_server_details
|
|
469
|
+
base_url = Utils.template_url(url, params)
|
|
470
|
+
url = Utils.generate_url(
|
|
471
|
+
Models::Operations::DownloadFileRequest,
|
|
472
|
+
base_url,
|
|
473
|
+
'/accounts/{accountID}/files/{fileID}/contents',
|
|
474
|
+
request
|
|
475
|
+
)
|
|
476
|
+
headers = {}
|
|
477
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
478
|
+
headers['Accept'] = accept_header_override || 'text/plain; charset=utf-8;q=1, application/octet-stream;q=0.8, application/pdf;q=0.6, image/jpeg;q=0.4, image/png;q=0'
|
|
479
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
480
|
+
|
|
481
|
+
security = @sdk_configuration.security_source&.call
|
|
482
|
+
|
|
483
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
484
|
+
timeout ||= @sdk_configuration.timeout
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
connection = @sdk_configuration.client
|
|
488
|
+
|
|
489
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
490
|
+
config: @sdk_configuration,
|
|
491
|
+
base_url: base_url,
|
|
492
|
+
oauth2_scopes: nil,
|
|
493
|
+
operation_id: 'downloadFile',
|
|
494
|
+
security_source: @sdk_configuration.security_source
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
498
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
begin
|
|
502
|
+
http_response = T.must(connection).get(url) do |req|
|
|
503
|
+
req.headers.merge!(headers)
|
|
504
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
505
|
+
Utils.configure_request_security(req, security)
|
|
506
|
+
http_headers&.each do |key, value|
|
|
507
|
+
req.headers[key.to_s] = value
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
@sdk_configuration.hooks.before_request(
|
|
511
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
512
|
+
hook_ctx: hook_ctx
|
|
513
|
+
),
|
|
514
|
+
request: req
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
rescue StandardError => e
|
|
518
|
+
error = e
|
|
519
|
+
ensure
|
|
520
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
521
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
522
|
+
error: error,
|
|
523
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
524
|
+
hook_ctx: hook_ctx
|
|
525
|
+
),
|
|
526
|
+
response: http_response
|
|
527
|
+
)
|
|
528
|
+
else
|
|
529
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
530
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
531
|
+
hook_ctx: hook_ctx
|
|
532
|
+
),
|
|
533
|
+
response: http_response
|
|
534
|
+
)
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
if http_response.nil?
|
|
538
|
+
raise error if !error.nil?
|
|
539
|
+
raise 'no response'
|
|
540
|
+
end
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
544
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
545
|
+
if Utils.match_content_type(content_type, 'application/pdf')
|
|
546
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
547
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
548
|
+
hook_ctx: hook_ctx
|
|
549
|
+
),
|
|
550
|
+
response: http_response
|
|
551
|
+
)
|
|
552
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
553
|
+
|
|
554
|
+
return Models::Operations::DownloadFileResponse.new(
|
|
555
|
+
status_code: http_response.status,
|
|
556
|
+
content_type: content_type,
|
|
557
|
+
raw_response: http_response,
|
|
558
|
+
headers: http_response.headers,
|
|
559
|
+
two_hundred_application_pdf_bytes: T.unsafe(obj)
|
|
560
|
+
)
|
|
561
|
+
elsif Utils.match_content_type(content_type, 'image/png')
|
|
562
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
563
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
564
|
+
hook_ctx: hook_ctx
|
|
565
|
+
),
|
|
566
|
+
response: http_response
|
|
567
|
+
)
|
|
568
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
569
|
+
|
|
570
|
+
return Models::Operations::DownloadFileResponse.new(
|
|
571
|
+
status_code: http_response.status,
|
|
572
|
+
content_type: content_type,
|
|
573
|
+
raw_response: http_response,
|
|
574
|
+
headers: http_response.headers,
|
|
575
|
+
two_hundred_image_png_bytes: T.unsafe(obj)
|
|
576
|
+
)
|
|
577
|
+
elsif Utils.match_content_type(content_type, 'image/jpeg')
|
|
578
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
579
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
580
|
+
hook_ctx: hook_ctx
|
|
581
|
+
),
|
|
582
|
+
response: http_response
|
|
583
|
+
)
|
|
584
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
585
|
+
|
|
586
|
+
return Models::Operations::DownloadFileResponse.new(
|
|
587
|
+
status_code: http_response.status,
|
|
588
|
+
content_type: content_type,
|
|
589
|
+
raw_response: http_response,
|
|
590
|
+
headers: http_response.headers,
|
|
591
|
+
two_hundred_image_jpeg_bytes: T.unsafe(obj)
|
|
592
|
+
)
|
|
593
|
+
elsif Utils.match_content_type(content_type, 'text/plain; charset=utf-8')
|
|
594
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
595
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
596
|
+
hook_ctx: hook_ctx
|
|
597
|
+
),
|
|
598
|
+
response: http_response
|
|
599
|
+
)
|
|
600
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
601
|
+
|
|
602
|
+
return Models::Operations::DownloadFileResponse.new(
|
|
603
|
+
status_code: http_response.status,
|
|
604
|
+
content_type: content_type,
|
|
605
|
+
raw_response: http_response,
|
|
606
|
+
headers: http_response.headers,
|
|
607
|
+
two_hundred_text_plain_bytes: T.unsafe(obj)
|
|
608
|
+
)
|
|
609
|
+
elsif Utils.match_content_type(content_type, 'application/octet-stream')
|
|
610
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
611
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
612
|
+
hook_ctx: hook_ctx
|
|
613
|
+
),
|
|
614
|
+
response: http_response
|
|
615
|
+
)
|
|
616
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
617
|
+
|
|
618
|
+
return Models::Operations::DownloadFileResponse.new(
|
|
619
|
+
status_code: http_response.status,
|
|
620
|
+
content_type: content_type,
|
|
621
|
+
raw_response: http_response,
|
|
622
|
+
headers: http_response.headers,
|
|
623
|
+
two_hundred_application_octet_stream_bytes: T.unsafe(obj)
|
|
624
|
+
)
|
|
625
|
+
else
|
|
626
|
+
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'
|
|
627
|
+
end
|
|
628
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
|
629
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
630
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
631
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
632
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
633
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
634
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
635
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
636
|
+
else
|
|
637
|
+
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'
|
|
638
|
+
|
|
639
|
+
end
|
|
640
|
+
end
|
|
455
641
|
end
|
|
456
642
|
end
|
data/lib/moov/invoices.rb
CHANGED
|
@@ -766,6 +766,186 @@ module Moov
|
|
|
766
766
|
end
|
|
767
767
|
|
|
768
768
|
|
|
769
|
+
sig { params(create_invoice_notification: Models::Components::CreateInvoiceNotification, account_id: ::String, invoice_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::CreateInvoiceNotificationResponse) }
|
|
770
|
+
def create_invoice_notification(create_invoice_notification:, account_id:, invoice_id:, timeout_ms: nil, http_headers: nil)
|
|
771
|
+
# create_invoice_notification - Create a notification for an invoice, which resends the invoice email to the customer. The required
|
|
772
|
+
# `channels` body lists the channels to notify on; today only `email` is supported. Returns a 409
|
|
773
|
+
# if the invoice is not in `unpaid` or `overdue` status, or if the merchant or customer account has no
|
|
774
|
+
# email set.
|
|
775
|
+
#
|
|
776
|
+
# The request is all-or-nothing: if any requested channel is rate limited, nothing is sent. Each channel
|
|
777
|
+
# can be sent at most once every 24 hours, and not within 24 hours of the invoice being sent. A 429
|
|
778
|
+
# response lists the limited channels with `availableOn` and lists the `availableChannels` that can be
|
|
779
|
+
# sent in a new request.
|
|
780
|
+
#
|
|
781
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
782
|
+
# you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
783
|
+
request = Models::Operations::CreateInvoiceNotificationRequest.new(
|
|
784
|
+
account_id: account_id,
|
|
785
|
+
invoice_id: invoice_id,
|
|
786
|
+
create_invoice_notification: create_invoice_notification
|
|
787
|
+
)
|
|
788
|
+
url, params = @sdk_configuration.get_server_details
|
|
789
|
+
base_url = Utils.template_url(url, params)
|
|
790
|
+
url = Utils.generate_url(
|
|
791
|
+
Models::Operations::CreateInvoiceNotificationRequest,
|
|
792
|
+
base_url,
|
|
793
|
+
'/accounts/{accountID}/invoices/{invoiceID}/notifications',
|
|
794
|
+
request
|
|
795
|
+
)
|
|
796
|
+
headers = {}
|
|
797
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
798
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_invoice_notification, :json)
|
|
799
|
+
headers['content-type'] = req_content_type
|
|
800
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
801
|
+
|
|
802
|
+
if form && !form.empty?
|
|
803
|
+
body = Utils.encode_form(form)
|
|
804
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
805
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
806
|
+
else
|
|
807
|
+
body = data
|
|
808
|
+
end
|
|
809
|
+
headers['Accept'] = 'application/json'
|
|
810
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
811
|
+
|
|
812
|
+
security = @sdk_configuration.security_source&.call
|
|
813
|
+
|
|
814
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
815
|
+
timeout ||= @sdk_configuration.timeout
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
connection = @sdk_configuration.client
|
|
819
|
+
|
|
820
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
821
|
+
config: @sdk_configuration,
|
|
822
|
+
base_url: base_url,
|
|
823
|
+
oauth2_scopes: nil,
|
|
824
|
+
operation_id: 'createInvoiceNotification',
|
|
825
|
+
security_source: @sdk_configuration.security_source
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
829
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
begin
|
|
833
|
+
http_response = T.must(connection).post(url) do |req|
|
|
834
|
+
req.body = body
|
|
835
|
+
req.headers.merge!(headers)
|
|
836
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
837
|
+
Utils.configure_request_security(req, security)
|
|
838
|
+
http_headers&.each do |key, value|
|
|
839
|
+
req.headers[key.to_s] = value
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
@sdk_configuration.hooks.before_request(
|
|
843
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
844
|
+
hook_ctx: hook_ctx
|
|
845
|
+
),
|
|
846
|
+
request: req
|
|
847
|
+
)
|
|
848
|
+
end
|
|
849
|
+
rescue StandardError => e
|
|
850
|
+
error = e
|
|
851
|
+
ensure
|
|
852
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
853
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
854
|
+
error: error,
|
|
855
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
856
|
+
hook_ctx: hook_ctx
|
|
857
|
+
),
|
|
858
|
+
response: http_response
|
|
859
|
+
)
|
|
860
|
+
else
|
|
861
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
862
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
863
|
+
hook_ctx: hook_ctx
|
|
864
|
+
),
|
|
865
|
+
response: http_response
|
|
866
|
+
)
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
if http_response.nil?
|
|
870
|
+
raise error if !error.nil?
|
|
871
|
+
raise 'no response'
|
|
872
|
+
end
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
876
|
+
if Utils.match_status_code(http_response.status, ['204'])
|
|
877
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
878
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
879
|
+
hook_ctx: hook_ctx
|
|
880
|
+
),
|
|
881
|
+
response: http_response
|
|
882
|
+
)
|
|
883
|
+
return Models::Operations::CreateInvoiceNotificationResponse.new(
|
|
884
|
+
status_code: http_response.status,
|
|
885
|
+
content_type: content_type,
|
|
886
|
+
raw_response: http_response,
|
|
887
|
+
headers: {}
|
|
888
|
+
)
|
|
889
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404'])
|
|
890
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
891
|
+
elsif Utils.match_status_code(http_response.status, ['400', '409'])
|
|
892
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
893
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
894
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
895
|
+
hook_ctx: hook_ctx
|
|
896
|
+
),
|
|
897
|
+
response: http_response
|
|
898
|
+
)
|
|
899
|
+
response_data = http_response.env.response_body
|
|
900
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
901
|
+
obj.raw_response = http_response
|
|
902
|
+
raise obj
|
|
903
|
+
else
|
|
904
|
+
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'
|
|
905
|
+
end
|
|
906
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
907
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
908
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
909
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
910
|
+
hook_ctx: hook_ctx
|
|
911
|
+
),
|
|
912
|
+
response: http_response
|
|
913
|
+
)
|
|
914
|
+
response_data = http_response.env.response_body
|
|
915
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InvoiceNotificationError)
|
|
916
|
+
obj.raw_response = http_response
|
|
917
|
+
raise obj
|
|
918
|
+
else
|
|
919
|
+
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'
|
|
920
|
+
end
|
|
921
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
|
922
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
923
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
924
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
925
|
+
hook_ctx: hook_ctx
|
|
926
|
+
),
|
|
927
|
+
response: http_response
|
|
928
|
+
)
|
|
929
|
+
response_data = http_response.env.response_body
|
|
930
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InvoiceNotificationRateLimitedError)
|
|
931
|
+
obj.raw_response = http_response
|
|
932
|
+
raise obj
|
|
933
|
+
else
|
|
934
|
+
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'
|
|
935
|
+
end
|
|
936
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
937
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
938
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
939
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
940
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
941
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
942
|
+
else
|
|
943
|
+
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'
|
|
944
|
+
|
|
945
|
+
end
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
|
|
769
949
|
sig { params(create_invoice_payment: Models::Components::CreateInvoicePayment, account_id: ::String, invoice_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::CreateInvoicePaymentResponse) }
|
|
770
950
|
def create_invoice_payment(create_invoice_payment:, account_id:, invoice_id:, timeout_ms: nil, http_headers: nil)
|
|
771
951
|
# create_invoice_payment - Creates a payment resource to represent that an invoice was paid outside of the Moov platform.
|
|
@@ -41,6 +41,252 @@ module Moov
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
sig { params(request: Models::Operations::ListIssuedCardActivityRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListIssuedCardActivityResponse) }
|
|
45
|
+
def list_activity(request:, timeout_ms: nil, http_headers: nil)
|
|
46
|
+
# list_activity - List issued card activity associated with a Moov account.
|
|
47
|
+
#
|
|
48
|
+
# Activity includes authorizations and settlements in a single list.
|
|
49
|
+
#
|
|
50
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
51
|
+
# you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
|
52
|
+
url, params = @sdk_configuration.get_server_details
|
|
53
|
+
base_url = Utils.template_url(url, params)
|
|
54
|
+
url = Utils.generate_url(
|
|
55
|
+
Models::Operations::ListIssuedCardActivityRequest,
|
|
56
|
+
base_url,
|
|
57
|
+
'/issuing/{accountID}/activity',
|
|
58
|
+
request
|
|
59
|
+
)
|
|
60
|
+
headers = {}
|
|
61
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
62
|
+
query_params = Utils.get_query_params(Models::Operations::ListIssuedCardActivityRequest, request, nil)
|
|
63
|
+
headers['Accept'] = 'application/json'
|
|
64
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
65
|
+
|
|
66
|
+
security = @sdk_configuration.security_source&.call
|
|
67
|
+
|
|
68
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
69
|
+
timeout ||= @sdk_configuration.timeout
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
connection = @sdk_configuration.client
|
|
73
|
+
|
|
74
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
75
|
+
config: @sdk_configuration,
|
|
76
|
+
base_url: base_url,
|
|
77
|
+
oauth2_scopes: nil,
|
|
78
|
+
operation_id: 'listIssuedCardActivity',
|
|
79
|
+
security_source: @sdk_configuration.security_source
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
83
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
begin
|
|
87
|
+
http_response = T.must(connection).get(url) do |req|
|
|
88
|
+
req.headers.merge!(headers)
|
|
89
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
90
|
+
req.params = query_params
|
|
91
|
+
Utils.configure_request_security(req, security)
|
|
92
|
+
http_headers&.each do |key, value|
|
|
93
|
+
req.headers[key.to_s] = value
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
@sdk_configuration.hooks.before_request(
|
|
97
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
98
|
+
hook_ctx: hook_ctx
|
|
99
|
+
),
|
|
100
|
+
request: req
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
rescue StandardError => e
|
|
104
|
+
error = e
|
|
105
|
+
ensure
|
|
106
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
107
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
108
|
+
error: error,
|
|
109
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
110
|
+
hook_ctx: hook_ctx
|
|
111
|
+
),
|
|
112
|
+
response: http_response
|
|
113
|
+
)
|
|
114
|
+
else
|
|
115
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
116
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
117
|
+
hook_ctx: hook_ctx
|
|
118
|
+
),
|
|
119
|
+
response: http_response
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if http_response.nil?
|
|
124
|
+
raise error if !error.nil?
|
|
125
|
+
raise 'no response'
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
130
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
131
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
132
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
133
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
134
|
+
hook_ctx: hook_ctx
|
|
135
|
+
),
|
|
136
|
+
response: http_response
|
|
137
|
+
)
|
|
138
|
+
response_data = http_response.env.response_body
|
|
139
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::IssuedCardActivity))
|
|
140
|
+
response = Models::Operations::ListIssuedCardActivityResponse.new(
|
|
141
|
+
status_code: http_response.status,
|
|
142
|
+
content_type: content_type,
|
|
143
|
+
raw_response: http_response,
|
|
144
|
+
headers: http_response.headers,
|
|
145
|
+
issued_card_activities: T.unsafe(obj)
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
return response
|
|
149
|
+
else
|
|
150
|
+
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'
|
|
151
|
+
end
|
|
152
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '429'])
|
|
153
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
154
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
155
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
156
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
157
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
158
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
159
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
160
|
+
else
|
|
161
|
+
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'
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
sig { params(account_id: ::String, id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetIssuedCardActivityResponse) }
|
|
168
|
+
def get_activity(account_id:, id:, timeout_ms: nil, http_headers: nil)
|
|
169
|
+
# get_activity - Retrieve a single issued card activity associated with a Moov account.
|
|
170
|
+
#
|
|
171
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
172
|
+
# you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
|
173
|
+
request = Models::Operations::GetIssuedCardActivityRequest.new(
|
|
174
|
+
account_id: account_id,
|
|
175
|
+
id: id
|
|
176
|
+
)
|
|
177
|
+
url, params = @sdk_configuration.get_server_details
|
|
178
|
+
base_url = Utils.template_url(url, params)
|
|
179
|
+
url = Utils.generate_url(
|
|
180
|
+
Models::Operations::GetIssuedCardActivityRequest,
|
|
181
|
+
base_url,
|
|
182
|
+
'/issuing/{accountID}/activity/{id}',
|
|
183
|
+
request
|
|
184
|
+
)
|
|
185
|
+
headers = {}
|
|
186
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
187
|
+
headers['Accept'] = 'application/json'
|
|
188
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
189
|
+
|
|
190
|
+
security = @sdk_configuration.security_source&.call
|
|
191
|
+
|
|
192
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
193
|
+
timeout ||= @sdk_configuration.timeout
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
connection = @sdk_configuration.client
|
|
197
|
+
|
|
198
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
199
|
+
config: @sdk_configuration,
|
|
200
|
+
base_url: base_url,
|
|
201
|
+
oauth2_scopes: nil,
|
|
202
|
+
operation_id: 'getIssuedCardActivity',
|
|
203
|
+
security_source: @sdk_configuration.security_source
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
207
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
begin
|
|
211
|
+
http_response = T.must(connection).get(url) do |req|
|
|
212
|
+
req.headers.merge!(headers)
|
|
213
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
214
|
+
Utils.configure_request_security(req, security)
|
|
215
|
+
http_headers&.each do |key, value|
|
|
216
|
+
req.headers[key.to_s] = value
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
@sdk_configuration.hooks.before_request(
|
|
220
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
221
|
+
hook_ctx: hook_ctx
|
|
222
|
+
),
|
|
223
|
+
request: req
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
rescue StandardError => e
|
|
227
|
+
error = e
|
|
228
|
+
ensure
|
|
229
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
230
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
231
|
+
error: error,
|
|
232
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
233
|
+
hook_ctx: hook_ctx
|
|
234
|
+
),
|
|
235
|
+
response: http_response
|
|
236
|
+
)
|
|
237
|
+
else
|
|
238
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
239
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
240
|
+
hook_ctx: hook_ctx
|
|
241
|
+
),
|
|
242
|
+
response: http_response
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if http_response.nil?
|
|
247
|
+
raise error if !error.nil?
|
|
248
|
+
raise 'no response'
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
253
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
254
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
255
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
256
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
257
|
+
hook_ctx: hook_ctx
|
|
258
|
+
),
|
|
259
|
+
response: http_response
|
|
260
|
+
)
|
|
261
|
+
response_data = http_response.env.response_body
|
|
262
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::IssuedCardActivity)
|
|
263
|
+
response = Models::Operations::GetIssuedCardActivityResponse.new(
|
|
264
|
+
status_code: http_response.status,
|
|
265
|
+
content_type: content_type,
|
|
266
|
+
raw_response: http_response,
|
|
267
|
+
headers: http_response.headers,
|
|
268
|
+
issued_card_activity: T.unsafe(obj)
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
return response
|
|
272
|
+
else
|
|
273
|
+
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'
|
|
274
|
+
end
|
|
275
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
|
276
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
277
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
278
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
279
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
280
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
281
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
282
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
283
|
+
else
|
|
284
|
+
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'
|
|
285
|
+
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
|
|
44
290
|
sig { params(request: Models::Operations::ListIssuedCardAuthorizationsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListIssuedCardAuthorizationsResponse) }
|
|
45
291
|
def list_authorizations(request:, timeout_ms: nil, http_headers: nil)
|
|
46
292
|
# list_authorizations - List issued card authorizations associated with a Moov account.
|
|
@@ -27,6 +27,7 @@ module Moov
|
|
|
27
27
|
DOCUMENTS_READ = new('documents.read')
|
|
28
28
|
DOCUMENTS_WRITE = new('documents.write')
|
|
29
29
|
FED_READ = new('fed.read')
|
|
30
|
+
FILES_DOWNLOAD = new('files.download')
|
|
30
31
|
FILES_READ = new('files.read')
|
|
31
32
|
FILES_WRITE = new('files.write')
|
|
32
33
|
ISSUED_CARDS_READ = new('issued-cards.read')
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
class AuthorizationSimulationAsyncResponse
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :authorization_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('authorizationID'), required: true } }
|
|
17
|
+
|
|
18
|
+
sig { params(authorization_id: ::String).void }
|
|
19
|
+
def initialize(authorization_id:)
|
|
20
|
+
@authorization_id = authorization_id
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a? self.class
|
|
26
|
+
return false unless @authorization_id == other.authorization_id
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|