moov_ruby 0.0.0.pre.dev.31 → 0.0.0.pre.dev.33
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 +2 -8
- data/lib/moov/invoices.rb +180 -0
- data/lib/moov/issuing_transactions.rb +123 -0
- data/lib/moov/models/components/capability.rb +2 -0
- data/lib/moov/models/components/capabilityid.rb +3 -0
- data/lib/moov/models/components/capture.rb +2 -6
- data/lib/moov/models/components/capture.rbi +0 -2
- data/lib/moov/models/components/capturemethod.rb +21 -0
- data/lib/moov/models/components/capturemethod.rbi +11 -0
- data/lib/moov/models/components/capturestatus.rb +1 -0
- data/lib/moov/models/components/cardpaymentoptions.rb +14 -2
- data/lib/moov/models/components/cardpaymentoptions.rbi +6 -0
- data/lib/moov/models/components/createauthorizationsimulation.rb +2 -2
- data/lib/moov/models/components/createcapture.rb +2 -6
- data/lib/moov/models/components/createcapture.rbi +0 -2
- data/lib/moov/models/components/createcardpaymentoptions.rb +55 -0
- data/lib/moov/models/components/createcardpaymentoptions.rbi +21 -0
- data/lib/moov/models/components/createcardpaymentoptions_capturemethod.rb +20 -0
- data/lib/moov/models/components/createcardpaymentoptions_capturemethod.rbi +11 -0
- data/lib/moov/models/components/createinvoice.rb +10 -2
- data/lib/moov/models/components/createinvoice.rbi +4 -0
- data/lib/moov/models/components/createinvoicenotification.rb +32 -0
- data/lib/moov/models/components/createinvoicenotification.rbi +13 -0
- data/lib/moov/models/components/createsweepconfig.rb +6 -2
- data/lib/moov/models/components/createsweepconfig.rbi +2 -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 +52 -0
- data/lib/moov/models/components/createtransferrailoptions.rbi +23 -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/fullissuedcard.rb +6 -4
- 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/issuedcard.rb +6 -4
- data/lib/moov/models/components/issuedcardauthorization.rb +6 -2
- data/lib/moov/models/components/issuedcardauthorization.rbi +2 -0
- data/lib/moov/models/components/issuedcardstate.rb +6 -4
- data/lib/moov/models/components/issuedcardtransaction.rb +6 -2
- data/lib/moov/models/components/issuedcardtransaction.rbi +2 -0
- data/lib/moov/models/components/issuedcontrols_allowedschedule.rb +1 -1
- data/lib/moov/models/components/issuingcontrols_allowedschedule.rb +1 -1
- data/lib/moov/models/components/notificationchannel.rb +18 -0
- data/lib/moov/models/components/notificationchannel.rbi +11 -0
- data/lib/moov/models/components/patchsweepconfig.rb +6 -2
- data/lib/moov/models/components/patchsweepconfig.rbi +2 -0
- data/lib/moov/models/components/pushtocardoptions.rb +6 -2
- data/lib/moov/models/components/pushtocardoptions.rbi +2 -0
- data/lib/moov/models/components/requestcard.rb +2 -6
- data/lib/moov/models/components/requestcard.rbi +0 -2
- data/lib/moov/models/components/schedule.rb +40 -0
- data/lib/moov/models/components/schedule.rbi +17 -0
- data/lib/moov/models/components/schedulewindow.rb +1 -1
- data/lib/moov/models/components/simulationissuingmerchantdata.rb +56 -0
- data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rbi → simulationissuingmerchantdata.rbi} +2 -2
- data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rb → simulationissuingmerchantdatavalidationerror.rb} +1 -1
- data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rbi +25 -0
- data/lib/moov/models/components/sweepconfig.rb +6 -2
- data/lib/moov/models/components/sweepconfig.rbi +2 -0
- data/lib/moov/models/components/sweepconfigschedule.rb +40 -0
- data/lib/moov/models/components/sweepconfigschedule.rbi +17 -0
- data/lib/moov/models/components/sweepconfigscheduleerror.rb +40 -0
- data/lib/moov/models/components/sweepconfigscheduleerror.rbi +17 -0
- data/lib/moov/models/components/sweepschedulefrequency.rb +18 -0
- data/lib/moov/models/components/sweepschedulefrequency.rbi +11 -0
- data/lib/moov/models/components/transferauthorization.rb +6 -2
- data/lib/moov/models/components/transferauthorization.rbi +2 -0
- data/lib/moov/models/components/updateinvoice.rb +6 -2
- data/lib/moov/models/components/updateinvoice.rbi +2 -0
- data/lib/moov/models/components/updateissuedcard.rb +3 -3
- data/lib/moov/models/components/updateissuedcardstate.rb +3 -3
- data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rb +1 -1
- data/lib/moov/models/components/upsertunderwriting.rb +1 -1
- data/lib/moov/models/components/webhookdatacapabilityrequested.rb +2 -0
- data/lib/moov/models/components/webhookdatacapabilityupdated.rb +2 -0
- data/lib/moov/models/components.rb +17 -3
- data/lib/moov/models/errors/authorizationsimulationvalidationerror.rb +3 -3
- data/lib/moov/models/errors/capturevalidationerror.rb +2 -6
- data/lib/moov/models/errors/capturevalidationerror.rbi +0 -2
- data/lib/moov/models/errors/clearingsimulationvalidationerror.rb +1 -1
- data/lib/moov/models/errors/createinvoiceerror.rb +10 -2
- data/lib/moov/models/errors/createinvoiceerror.rbi +4 -0
- data/lib/moov/models/errors/createsweepconfigerror.rb +6 -2
- data/lib/moov/models/errors/createsweepconfigerror.rbi +2 -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/listtransfersvalidationerror.rb +6 -2
- data/lib/moov/models/errors/listtransfersvalidationerror.rbi +2 -0
- data/lib/moov/models/errors/patchsweepconfigerror.rb +6 -2
- data/lib/moov/models/errors/patchsweepconfigerror.rbi +2 -0
- data/lib/moov/models/errors/requestcarderror.rb +2 -6
- data/lib/moov/models/errors/requestcarderror.rbi +0 -2
- data/lib/moov/models/errors/updateinvoiceerror.rb +6 -2
- data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -0
- data/lib/moov/models/errors.rb +2 -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/createtransfer_response.rb +5 -5
- data/lib/moov/models/operations/createtransfer_response.rbi +2 -2
- data/lib/moov/models/operations/disablecapability_request.rb +2 -0
- data/lib/moov/models/operations/getcapability_request.rb +2 -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/initiaterefund_request.rb +1 -1
- data/lib/moov/models/operations/listissuedcardauthorizations_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcardauthorizations_request.rbi +2 -0
- data/lib/moov/models/operations/listissuedcards_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcards_request.rbi +2 -0
- data/lib/moov/models/operations/listissuedcardtransactions_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcardtransactions_request.rbi +2 -0
- data/lib/moov/models/operations/listtransfers_request.rb +7 -2
- data/lib/moov/models/operations/listtransfers_request.rbi +2 -0
- data/lib/moov/models/operations/listtransfers_response.rb +1 -1
- data/lib/moov/models/operations.rb +4 -2
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/transfers.rb +9 -157
- metadata +48 -12
- data/lib/moov/models/components/cardexpirationerror.rb +0 -36
- data/lib/moov/models/components/cardexpirationerror.rbi +0 -15
- data/lib/moov/models/components/createcancellation.rb +0 -34
- data/lib/moov/models/components/createcancellation.rbi +0 -13
- data/lib/moov/models/operations/createcancellation_request.rb +0 -40
- data/lib/moov/models/operations/createcancellation_request.rbi +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d292628b0c088bfbba07db9a1b3671d3eacacc5aabac85d260fbe150447c22ed
|
|
4
|
+
data.tar.gz: 66f263272912f0d713f7dd6899ceaa06904fbfac51f7ee9dc93052388035c7fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24c4713e4f3747d7b0f0d854c0e44ca8b545f8ccf4f09daf42b475a4d8548e26626540466e2a17a30dfc77972391b32b1f098370072885b160fed1dbcfea9172
|
|
7
|
+
data.tar.gz: bf6ea9d3386e53f55343ec9dbe917720b8aef74a3415360a7e83558988c82290f3ffafa3055cfc559d7ffd5f483119e06511b13277892ae93cae83badd55682d
|
data/lib/moov/card_issuing.rb
CHANGED
|
@@ -860,18 +860,12 @@ module Moov
|
|
|
860
860
|
end
|
|
861
861
|
|
|
862
862
|
|
|
863
|
-
sig { params(
|
|
864
|
-
def list(
|
|
863
|
+
sig { params(request: Models::Operations::ListIssuedCardsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListIssuedCardsResponse) }
|
|
864
|
+
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
865
865
|
# list - List Moov issued cards existing for the account.
|
|
866
866
|
#
|
|
867
867
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
868
868
|
# you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
|
869
|
-
request = Models::Operations::ListIssuedCardsRequest.new(
|
|
870
|
-
account_id: account_id,
|
|
871
|
-
skip: skip,
|
|
872
|
-
count: count,
|
|
873
|
-
states: states
|
|
874
|
-
)
|
|
875
869
|
url, params = @sdk_configuration.get_server_details
|
|
876
870
|
base_url = Utils.template_url(url, params)
|
|
877
871
|
url = Utils.generate_url(
|
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.
|
|
@@ -164,6 +164,129 @@ module Moov
|
|
|
164
164
|
end
|
|
165
165
|
|
|
166
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
|
+
|
|
167
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) }
|
|
168
291
|
def list_authorizations(request:, timeout_ms: nil, http_headers: nil)
|
|
169
292
|
# list_authorizations - List issued card authorizations associated with a Moov account.
|
|
@@ -21,6 +21,8 @@ module Moov
|
|
|
21
21
|
# Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to choose the right capabilities for your integration.
|
|
22
22
|
#
|
|
23
23
|
# The `production-app`, `platform.production-app`, and / or `platform.wallet-transfers` capabilities might appear in the list for your Partner account. These are read-only capabilities that Moov requests. These capabilities remain active with your account and require no additional action.
|
|
24
|
+
#
|
|
25
|
+
# Starting in v2026.10.00, the `platform.moov-money` capability might appear in the list for accounts enrolled in Moov Money. This is a read-only capability that Moov requests. It requires no additional action.
|
|
24
26
|
field :capability, Models::Components::CapabilityID, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('capability'), required: true, 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::CapabilityID, false) } }
|
|
25
27
|
|
|
26
28
|
field :account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('accountID'), required: true } }
|
|
@@ -16,6 +16,8 @@ module Moov
|
|
|
16
16
|
# Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to choose the right capabilities for your integration.
|
|
17
17
|
#
|
|
18
18
|
# The `production-app`, `platform.production-app`, and / or `platform.wallet-transfers` capabilities might appear in the list for your Partner account. These are read-only capabilities that Moov requests. These capabilities remain active with your account and require no additional action.
|
|
19
|
+
#
|
|
20
|
+
# Starting in v2026.10.00, the `platform.moov-money` capability might appear in the list for accounts enrolled in Moov Money. This is a read-only capability that Moov requests. It requires no additional action.
|
|
19
21
|
class CapabilityID
|
|
20
22
|
include ::Crystalline::Enum
|
|
21
23
|
enums do
|
|
@@ -38,6 +40,7 @@ module Moov
|
|
|
38
40
|
PRODUCTION_APP = new('production-app')
|
|
39
41
|
PLATFORM_PRODUCTION_APP = new('platform.production-app')
|
|
40
42
|
PLATFORM_WALLET_TRANSFERS = new('platform.wallet-transfers')
|
|
43
|
+
PLATFORM_MOOV_MONEY = new('platform.moov-money')
|
|
41
44
|
end
|
|
42
45
|
open!
|
|
43
46
|
end
|
|
@@ -22,8 +22,6 @@ module Moov
|
|
|
22
22
|
field :status, Models::Components::CaptureStatus, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('status'), required: true, 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::CaptureStatus, false) } }
|
|
23
23
|
|
|
24
24
|
field :created_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('createdOn'), required: true, 'decoder': ::Moov::Utils.datetime_from_iso_format(false) } }
|
|
25
|
-
# Payment method of the merchant account the funds were captured into. For card-acquiring transfers, this must be a moov-wallet payment method.
|
|
26
|
-
field :destination_payment_method_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destinationPaymentMethodID'), required: true } }
|
|
27
25
|
# An optional description of the capture that is used on receipts and for your own internal use.
|
|
28
26
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
29
27
|
# Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
|
|
@@ -41,14 +39,13 @@ module Moov
|
|
|
41
39
|
|
|
42
40
|
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) } }
|
|
43
41
|
|
|
44
|
-
sig { params(capture_id: ::String, amount: Models::Components::AmountDecimal, is_final: T::Boolean, status: Models::Components::CaptureStatus, created_on: ::DateTime,
|
|
45
|
-
def initialize(capture_id:, amount:, is_final:, status:, created_on:,
|
|
42
|
+
sig { params(capture_id: ::String, amount: Models::Components::AmountDecimal, is_final: T::Boolean, status: Models::Components::CaptureStatus, created_on: ::DateTime, description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::TransferLineItems), amount_details: T.nilable(Models::Components::TransferAmountDetails), facilitator_fee_amount: T.nilable(Models::Components::AmountDecimal), failure_code: T.nilable(Models::Components::CardTransactionFailureCode)).void }
|
|
43
|
+
def initialize(capture_id:, amount:, is_final:, status:, created_on:, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil, failure_code: nil)
|
|
46
44
|
@capture_id = capture_id
|
|
47
45
|
@amount = amount
|
|
48
46
|
@is_final = is_final
|
|
49
47
|
@status = status
|
|
50
48
|
@created_on = created_on
|
|
51
|
-
@destination_payment_method_id = destination_payment_method_id
|
|
52
49
|
@description = description
|
|
53
50
|
@metadata = metadata
|
|
54
51
|
@foreign_id = foreign_id
|
|
@@ -66,7 +63,6 @@ module Moov
|
|
|
66
63
|
return false unless @is_final == other.is_final
|
|
67
64
|
return false unless @status == other.status
|
|
68
65
|
return false unless @created_on == other.created_on
|
|
69
|
-
return false unless @destination_payment_method_id == other.destination_payment_method_id
|
|
70
66
|
return false unless @description == other.description
|
|
71
67
|
return false unless @metadata == other.metadata
|
|
72
68
|
return false unless @foreign_id == other.foreign_id
|
|
@@ -18,8 +18,6 @@ class Moov::Models::Components::Capture
|
|
|
18
18
|
def status=(str_); end
|
|
19
19
|
def created_on(); end
|
|
20
20
|
def created_on=(str_); end
|
|
21
|
-
def destination_payment_method_id(); end
|
|
22
|
-
def destination_payment_method_id=(str_); end
|
|
23
21
|
def description(); end
|
|
24
22
|
def description=(str_); end
|
|
25
23
|
def metadata(); end
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
# CaptureMethod - When funds for a `card-payment` transfer are captured.
|
|
11
|
+
class CaptureMethod
|
|
12
|
+
include ::Crystalline::Enum
|
|
13
|
+
enums do
|
|
14
|
+
AUTOMATIC = new('automatic')
|
|
15
|
+
MANUAL = new('manual')
|
|
16
|
+
end
|
|
17
|
+
open!
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -19,11 +19,20 @@ module Moov
|
|
|
19
19
|
# Crucial for recurring and merchant-initiated transactions as per card scheme rules.
|
|
20
20
|
# Omit for customer-initiated e-commerce transactions.
|
|
21
21
|
field :transaction_source, Crystalline::Nilable.new(Models::Components::TransactionSource), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('transactionSource'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::TransactionSource, true) } }
|
|
22
|
+
# When funds for a `card-payment` transfer are captured.
|
|
23
|
+
field :capture_method, Crystalline::Nilable.new(Models::Components::CaptureMethod), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureMethod'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::CaptureMethod, true) } }
|
|
24
|
+
# Whether an extended authorization hold was requested.
|
|
25
|
+
field :is_extended_authorization_requested, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isExtendedAuthorizationRequested') } }
|
|
26
|
+
# Whether the authorization was flagged as an estimate.
|
|
27
|
+
field :is_estimated_authorization, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isEstimatedAuthorization') } }
|
|
22
28
|
|
|
23
|
-
sig { params(dynamic_descriptor: T.nilable(::String), transaction_source: T.nilable(Models::Components::TransactionSource)).void }
|
|
24
|
-
def initialize(dynamic_descriptor: nil, transaction_source: nil)
|
|
29
|
+
sig { params(dynamic_descriptor: T.nilable(::String), transaction_source: T.nilable(Models::Components::TransactionSource), capture_method: T.nilable(Models::Components::CaptureMethod), is_extended_authorization_requested: T.nilable(T::Boolean), is_estimated_authorization: T.nilable(T::Boolean)).void }
|
|
30
|
+
def initialize(dynamic_descriptor: nil, transaction_source: nil, capture_method: nil, is_extended_authorization_requested: nil, is_estimated_authorization: nil)
|
|
25
31
|
@dynamic_descriptor = dynamic_descriptor
|
|
26
32
|
@transaction_source = transaction_source
|
|
33
|
+
@capture_method = capture_method
|
|
34
|
+
@is_extended_authorization_requested = is_extended_authorization_requested
|
|
35
|
+
@is_estimated_authorization = is_estimated_authorization
|
|
27
36
|
end
|
|
28
37
|
|
|
29
38
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -31,6 +40,9 @@ module Moov
|
|
|
31
40
|
return false unless other.is_a? self.class
|
|
32
41
|
return false unless @dynamic_descriptor == other.dynamic_descriptor
|
|
33
42
|
return false unless @transaction_source == other.transaction_source
|
|
43
|
+
return false unless @capture_method == other.capture_method
|
|
44
|
+
return false unless @is_extended_authorization_requested == other.is_extended_authorization_requested
|
|
45
|
+
return false unless @is_estimated_authorization == other.is_estimated_authorization
|
|
34
46
|
true
|
|
35
47
|
end
|
|
36
48
|
end
|
|
@@ -12,4 +12,10 @@ class Moov::Models::Components::CardPaymentOptions
|
|
|
12
12
|
def dynamic_descriptor=(str_); end
|
|
13
13
|
def transaction_source(); end
|
|
14
14
|
def transaction_source=(str_); end
|
|
15
|
+
def capture_method(); end
|
|
16
|
+
def capture_method=(str_); end
|
|
17
|
+
def is_extended_authorization_requested(); end
|
|
18
|
+
def is_extended_authorization_requested=(str_); end
|
|
19
|
+
def is_estimated_authorization(); end
|
|
20
|
+
def is_estimated_authorization=(str_); end
|
|
15
21
|
end
|
|
@@ -17,9 +17,9 @@ module Moov
|
|
|
17
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
18
|
field :amount, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
19
19
|
|
|
20
|
-
field :merchant_data, Crystalline::Nilable.new(Models::Components::
|
|
20
|
+
field :merchant_data, Crystalline::Nilable.new(Models::Components::SimulationIssuingMerchantData), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('merchantData') } }
|
|
21
21
|
|
|
22
|
-
sig { params(issued_card_id: ::String, amount: ::String, merchant_data: T.nilable(Models::Components::
|
|
22
|
+
sig { params(issued_card_id: ::String, amount: ::String, merchant_data: T.nilable(Models::Components::SimulationIssuingMerchantData)).void }
|
|
23
23
|
def initialize(issued_card_id:, amount:, merchant_data: nil)
|
|
24
24
|
@issued_card_id = issued_card_id
|
|
25
25
|
@amount = amount
|
|
@@ -12,8 +12,6 @@ module Moov
|
|
|
12
12
|
extend T::Sig
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
|
-
# Payment method of the merchant account to capture funds into. For card-acquiring transfers, this must be a moov-wallet payment method.
|
|
16
|
-
field :destination_payment_method_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destinationPaymentMethodID'), required: true } }
|
|
17
15
|
# Amount to capture.
|
|
18
16
|
# If omitted, the remaining capturable amount is captured.
|
|
19
17
|
field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
@@ -35,9 +33,8 @@ module Moov
|
|
|
35
33
|
# The transfer's facilitator fee is the sum of its capture fees.
|
|
36
34
|
field :facilitator_fee_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('facilitatorFeeAmount') } }
|
|
37
35
|
|
|
38
|
-
sig { params(
|
|
39
|
-
def initialize(
|
|
40
|
-
@destination_payment_method_id = destination_payment_method_id
|
|
36
|
+
sig { params(amount: T.nilable(Models::Components::AmountDecimal), is_final: T.nilable(T::Boolean), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::CreateTransferLineItems), amount_details: T.nilable(Models::Components::CreateTransferAmountDetails), facilitator_fee_amount: T.nilable(Models::Components::AmountDecimal)).void }
|
|
37
|
+
def initialize(amount: nil, is_final: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil)
|
|
41
38
|
@amount = amount
|
|
42
39
|
@is_final = is_final
|
|
43
40
|
@description = description
|
|
@@ -51,7 +48,6 @@ module Moov
|
|
|
51
48
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
52
49
|
def ==(other)
|
|
53
50
|
return false unless other.is_a? self.class
|
|
54
|
-
return false unless @destination_payment_method_id == other.destination_payment_method_id
|
|
55
51
|
return false unless @amount == other.amount
|
|
56
52
|
return false unless @is_final == other.is_final
|
|
57
53
|
return false unless @description == other.description
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Options for a new `card-payment` transfer.
|
|
11
|
+
class CreateCardPaymentOptions
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.
|
|
16
|
+
field :dynamic_descriptor, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dynamicDescriptor') } }
|
|
17
|
+
# Specifies the nature and initiator of a transaction.
|
|
18
|
+
#
|
|
19
|
+
# Crucial for recurring and merchant-initiated transactions as per card scheme rules.
|
|
20
|
+
# Omit for customer-initiated e-commerce transactions.
|
|
21
|
+
field :transaction_source, Crystalline::Nilable.new(Models::Components::TransactionSource), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('transactionSource'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::TransactionSource, true) } }
|
|
22
|
+
# Requests an extended authorization hold, which keeps the funds reserved longer than the standard window.
|
|
23
|
+
# The card network may not grant it; check `isExtendedAuthorizationGranted` in the response.
|
|
24
|
+
# Requires `captureMethod: manual`; setting it to `true` with `captureMethod: automatic` returns a `400`.
|
|
25
|
+
field :is_extended_authorization_requested, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isExtendedAuthorizationRequested') } }
|
|
26
|
+
# Marks the authorized amount as an estimate, for cases where the final amount may differ at capture.
|
|
27
|
+
# Requires `captureMethod: manual`; setting it to `true` with `captureMethod: automatic` returns a `400`.
|
|
28
|
+
field :is_estimated_authorization, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isEstimatedAuthorization') } }
|
|
29
|
+
# How funds are captured. `automatic` (default) authorizes and captures the full amount right away.
|
|
30
|
+
# `manual` authorizes only; capture later with the capture endpoint.
|
|
31
|
+
field :capture_method, Crystalline::Nilable.new(Models::Components::CreateCardPaymentOptionsCaptureMethod), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureMethod'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CreateCardPaymentOptionsCaptureMethod, true) } }
|
|
32
|
+
|
|
33
|
+
sig { params(dynamic_descriptor: T.nilable(::String), transaction_source: T.nilable(Models::Components::TransactionSource), is_extended_authorization_requested: T.nilable(T::Boolean), is_estimated_authorization: T.nilable(T::Boolean), capture_method: T.nilable(Models::Components::CreateCardPaymentOptionsCaptureMethod)).void }
|
|
34
|
+
def initialize(dynamic_descriptor: nil, transaction_source: nil, is_extended_authorization_requested: nil, is_estimated_authorization: nil, capture_method: Models::Components::CreateCardPaymentOptionsCaptureMethod::AUTOMATIC)
|
|
35
|
+
@dynamic_descriptor = dynamic_descriptor
|
|
36
|
+
@transaction_source = transaction_source
|
|
37
|
+
@is_extended_authorization_requested = is_extended_authorization_requested
|
|
38
|
+
@is_estimated_authorization = is_estimated_authorization
|
|
39
|
+
@capture_method = capture_method
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
43
|
+
def ==(other)
|
|
44
|
+
return false unless other.is_a? self.class
|
|
45
|
+
return false unless @dynamic_descriptor == other.dynamic_descriptor
|
|
46
|
+
return false unless @transaction_source == other.transaction_source
|
|
47
|
+
return false unless @is_extended_authorization_requested == other.is_extended_authorization_requested
|
|
48
|
+
return false unless @is_estimated_authorization == other.is_estimated_authorization
|
|
49
|
+
return false unless @capture_method == other.capture_method
|
|
50
|
+
true
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateCardPaymentOptions
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateCardPaymentOptions
|
|
11
|
+
def dynamic_descriptor(); end
|
|
12
|
+
def dynamic_descriptor=(str_); end
|
|
13
|
+
def transaction_source(); end
|
|
14
|
+
def transaction_source=(str_); end
|
|
15
|
+
def is_extended_authorization_requested(); end
|
|
16
|
+
def is_extended_authorization_requested=(str_); end
|
|
17
|
+
def is_estimated_authorization(); end
|
|
18
|
+
def is_estimated_authorization=(str_); end
|
|
19
|
+
def capture_method(); end
|
|
20
|
+
def capture_method=(str_); end
|
|
21
|
+
end
|