moov_ruby 0.0.0.pre.dev.29 → 0.0.0.pre.dev.31
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/issuing_transactions.rb +123 -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/authtokenrequest.rb +6 -2
- data/lib/moov/models/components/authtokenrequest.rbi +2 -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/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/createclearingsimulation.rb +32 -0
- data/lib/moov/models/components/createclearingsimulation.rbi +13 -0
- data/lib/moov/models/components/createdtransfer.rb +2 -1
- data/lib/moov/models/components/createinvoice.rb +6 -2
- data/lib/moov/models/components/createinvoice.rbi +2 -0
- 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/issuedcardactivity.rb +78 -0
- data/lib/moov/models/components/issuedcardactivity.rbi +33 -0
- data/lib/moov/models/components/issuedcardauthorization.rb +7 -2
- data/lib/moov/models/components/issuedcardauthorization.rbi +2 -0
- data/lib/moov/models/components/issuedcardauthorizationevent.rb +7 -2
- data/lib/moov/models/components/issuedcardauthorizationevent.rbi +2 -0
- data/lib/moov/models/components/issuingdeclinereason.rb +35 -0
- data/lib/moov/models/components/issuingdeclinereason.rbi +11 -0
- data/lib/moov/models/components/issuingmerchantdatavalidationerror.rb +56 -0
- data/lib/moov/models/components/issuingmerchantdatavalidationerror.rbi +25 -0
- data/lib/moov/models/components/oauth2clienttype.rb +23 -0
- data/lib/moov/models/components/oauth2clienttype.rbi +11 -0
- data/lib/moov/models/components/paymentmethodsbankaccount.rb +7 -2
- data/lib/moov/models/components/paymentmethodsbankaccount.rbi +2 -0
- data/lib/moov/models/components/product.rb +6 -2
- data/lib/moov/models/components/product.rbi +2 -0
- data/lib/moov/models/components/productrequest.rb +6 -2
- data/lib/moov/models/components/productrequest.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/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/transferevent.rb +48 -0
- data/lib/moov/models/components/transferevent.rbi +21 -0
- data/lib/moov/models/components/transfereventachdetails.rb +40 -0
- data/lib/moov/models/components/transfereventachdetails.rbi +17 -0
- data/lib/moov/models/components/transfereventauthorizationdetails.rb +40 -0
- data/lib/moov/models/components/transfereventauthorizationdetails.rbi +17 -0
- data/lib/moov/models/components/transfereventauthorizationstatus.rb +22 -0
- data/lib/moov/models/components/transfereventauthorizationstatus.rbi +11 -0
- data/lib/moov/models/components/transfereventcancellationdetails.rb +36 -0
- data/lib/moov/models/components/transfereventcancellationdetails.rbi +15 -0
- data/lib/moov/models/components/transfereventcapturedetails.rb +40 -0
- data/lib/moov/models/components/transfereventcapturedetails.rbi +17 -0
- data/lib/moov/models/components/transfereventcardpaymentdetails.rb +36 -0
- data/lib/moov/models/components/transfereventcardpaymentdetails.rbi +15 -0
- data/lib/moov/models/components/transfereventdetails.rb +88 -0
- data/lib/moov/models/components/transfereventdetails.rbi +41 -0
- data/lib/moov/models/components/transfereventdisputedetails.rb +46 -0
- data/lib/moov/models/components/transfereventdisputedetails.rbi +19 -0
- data/lib/moov/models/components/transfereventinstantbankcreditdetails.rb +36 -0
- data/lib/moov/models/components/transfereventinstantbankcreditdetails.rbi +15 -0
- data/lib/moov/models/components/transfereventpullfromcarddetails.rb +36 -0
- data/lib/moov/models/components/transfereventpullfromcarddetails.rbi +15 -0
- data/lib/moov/models/components/transfereventpushtocarddetails.rb +36 -0
- data/lib/moov/models/components/transfereventpushtocarddetails.rbi +15 -0
- data/lib/moov/models/components/transfereventrefunddetails.rb +44 -0
- data/lib/moov/models/components/transfereventrefunddetails.rbi +19 -0
- data/lib/moov/models/components/transfereventtransferdetails.rb +32 -0
- data/lib/moov/models/components/transfereventtransferdetails.rbi +13 -0
- data/lib/moov/models/components/transfereventtype.rb +34 -0
- data/lib/moov/models/components/transfereventtype.rbi +11 -0
- data/lib/moov/models/components/transfereventwallettransactiondetails.rb +48 -0
- data/lib/moov/models/components/transfereventwallettransactiondetails.rbi +21 -0
- data/lib/moov/models/components/transfereventwirecreditdetails.rb +36 -0
- data/lib/moov/models/components/transfereventwirecreditdetails.rbi +15 -0
- data/lib/moov/models/components/transferpaymentmethodsbankaccount.rb +7 -2
- data/lib/moov/models/components/transferpaymentmethodsbankaccount.rbi +2 -0
- data/lib/moov/models/components/webhookdatatransferstatus.rb +1 -0
- data/lib/moov/models/components.rb +25 -0
- 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 +6 -2
- data/lib/moov/models/errors/createinvoiceerror.rbi +2 -0
- data/lib/moov/models/errors/transfer_error.rb +2 -1
- data/lib/moov/models/errors.rb +2 -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/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/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/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/listtransferevents_request.rb +36 -0
- data/lib/moov/models/operations/listtransferevents_request.rbi +15 -0
- data/lib/moov/models/operations/listtransferevents_response.rb +48 -0
- data/lib/moov/models/operations/listtransferevents_response.rbi +21 -0
- 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 +12 -0
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/transfers.rb +125 -0
- metadata +80 -2
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
|
|
@@ -41,6 +41,129 @@ 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
|
+
|
|
44
167
|
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
168
|
def list_authorizations(request:, timeout_ms: nil, http_headers: nil)
|
|
46
169
|
# 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
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::AuthorizationSimulationAsyncResponse
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::AuthorizationSimulationAsyncResponse
|
|
11
|
+
def authorization_id(); end
|
|
12
|
+
def authorization_id=(str_); end
|
|
13
|
+
end
|
|
@@ -25,14 +25,17 @@ module Moov
|
|
|
25
25
|
field :scope, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('scope') }, 'form': { 'field_name': 'scope' } }
|
|
26
26
|
# The refresh_token returned alongside the access token being refreshed. Required when `grant_type` is `refresh_token`.
|
|
27
27
|
field :refresh_token, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('refresh_token') }, 'form': { 'field_name': 'refresh_token' } }
|
|
28
|
+
# The client type requesting a token. `device` and `service` clients do not require browser origin binding. Defaults to `web` when omitted. This field applies to the `client_credentials` grant; refreshed tokens keep the original client type.
|
|
29
|
+
field :client_type, Crystalline::Nilable.new(Models::Components::OAuth2ClientType), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('client_type'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::OAuth2ClientType, true) }, 'form': { 'field_name': 'client_type' } }
|
|
28
30
|
|
|
29
|
-
sig { params(grant_type: Models::Components::GrantType, client_id: T.nilable(::String), client_secret: T.nilable(::String), scope: T.nilable(::String), refresh_token: T.nilable(::String)).void }
|
|
30
|
-
def initialize(grant_type:, client_id: nil, client_secret: nil, scope: nil, refresh_token: nil)
|
|
31
|
+
sig { params(grant_type: Models::Components::GrantType, client_id: T.nilable(::String), client_secret: T.nilable(::String), scope: T.nilable(::String), refresh_token: T.nilable(::String), client_type: T.nilable(Models::Components::OAuth2ClientType)).void }
|
|
32
|
+
def initialize(grant_type:, client_id: nil, client_secret: nil, scope: nil, refresh_token: nil, client_type: nil)
|
|
31
33
|
@grant_type = grant_type
|
|
32
34
|
@client_id = client_id
|
|
33
35
|
@client_secret = client_secret
|
|
34
36
|
@scope = scope
|
|
35
37
|
@refresh_token = refresh_token
|
|
38
|
+
@client_type = client_type
|
|
36
39
|
end
|
|
37
40
|
|
|
38
41
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -43,6 +46,7 @@ module Moov
|
|
|
43
46
|
return false unless @client_secret == other.client_secret
|
|
44
47
|
return false unless @scope == other.scope
|
|
45
48
|
return false unless @refresh_token == other.refresh_token
|
|
49
|
+
return false unless @client_type == other.client_type
|
|
46
50
|
true
|
|
47
51
|
end
|
|
48
52
|
end
|
|
@@ -43,9 +43,12 @@ module Moov
|
|
|
43
43
|
#
|
|
44
44
|
# **NOTE: This field is only populated for Create BankAccount requests made with the `X-Wait-For` header.**
|
|
45
45
|
field :payment_methods, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::BasicPaymentMethod)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentMethods') } }
|
|
46
|
+
# The outcome of a requested risk-verification attempt. `notAttempted` when
|
|
47
|
+
# `requestRiskVerification` was not set, or the calling account was not allowlisted.
|
|
48
|
+
field :risk_verification_outcome, Crystalline::Nilable.new(Models::Components::RiskVerificationOutcome), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('riskVerificationOutcome'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::RiskVerificationOutcome, true) } }
|
|
46
49
|
|
|
47
|
-
sig { params(bank_account_id: ::String, fingerprint: ::String, status: Models::Components::BankAccountStatus, holder_name: ::String, holder_type: Models::Components::BankAccountHolderType, bank_name: ::String, bank_account_type: Models::Components::BankAccountType, routing_number: ::String, last_four_account_number: ::String, updated_on: ::DateTime, status_reason: T.nilable(Models::Components::BankAccountStatusReason), exception_details: T.nilable(Models::Components::BankAccountException), payment_methods: T.nilable(T::Array[Models::Components::BasicPaymentMethod])).void }
|
|
48
|
-
def initialize(bank_account_id:, fingerprint:, status:, holder_name:, holder_type:, bank_name:, bank_account_type:, routing_number:, last_four_account_number:, updated_on:, status_reason: nil, exception_details: nil, payment_methods: nil)
|
|
50
|
+
sig { params(bank_account_id: ::String, fingerprint: ::String, status: Models::Components::BankAccountStatus, holder_name: ::String, holder_type: Models::Components::BankAccountHolderType, bank_name: ::String, bank_account_type: Models::Components::BankAccountType, routing_number: ::String, last_four_account_number: ::String, updated_on: ::DateTime, status_reason: T.nilable(Models::Components::BankAccountStatusReason), exception_details: T.nilable(Models::Components::BankAccountException), payment_methods: T.nilable(T::Array[Models::Components::BasicPaymentMethod]), risk_verification_outcome: T.nilable(Models::Components::RiskVerificationOutcome)).void }
|
|
51
|
+
def initialize(bank_account_id:, fingerprint:, status:, holder_name:, holder_type:, bank_name:, bank_account_type:, routing_number:, last_four_account_number:, updated_on:, status_reason: nil, exception_details: nil, payment_methods: nil, risk_verification_outcome: nil)
|
|
49
52
|
@bank_account_id = bank_account_id
|
|
50
53
|
@fingerprint = fingerprint
|
|
51
54
|
@status = status
|
|
@@ -59,6 +62,7 @@ module Moov
|
|
|
59
62
|
@status_reason = status_reason
|
|
60
63
|
@exception_details = exception_details
|
|
61
64
|
@payment_methods = payment_methods
|
|
65
|
+
@risk_verification_outcome = risk_verification_outcome
|
|
62
66
|
end
|
|
63
67
|
|
|
64
68
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -77,6 +81,7 @@ module Moov
|
|
|
77
81
|
return false unless @status_reason == other.status_reason
|
|
78
82
|
return false unless @exception_details == other.exception_details
|
|
79
83
|
return false unless @payment_methods == other.payment_methods
|
|
84
|
+
return false unless @risk_verification_outcome == other.risk_verification_outcome
|
|
80
85
|
true
|
|
81
86
|
end
|
|
82
87
|
end
|
|
@@ -14,16 +14,21 @@ module Moov
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
field :account, Models::Components::BankAccountIntegration, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('account'), required: true } }
|
|
17
|
+
# Requests a synchronous risk-verification attempt on create or re-link. Only honored for
|
|
18
|
+
# allowlisted calling accounts; ignored otherwise.
|
|
19
|
+
field :request_risk_verification, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('requestRiskVerification') } }
|
|
17
20
|
|
|
18
|
-
sig { params(account: Models::Components::BankAccountIntegration).void }
|
|
19
|
-
def initialize(account:)
|
|
21
|
+
sig { params(account: Models::Components::BankAccountIntegration, request_risk_verification: T.nilable(T::Boolean)).void }
|
|
22
|
+
def initialize(account:, request_risk_verification: nil)
|
|
20
23
|
@account = account
|
|
24
|
+
@request_risk_verification = request_risk_verification
|
|
21
25
|
end
|
|
22
26
|
|
|
23
27
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
28
|
def ==(other)
|
|
25
29
|
return false unless other.is_a? self.class
|
|
26
30
|
return false unless @account == other.account
|
|
31
|
+
return false unless @request_risk_verification == other.request_risk_verification
|
|
27
32
|
true
|
|
28
33
|
end
|
|
29
34
|
end
|
|
@@ -13,16 +13,20 @@ module Moov
|
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
field :network_transaction_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('networkTransactionID') } }
|
|
17
|
+
|
|
16
18
|
field :failure_code, Crystalline::Nilable.new(Models::Components::CardTransactionFailureCode), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('failureCode'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::CardTransactionFailureCode, true) } }
|
|
17
19
|
|
|
18
|
-
sig { params(failure_code: T.nilable(Models::Components::CardTransactionFailureCode)).void }
|
|
19
|
-
def initialize(failure_code: nil)
|
|
20
|
+
sig { params(network_transaction_id: T.nilable(::String), failure_code: T.nilable(Models::Components::CardTransactionFailureCode)).void }
|
|
21
|
+
def initialize(network_transaction_id: nil, failure_code: nil)
|
|
22
|
+
@network_transaction_id = network_transaction_id
|
|
20
23
|
@failure_code = failure_code
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
27
|
def ==(other)
|
|
25
28
|
return false unless other.is_a? self.class
|
|
29
|
+
return false unless @network_transaction_id == other.network_transaction_id
|
|
26
30
|
return false unless @failure_code == other.failure_code
|
|
27
31
|
true
|
|
28
32
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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 CreateAuthorizationSimulation
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :issued_card_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuedCardID'), required: true } }
|
|
17
|
+
# A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99.
|
|
18
|
+
field :amount, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
19
|
+
|
|
20
|
+
field :merchant_data, Crystalline::Nilable.new(Models::Components::IssuingMerchantData), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('merchantData') } }
|
|
21
|
+
|
|
22
|
+
sig { params(issued_card_id: ::String, amount: ::String, merchant_data: T.nilable(Models::Components::IssuingMerchantData)).void }
|
|
23
|
+
def initialize(issued_card_id:, amount:, merchant_data: nil)
|
|
24
|
+
@issued_card_id = issued_card_id
|
|
25
|
+
@amount = amount
|
|
26
|
+
@merchant_data = merchant_data
|
|
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 @issued_card_id == other.issued_card_id
|
|
33
|
+
return false unless @amount == other.amount
|
|
34
|
+
return false unless @merchant_data == other.merchant_data
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateAuthorizationSimulation
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateAuthorizationSimulation
|
|
11
|
+
def issued_card_id(); end
|
|
12
|
+
def issued_card_id=(str_); end
|
|
13
|
+
def amount(); end
|
|
14
|
+
def amount=(str_); end
|
|
15
|
+
def merchant_data(); end
|
|
16
|
+
def merchant_data=(str_); end
|
|
17
|
+
end
|
|
@@ -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 CreateClearingSimulation
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99.
|
|
16
|
+
field :amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
17
|
+
|
|
18
|
+
sig { params(amount: T.nilable(::String)).void }
|
|
19
|
+
def initialize(amount: nil)
|
|
20
|
+
@amount = amount
|
|
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 @amount == other.amount
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateClearingSimulation
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateClearingSimulation
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
end
|
|
@@ -66,7 +66,8 @@ module Moov
|
|
|
66
66
|
# An optional collection of line items for a transfer.
|
|
67
67
|
# When line items are provided, their total plus tax must equal the transfer amount.
|
|
68
68
|
field :line_items, Crystalline::Nilable.new(Models::Components::TransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
69
|
-
|
|
69
|
+
# The tip, tax, and surcharge portion of the transfer amount.
|
|
70
|
+
# For an auth-capture `card-payment` transfer, this is the aggregate of all captures' `amountDetails`.
|
|
70
71
|
field :amount_details, Crystalline::Nilable.new(Models::Components::TransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
71
72
|
# Authorization amounts.
|
|
72
73
|
# This field is present only for an auth-capture `card-payment` transfer.
|