moov_ruby 26.10.0.pre.dev.1 → 26.10.0.pre.dev.2
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/avatars.rb +4 -4
- data/lib/moov/card_issuing.rb +116 -0
- data/lib/moov/client.rb +2 -2
- data/lib/moov/enriched_address.rb +1 -1
- data/lib/moov/enriched_profile.rb +1 -1
- data/lib/moov/institutions.rb +1 -1
- data/lib/moov/models/components/achcreditoptions.rb +40 -0
- data/lib/moov/models/components/achcreditoptions.rbi +17 -0
- data/lib/moov/models/components/achcredittransferprocessingdetails.rb +40 -0
- data/lib/moov/models/components/achcredittransferprocessingdetails.rbi +17 -0
- data/lib/moov/models/components/achdebitoptions.rb +48 -0
- data/lib/moov/models/components/achdebitoptions.rbi +21 -0
- data/lib/moov/models/components/achdebittransferprocessingdetails.rb +40 -0
- data/lib/moov/models/components/achdebittransferprocessingdetails.rbi +17 -0
- data/lib/moov/models/components/allowedscheduleerror.rb +36 -0
- data/lib/moov/models/components/allowedscheduleerror.rbi +15 -0
- data/lib/moov/models/components/asynccreatedrefund.rb +7 -3
- data/lib/moov/models/components/asynccreatedrefund.rbi +2 -0
- data/lib/moov/models/components/capture.rb +77 -0
- data/lib/moov/models/components/capture.rbi +35 -0
- data/lib/moov/models/components/{refundcardstatus.rb → capturestatus.rb} +5 -4
- data/lib/moov/models/components/{refundcardstatus.rbi → capturestatus.rbi} +2 -2
- data/lib/moov/models/components/cardacquiringrefund.rb +11 -7
- data/lib/moov/models/components/cardacquiringrefund.rbi +4 -2
- data/lib/moov/models/components/cardpaymentoptions.rb +39 -0
- data/lib/moov/models/components/cardpaymentoptions.rbi +15 -0
- data/lib/moov/models/components/cardpaymentrefundprocessingdetails.rb +32 -0
- data/lib/moov/models/components/cardpaymentrefundprocessingdetails.rbi +13 -0
- data/lib/moov/models/components/cardpaymenttransferprocessingdetails.rb +44 -0
- data/lib/moov/models/components/cardpaymenttransferprocessingdetails.rbi +19 -0
- data/lib/moov/models/components/createcancellation.rb +32 -0
- data/lib/moov/models/components/createcancellation.rbi +13 -0
- data/lib/moov/models/components/createcapture.rb +65 -0
- data/lib/moov/models/components/createcapture.rbi +29 -0
- data/lib/moov/models/components/createdtransfer.rb +22 -22
- data/lib/moov/models/components/createdtransfer.rbi +8 -8
- data/lib/moov/models/components/createrefund.rb +9 -5
- data/lib/moov/models/components/createrefund.rbi +2 -0
- data/lib/moov/models/components/createreversal.rb +3 -3
- data/lib/moov/models/components/createtransfer.rb +4 -4
- data/lib/moov/models/components/createtransferfacilitatorfee.rb +36 -0
- data/lib/moov/models/components/createtransferfacilitatorfee.rbi +15 -0
- data/lib/moov/models/components/createtransferoptions.rb +2 -2
- data/lib/moov/models/components/fullissuedcard.rb +3 -3
- data/lib/moov/models/components/instantbankcredittransferprocessingdetails.rb +44 -0
- data/lib/moov/models/components/instantbankcredittransferprocessingdetails.rbi +19 -0
- data/lib/moov/models/components/issuedcard.rb +3 -3
- data/lib/moov/models/components/issuedcontrols.rb +52 -0
- data/lib/moov/models/components/issuedcontrols.rbi +23 -0
- data/lib/moov/models/components/issuedcontrols_allowedschedule.rb +36 -0
- data/lib/moov/models/components/issuedcontrols_allowedschedule.rbi +15 -0
- data/lib/moov/models/components/issuedvelocitylimit.rb +60 -0
- data/lib/moov/models/components/issuedvelocitylimit.rbi +27 -0
- data/lib/moov/models/components/issuingcontrols.rb +18 -2
- data/lib/moov/models/components/issuingcontrols.rbi +8 -0
- data/lib/moov/models/components/issuingcontrols_allowedschedule.rb +36 -0
- data/lib/moov/models/components/issuingcontrols_allowedschedule.rbi +15 -0
- data/lib/moov/models/components/issuingcontrolserror.rb +18 -2
- data/lib/moov/models/components/issuingcontrolserror.rbi +8 -0
- data/lib/moov/models/components/issuingcontrolsrestrictionmode.rb +19 -0
- data/lib/moov/models/components/issuingcontrolsrestrictionmode.rbi +11 -0
- data/lib/moov/models/components/issuingintervallimit.rb +3 -0
- data/lib/moov/models/components/issuingmerchantcategory.rb +43 -0
- data/lib/moov/models/components/issuingmerchantcategory.rbi +11 -0
- data/lib/moov/models/components/issuingscheduleday.rb +24 -0
- data/lib/moov/models/components/{achtransactionstatus.rbi → issuingscheduleday.rbi} +2 -2
- data/lib/moov/models/components/issuingvelocitylimit.rb +10 -6
- data/lib/moov/models/components/issuingvelocitylimit.rbi +4 -2
- data/lib/moov/models/components/issuingvelocitylimiterror.rb +6 -2
- data/lib/moov/models/components/issuingvelocitylimiterror.rbi +2 -0
- data/lib/moov/models/components/merchantcategories.rb +32 -0
- data/lib/moov/models/components/merchantcategories.rbi +13 -0
- data/lib/moov/models/components/merchantcategory.rb +37 -0
- data/lib/moov/models/components/merchantcategory.rbi +15 -0
- data/lib/moov/models/components/merchantcategoryrestrictions.rb +44 -0
- data/lib/moov/models/components/merchantcategoryrestrictions.rbi +19 -0
- data/lib/moov/models/components/merchantcategoryrestrictionserror.rb +44 -0
- data/lib/moov/models/components/merchantcategoryrestrictionserror.rbi +19 -0
- data/lib/moov/models/components/merchantentry.rb +40 -0
- data/lib/moov/models/components/merchantentry.rbi +17 -0
- data/lib/moov/models/components/merchantentryerror.rb +36 -0
- data/lib/moov/models/components/merchantentryerror.rbi +15 -0
- data/lib/moov/models/components/merchantrestrictions.rb +36 -0
- data/lib/moov/models/components/merchantrestrictions.rbi +15 -0
- data/lib/moov/models/components/merchantrestrictionserror.rb +36 -0
- data/lib/moov/models/components/merchantrestrictionserror.rbi +15 -0
- data/lib/moov/models/components/moovfeedetails.rb +5 -5
- data/lib/moov/models/components/paymentmethodswallet.rb +1 -0
- data/lib/moov/models/components/pullfromcardoptions.rb +39 -0
- data/lib/moov/models/components/pullfromcardoptions.rbi +15 -0
- data/lib/moov/models/components/pullfromcardtransferprocessingdetails.rb +44 -0
- data/lib/moov/models/components/pullfromcardtransferprocessingdetails.rbi +19 -0
- data/lib/moov/models/components/pushtocardoptions.rb +32 -0
- data/lib/moov/models/components/pushtocardoptions.rbi +13 -0
- data/lib/moov/models/components/pushtocardtransferprocessingdetails.rb +44 -0
- data/lib/moov/models/components/pushtocardtransferprocessingdetails.rbi +19 -0
- data/lib/moov/models/components/refundprocessingdetails.rb +32 -0
- data/lib/moov/models/components/refundprocessingdetails.rbi +13 -0
- data/lib/moov/models/components/schedulewindow.rb +40 -0
- data/lib/moov/models/components/schedulewindow.rbi +17 -0
- data/lib/moov/models/components/schedulewindowerror.rb +40 -0
- data/lib/moov/models/components/schedulewindowerror.rbi +17 -0
- data/lib/moov/models/components/sendfunds.rb +6 -2
- data/lib/moov/models/components/sendfunds.rbi +2 -0
- data/lib/moov/models/components/sendfundserror.rb +6 -2
- data/lib/moov/models/components/sendfundserror.rbi +2 -0
- data/lib/moov/models/components/sendfundswire.rb +32 -0
- data/lib/moov/models/components/sendfundswire.rbi +13 -0
- data/lib/moov/models/components/sendfundswireerror.rb +32 -0
- data/lib/moov/models/components/sendfundswireerror.rbi +13 -0
- data/lib/moov/models/components/transfer.rb +22 -22
- data/lib/moov/models/components/transfer.rbi +8 -8
- data/lib/moov/models/components/transferauthorization.rb +52 -0
- data/lib/moov/models/components/transferauthorization.rbi +23 -0
- data/lib/moov/models/components/transferdestination.rb +5 -17
- data/lib/moov/models/components/transferdestination.rbi +0 -6
- data/lib/moov/models/components/transferpaymentmethodswallet.rb +1 -0
- data/lib/moov/models/components/transferprocessingdetails.rb +52 -0
- data/lib/moov/models/components/transferprocessingdetails.rbi +23 -0
- data/lib/moov/models/components/transferrailoptions.rb +48 -0
- data/lib/moov/models/components/transferrailoptions.rbi +21 -0
- data/lib/moov/models/components/transfersource.rb +9 -17
- data/lib/moov/models/components/transfersource.rbi +2 -6
- data/lib/moov/models/components/transferstatus.rb +1 -0
- data/lib/moov/models/components/transfertype.rb +25 -0
- data/lib/moov/models/components/{cardtransactionstatus.rbi → transfertype.rbi} +2 -2
- data/lib/moov/models/components/updateissuedcard.rb +6 -2
- data/lib/moov/models/components/updateissuedcard.rbi +2 -0
- data/lib/moov/models/components/updateissuingcontrols.rb +48 -0
- data/lib/moov/models/components/updateissuingcontrols.rbi +21 -0
- data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rb +36 -0
- data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rbi +15 -0
- data/lib/moov/models/components/updateissuingcontrols_merchantcategoryrestrictions.rb +44 -0
- data/lib/moov/models/components/updateissuingcontrols_merchantcategoryrestrictions.rbi +19 -0
- data/lib/moov/models/components/updateissuingcontrols_merchantrestrictions.rb +36 -0
- data/lib/moov/models/components/updateissuingcontrols_merchantrestrictions.rbi +15 -0
- data/lib/moov/models/components/updateissuingcontrolserror.rb +48 -0
- data/lib/moov/models/components/updateissuingcontrolserror.rbi +21 -0
- data/lib/moov/models/components/wallet.rb +1 -0
- data/lib/moov/models/components/wallettype.rb +2 -0
- data/lib/moov/models/components/webhookdatatransferstatus.rb +3 -0
- data/lib/moov/models/components.rb +47 -9
- data/lib/moov/models/errors/capturevalidationerror.rb +68 -0
- data/lib/moov/models/errors/capturevalidationerror.rbi +31 -0
- data/lib/moov/models/errors/cardacquiringrefund_error.rb +11 -7
- data/lib/moov/models/errors/cardacquiringrefund_error.rbi +4 -2
- data/lib/moov/models/errors/transfer_error.rb +22 -22
- data/lib/moov/models/errors/transfer_error.rbi +8 -8
- data/lib/moov/models/errors/updateissuedcarderror.rb +6 -2
- data/lib/moov/models/errors/updateissuedcarderror.rbi +2 -0
- data/lib/moov/models/errors.rb +1 -0
- data/lib/moov/models/operations/createcancellation_request.rb +6 -2
- data/lib/moov/models/operations/createcancellation_request.rbi +2 -0
- data/lib/moov/models/operations/createcapture_request.rb +44 -0
- data/lib/moov/models/operations/createcapture_request.rbi +19 -0
- data/lib/moov/models/operations/createcapture_response.rb +48 -0
- data/lib/moov/models/operations/createcapture_response.rbi +21 -0
- data/lib/moov/models/operations/createreversal_request.rb +3 -3
- data/lib/moov/models/operations/getcapture_request.rb +40 -0
- data/lib/moov/models/operations/getcapture_request.rbi +17 -0
- data/lib/moov/models/operations/getcapture_response.rb +48 -0
- data/lib/moov/models/operations/getcapture_response.rbi +21 -0
- data/lib/moov/models/operations/initiaterefund_request.rb +6 -6
- data/lib/moov/models/operations/initiaterefund_request.rbi +2 -2
- data/lib/moov/models/operations/listcaptures_request.rb +36 -0
- data/lib/moov/models/operations/listcaptures_request.rbi +15 -0
- data/lib/moov/models/operations/listcaptures_response.rb +48 -0
- data/lib/moov/models/operations/listcaptures_response.rbi +21 -0
- data/lib/moov/models/operations/listissuingmerchantcategories_response.rb +48 -0
- data/lib/moov/models/operations/listissuingmerchantcategories_response.rbi +21 -0
- data/lib/moov/models/operations/listtransfers_request.rb +14 -2
- data/lib/moov/models/operations/listtransfers_request.rbi +6 -0
- data/lib/moov/models/operations.rb +7 -0
- data/lib/moov/sdkconfiguration.rb +2 -2
- data/lib/moov/transfers.rb +434 -5
- data/lib/moov_ruby.rb +1 -1
- metadata +112 -20
- data/lib/moov/models/components/achtransactiondetails.rb +0 -92
- data/lib/moov/models/components/achtransactiondetails.rbi +0 -43
- data/lib/moov/models/components/achtransactionstatus.rb +0 -24
- data/lib/moov/models/components/cardacquiringdispute.rb +0 -40
- data/lib/moov/models/components/cardacquiringdispute.rbi +0 -17
- data/lib/moov/models/components/cardtransactiondetails.rb +0 -93
- data/lib/moov/models/components/cardtransactiondetails.rbi +0 -41
- data/lib/moov/models/components/cardtransactionstatus.rb +0 -24
- data/lib/moov/models/components/instantbanktransactiondetails.rb +0 -64
- data/lib/moov/models/components/instantbanktransactiondetails.rbi +0 -29
- data/lib/moov/models/components/instantbanktransactionstatus.rb +0 -21
- data/lib/moov/models/components/instantbanktransactionstatus.rbi +0 -11
- data/lib/moov/models/components/refundcarddetails.rb +0 -56
- data/lib/moov/models/components/refundcarddetails.rbi +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44c439b4d94110a417a35569d2db7dda5ddfcc65b61a90bc51b8388bec65828e
|
|
4
|
+
data.tar.gz: 8094b4f6307634a62a92e7d70cb1679d55cab787267f63fd09375bbef3715e32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bdefb94aa627a0b0354a7e6540af95f8052d3ce15c5e973359373caaca569d4c5f15b671b62e39672aee2635c0025b19fbab98523090d1edeb39f222a3366d4b
|
|
7
|
+
data.tar.gz: 9f9bedb65f9eefebbe49e6c201946af482bd088de14d8f525cc65c0c659a7bb9a806e642ccade5f39a4a191c1ef565cd758445db1f5bdb38771d29ac8ce107b2
|
data/lib/moov/avatars.rb
CHANGED
|
@@ -45,7 +45,7 @@ module Moov
|
|
|
45
45
|
def get(unique_id:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# get - Get avatar image for an account using a unique ID.
|
|
47
47
|
#
|
|
48
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
48
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
49
49
|
# you'll need to specify the `/profile-enrichment.read` scope.
|
|
50
50
|
request = Models::Operations::GetAvatarRequest.new(
|
|
51
51
|
unique_id: unique_id
|
|
@@ -165,12 +165,12 @@ module Moov
|
|
|
165
165
|
def upload(security:, avatar_upload_request:, unique_id:, timeout_ms: nil, http_headers: nil)
|
|
166
166
|
# upload - Upload a user avatar image for an account.
|
|
167
167
|
#
|
|
168
|
-
# The image will be normalized to 512x512 PNG format and stored separately from
|
|
168
|
+
# The image will be normalized to 512x512 PNG format and stored separately from
|
|
169
169
|
# automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
|
|
170
170
|
#
|
|
171
171
|
# This endpoint only accepts accountID values for the uniqueID parameter.
|
|
172
172
|
#
|
|
173
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
173
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
174
174
|
# you'll need to specify the `/accounts.write` scope.
|
|
175
175
|
request = Models::Operations::UploadAvatarRequest.new(
|
|
176
176
|
unique_id: unique_id,
|
|
@@ -314,7 +314,7 @@ module Moov
|
|
|
314
314
|
#
|
|
315
315
|
# This endpoint only accepts accountID values for the uniqueID parameter.
|
|
316
316
|
#
|
|
317
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
317
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
318
318
|
# you'll need to specify the `/accounts.write` scope.
|
|
319
319
|
request = Models::Operations::DeleteAvatarRequest.new(
|
|
320
320
|
unique_id: unique_id
|
data/lib/moov/card_issuing.rb
CHANGED
|
@@ -41,6 +41,122 @@ module Moov
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
sig { params(timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListIssuingMerchantCategoriesResponse) }
|
|
45
|
+
def list_merchant_categories(timeout_ms: nil, http_headers: nil)
|
|
46
|
+
# list_merchant_categories - List the predefined merchant category groups available for issued card spend controls, along with
|
|
47
|
+
# the merchant category codes (MCCs) each group covers. Use these category names in an issued card's
|
|
48
|
+
# `merchantCategoryRestrictions`.
|
|
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 `/issued-cards.read` scope.
|
|
52
|
+
url, params = @sdk_configuration.get_server_details
|
|
53
|
+
base_url = Utils.template_url(url, params)
|
|
54
|
+
url = "#{base_url}/issuing/merchant-categories"
|
|
55
|
+
headers = {}
|
|
56
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
57
|
+
headers['Accept'] = 'application/json'
|
|
58
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
59
|
+
|
|
60
|
+
security = @sdk_configuration.security_source&.call
|
|
61
|
+
|
|
62
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
63
|
+
timeout ||= @sdk_configuration.timeout
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
connection = @sdk_configuration.client
|
|
67
|
+
|
|
68
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
69
|
+
config: @sdk_configuration,
|
|
70
|
+
base_url: base_url,
|
|
71
|
+
oauth2_scopes: nil,
|
|
72
|
+
operation_id: 'listIssuingMerchantCategories',
|
|
73
|
+
security_source: @sdk_configuration.security_source
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
77
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
begin
|
|
81
|
+
http_response = T.must(connection).get(url) do |req|
|
|
82
|
+
req.headers.merge!(headers)
|
|
83
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
84
|
+
Utils.configure_request_security(req, security)
|
|
85
|
+
http_headers&.each do |key, value|
|
|
86
|
+
req.headers[key.to_s] = value
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
@sdk_configuration.hooks.before_request(
|
|
90
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
91
|
+
hook_ctx: hook_ctx
|
|
92
|
+
),
|
|
93
|
+
request: req
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
rescue StandardError => e
|
|
97
|
+
error = e
|
|
98
|
+
ensure
|
|
99
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
100
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
101
|
+
error: error,
|
|
102
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
103
|
+
hook_ctx: hook_ctx
|
|
104
|
+
),
|
|
105
|
+
response: http_response
|
|
106
|
+
)
|
|
107
|
+
else
|
|
108
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
109
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
110
|
+
hook_ctx: hook_ctx
|
|
111
|
+
),
|
|
112
|
+
response: http_response
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if http_response.nil?
|
|
117
|
+
raise error if !error.nil?
|
|
118
|
+
raise 'no response'
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
123
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
124
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
125
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
126
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
127
|
+
hook_ctx: hook_ctx
|
|
128
|
+
),
|
|
129
|
+
response: http_response
|
|
130
|
+
)
|
|
131
|
+
response_data = http_response.env.response_body
|
|
132
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::MerchantCategories)
|
|
133
|
+
response = Models::Operations::ListIssuingMerchantCategoriesResponse.new(
|
|
134
|
+
status_code: http_response.status,
|
|
135
|
+
content_type: content_type,
|
|
136
|
+
raw_response: http_response,
|
|
137
|
+
headers: http_response.headers,
|
|
138
|
+
merchant_categories: T.unsafe(obj)
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
return response
|
|
142
|
+
else
|
|
143
|
+
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'
|
|
144
|
+
end
|
|
145
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '429'])
|
|
146
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
147
|
+
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
148
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
149
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
150
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
151
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
152
|
+
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
153
|
+
else
|
|
154
|
+
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'
|
|
155
|
+
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
|
|
44
160
|
sig { params(request_card: Models::Components::RequestCard, account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::RequestCardResponse) }
|
|
45
161
|
def request(request_card:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
46
162
|
# request - Request a virtual card be issued.
|
data/lib/moov/client.rb
CHANGED
|
@@ -16,7 +16,7 @@ module Moov
|
|
|
16
16
|
class Client
|
|
17
17
|
extend T::Sig
|
|
18
18
|
|
|
19
|
-
attr_accessor :accounts, :adjustments, :apple_pay, :bank_accounts, :branding, :capabilities, :cards, :disputes, :fee_plans, :files, :google_pay, :images, :invoices, :payment_links, :payment_methods, :products, :representatives, :resolution_links, :scheduling, :statements, :sweeps, :account_terminal_applications, :support, :transfer_config, :transfers, :underwriting, :wallets, :wallet_transactions, :avatars, :end_to_end_encryption, :enriched_address, :enriched_profile, :webhooks, :industries, :institutions, :
|
|
19
|
+
attr_accessor :accounts, :adjustments, :apple_pay, :bank_accounts, :branding, :capabilities, :cards, :disputes, :fee_plans, :files, :google_pay, :images, :invoices, :payment_links, :payment_methods, :products, :representatives, :resolution_links, :scheduling, :statements, :sweeps, :account_terminal_applications, :support, :transfer_config, :transfers, :underwriting, :wallets, :wallet_transactions, :avatars, :end_to_end_encryption, :enriched_address, :enriched_profile, :webhooks, :industries, :institutions, :card_issuing, :issuing_transactions, :authentication, :onboarding, :ping, :receipts, :terminal_applications, :deposit_view
|
|
20
20
|
|
|
21
21
|
# Instantiates the SDK, configuring it with the provided parameters.
|
|
22
22
|
#
|
|
@@ -113,8 +113,8 @@ module Moov
|
|
|
113
113
|
@webhooks = Webhooks.new(@sdk_configuration)
|
|
114
114
|
@industries = Industries.new(@sdk_configuration)
|
|
115
115
|
@institutions = Institutions.new(@sdk_configuration)
|
|
116
|
-
@issuing_transactions = IssuingTransactions.new(@sdk_configuration)
|
|
117
116
|
@card_issuing = CardIssuing.new(@sdk_configuration)
|
|
117
|
+
@issuing_transactions = IssuingTransactions.new(@sdk_configuration)
|
|
118
118
|
@authentication = Authentication.new(@sdk_configuration)
|
|
119
119
|
@onboarding = Onboarding.new(@sdk_configuration)
|
|
120
120
|
@ping = Ping.new(@sdk_configuration)
|
|
@@ -45,7 +45,7 @@ module Moov
|
|
|
45
45
|
def get(request:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# get - Fetch enriched address suggestions. Requires a partial address.
|
|
47
47
|
#
|
|
48
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
48
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
49
49
|
# you'll need to specify the `/profile-enrichment.read` scope.
|
|
50
50
|
url, params = @sdk_configuration.get_server_details
|
|
51
51
|
base_url = Utils.template_url(url, params)
|
|
@@ -45,7 +45,7 @@ module Moov
|
|
|
45
45
|
def get(email:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# get - Fetch enriched profile data. Requires a valid email address. This service is offered in collaboration with Clearbit.
|
|
47
47
|
#
|
|
48
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
48
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
49
49
|
# you'll need to specify the `/profile-enrichment.read` scope.
|
|
50
50
|
request = Models::Operations::GetEnrichmentProfileRequest.new(
|
|
51
51
|
email: email
|
data/lib/moov/institutions.rb
CHANGED
|
@@ -172,7 +172,7 @@ module Moov
|
|
|
172
172
|
#
|
|
173
173
|
# Search for institutions by either their name or routing number.
|
|
174
174
|
#
|
|
175
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
175
|
+
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
176
176
|
# you'll need to specify the `/fed.read` scope.
|
|
177
177
|
#
|
|
178
178
|
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
@@ -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 ACHCreditOptions
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# An optional override of the default NACHA company entry description for a transfer.
|
|
16
|
+
field :company_entry_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('companyEntryDescription') } }
|
|
17
|
+
# An optional override of the default NACHA company name for a transfer.
|
|
18
|
+
field :originating_company_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('originatingCompanyName') } }
|
|
19
|
+
|
|
20
|
+
field :addenda, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::TransferACHAddendaRecord)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('addenda') } }
|
|
21
|
+
|
|
22
|
+
sig { params(company_entry_description: T.nilable(::String), originating_company_name: T.nilable(::String), addenda: T.nilable(T::Array[Models::Components::TransferACHAddendaRecord])).void }
|
|
23
|
+
def initialize(company_entry_description: nil, originating_company_name: nil, addenda: nil)
|
|
24
|
+
@company_entry_description = company_entry_description
|
|
25
|
+
@originating_company_name = originating_company_name
|
|
26
|
+
@addenda = addenda
|
|
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 @company_entry_description == other.company_entry_description
|
|
33
|
+
return false unless @originating_company_name == other.originating_company_name
|
|
34
|
+
return false unless @addenda == other.addenda
|
|
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::ACHCreditOptions
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::ACHCreditOptions
|
|
11
|
+
def company_entry_description(); end
|
|
12
|
+
def company_entry_description=(str_); end
|
|
13
|
+
def originating_company_name(); end
|
|
14
|
+
def originating_company_name=(str_); end
|
|
15
|
+
def addenda(); end
|
|
16
|
+
def addenda=(str_); end
|
|
17
|
+
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 ACHCreditTransferProcessingDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :trace_number, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('traceNumber'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :return_, Crystalline::Nilable.new(Models::Components::ACHException), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('return') } }
|
|
19
|
+
|
|
20
|
+
field :correction, Crystalline::Nilable.new(Models::Components::ACHException), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('correction') } }
|
|
21
|
+
|
|
22
|
+
sig { params(trace_number: ::String, return_: T.nilable(Models::Components::ACHException), correction: T.nilable(Models::Components::ACHException)).void }
|
|
23
|
+
def initialize(trace_number:, return_: nil, correction: nil)
|
|
24
|
+
@trace_number = trace_number
|
|
25
|
+
@return_ = return_
|
|
26
|
+
@correction = correction
|
|
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 @trace_number == other.trace_number
|
|
33
|
+
return false unless @return_ == other.return_
|
|
34
|
+
return false unless @correction == other.correction
|
|
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::ACHCreditTransferProcessingDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::ACHCreditTransferProcessingDetails
|
|
11
|
+
def trace_number(); end
|
|
12
|
+
def trace_number=(str_); end
|
|
13
|
+
def return_(); end
|
|
14
|
+
def return_=(str_); end
|
|
15
|
+
def correction(); end
|
|
16
|
+
def correction=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
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 ACHDebitOptions
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# An optional override of the default NACHA company entry description for a transfer.
|
|
16
|
+
field :company_entry_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('companyEntryDescription') } }
|
|
17
|
+
# An optional override of the default NACHA company name for a transfer.
|
|
18
|
+
field :originating_company_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('originatingCompanyName') } }
|
|
19
|
+
# Code used to identify the ACH authorization method.
|
|
20
|
+
field :sec_code, Crystalline::Nilable.new(Models::Components::SECCode), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('secCode'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::SECCode, true) } }
|
|
21
|
+
# An optional override of your default ACH hold period in banking days. The hold period must be longer than or equal to your default setting.
|
|
22
|
+
field :debit_hold_period, Crystalline::Nilable.new(Models::Components::DebitHoldPeriod), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('debitHoldPeriod'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::DebitHoldPeriod, true) } }
|
|
23
|
+
|
|
24
|
+
field :addenda, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::TransferACHAddendaRecord)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('addenda') } }
|
|
25
|
+
|
|
26
|
+
sig { params(company_entry_description: T.nilable(::String), originating_company_name: T.nilable(::String), sec_code: T.nilable(Models::Components::SECCode), debit_hold_period: T.nilable(Models::Components::DebitHoldPeriod), addenda: T.nilable(T::Array[Models::Components::TransferACHAddendaRecord])).void }
|
|
27
|
+
def initialize(company_entry_description: nil, originating_company_name: nil, sec_code: nil, debit_hold_period: nil, addenda: nil)
|
|
28
|
+
@company_entry_description = company_entry_description
|
|
29
|
+
@originating_company_name = originating_company_name
|
|
30
|
+
@sec_code = sec_code
|
|
31
|
+
@debit_hold_period = debit_hold_period
|
|
32
|
+
@addenda = addenda
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
36
|
+
def ==(other)
|
|
37
|
+
return false unless other.is_a? self.class
|
|
38
|
+
return false unless @company_entry_description == other.company_entry_description
|
|
39
|
+
return false unless @originating_company_name == other.originating_company_name
|
|
40
|
+
return false unless @sec_code == other.sec_code
|
|
41
|
+
return false unless @debit_hold_period == other.debit_hold_period
|
|
42
|
+
return false unless @addenda == other.addenda
|
|
43
|
+
true
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::ACHDebitOptions
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::ACHDebitOptions
|
|
11
|
+
def company_entry_description(); end
|
|
12
|
+
def company_entry_description=(str_); end
|
|
13
|
+
def originating_company_name(); end
|
|
14
|
+
def originating_company_name=(str_); end
|
|
15
|
+
def sec_code(); end
|
|
16
|
+
def sec_code=(str_); end
|
|
17
|
+
def debit_hold_period(); end
|
|
18
|
+
def debit_hold_period=(str_); end
|
|
19
|
+
def addenda(); end
|
|
20
|
+
def addenda=(str_); end
|
|
21
|
+
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 ACHDebitTransferProcessingDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :trace_number, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('traceNumber'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :return_, Crystalline::Nilable.new(Models::Components::ACHException), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('return') } }
|
|
19
|
+
|
|
20
|
+
field :correction, Crystalline::Nilable.new(Models::Components::ACHException), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('correction') } }
|
|
21
|
+
|
|
22
|
+
sig { params(trace_number: ::String, return_: T.nilable(Models::Components::ACHException), correction: T.nilable(Models::Components::ACHException)).void }
|
|
23
|
+
def initialize(trace_number:, return_: nil, correction: nil)
|
|
24
|
+
@trace_number = trace_number
|
|
25
|
+
@return_ = return_
|
|
26
|
+
@correction = correction
|
|
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 @trace_number == other.trace_number
|
|
33
|
+
return false unless @return_ == other.return_
|
|
34
|
+
return false unless @correction == other.correction
|
|
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::ACHDebitTransferProcessingDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::ACHDebitTransferProcessingDetails
|
|
11
|
+
def trace_number(); end
|
|
12
|
+
def trace_number=(str_); end
|
|
13
|
+
def return_(); end
|
|
14
|
+
def return_=(str_); end
|
|
15
|
+
def correction(); end
|
|
16
|
+
def correction=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 AllowedScheduleError
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :timezone, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('timezone') } }
|
|
17
|
+
|
|
18
|
+
field :windows, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, Models::Components::ScheduleWindowError)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('windows') } }
|
|
19
|
+
|
|
20
|
+
sig { params(timezone: T.nilable(::String), windows: T.nilable(T::Hash[Symbol, Models::Components::ScheduleWindowError])).void }
|
|
21
|
+
def initialize(timezone: nil, windows: nil)
|
|
22
|
+
@timezone = timezone
|
|
23
|
+
@windows = windows
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
27
|
+
def ==(other)
|
|
28
|
+
return false unless other.is_a? self.class
|
|
29
|
+
return false unless @timezone == other.timezone
|
|
30
|
+
return false unless @windows == other.windows
|
|
31
|
+
true
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::AllowedScheduleError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::AllowedScheduleError
|
|
11
|
+
def timezone(); end
|
|
12
|
+
def timezone=(str_); end
|
|
13
|
+
def windows(); end
|
|
14
|
+
def windows=(str_); end
|
|
15
|
+
end
|
|
@@ -17,15 +17,18 @@ module Moov
|
|
|
17
17
|
|
|
18
18
|
field :created_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('createdOn'), required: true, 'decoder': ::Moov::Utils.datetime_from_iso_format(false) } }
|
|
19
19
|
|
|
20
|
-
field :amount, Models::Components::
|
|
20
|
+
field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
21
|
+
# ID of the capture this refund applies to, when applicable.
|
|
22
|
+
field :capture_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureID') } }
|
|
21
23
|
|
|
22
24
|
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
23
25
|
|
|
24
|
-
sig { params(refund_id: ::String, created_on: ::DateTime, amount: Models::Components::
|
|
25
|
-
def initialize(refund_id:, created_on:, amount:, amount_details: nil)
|
|
26
|
+
sig { params(refund_id: ::String, created_on: ::DateTime, amount: Models::Components::AmountDecimal, capture_id: T.nilable(::String), amount_details: T.nilable(Models::Components::RefundAmountDetails)).void }
|
|
27
|
+
def initialize(refund_id:, created_on:, amount:, capture_id: nil, amount_details: nil)
|
|
26
28
|
@refund_id = refund_id
|
|
27
29
|
@created_on = created_on
|
|
28
30
|
@amount = amount
|
|
31
|
+
@capture_id = capture_id
|
|
29
32
|
@amount_details = amount_details
|
|
30
33
|
end
|
|
31
34
|
|
|
@@ -35,6 +38,7 @@ module Moov
|
|
|
35
38
|
return false unless @refund_id == other.refund_id
|
|
36
39
|
return false unless @created_on == other.created_on
|
|
37
40
|
return false unless @amount == other.amount
|
|
41
|
+
return false unless @capture_id == other.capture_id
|
|
38
42
|
return false unless @amount_details == other.amount_details
|
|
39
43
|
true
|
|
40
44
|
end
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
# Details of a capture against an authorized transfer.
|
|
11
|
+
class Capture
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# Identifier for the capture.
|
|
16
|
+
field :capture_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureID'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
19
|
+
# Indicates whether this is the final capture against the authorization. When `true`, no further captures can be made.
|
|
20
|
+
field :is_final, Crystalline::Boolean.new, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isFinal'), required: true } }
|
|
21
|
+
|
|
22
|
+
field :status, Models::Components::CaptureStatus, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('status'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CaptureStatus, false) } }
|
|
23
|
+
|
|
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
|
+
# An optional description of the capture that is used on receipts and for your own internal use.
|
|
28
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
29
|
+
# Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
|
|
30
|
+
field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('metadata') } }
|
|
31
|
+
# Optional alias from a foreign/external system which can be used to reference this resource.
|
|
32
|
+
field :foreign_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('foreignID') } }
|
|
33
|
+
# An optional collection of line items for a transfer.
|
|
34
|
+
# When line items are provided, their total plus tax must equal the transfer amount.
|
|
35
|
+
field :line_items, Crystalline::Nilable.new(Models::Components::TransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
36
|
+
|
|
37
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::TransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
38
|
+
# The facilitator fee amount applied to the capture.
|
|
39
|
+
field :facilitator_fee_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('facilitatorFeeAmount') } }
|
|
40
|
+
|
|
41
|
+
sig { params(capture_id: ::String, amount: Models::Components::AmountDecimal, is_final: T::Boolean, status: Models::Components::CaptureStatus, created_on: ::DateTime, destination_payment_method_id: ::String, 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)).void }
|
|
42
|
+
def initialize(capture_id:, amount:, is_final:, status:, created_on:, destination_payment_method_id:, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil)
|
|
43
|
+
@capture_id = capture_id
|
|
44
|
+
@amount = amount
|
|
45
|
+
@is_final = is_final
|
|
46
|
+
@status = status
|
|
47
|
+
@created_on = created_on
|
|
48
|
+
@destination_payment_method_id = destination_payment_method_id
|
|
49
|
+
@description = description
|
|
50
|
+
@metadata = metadata
|
|
51
|
+
@foreign_id = foreign_id
|
|
52
|
+
@line_items = line_items
|
|
53
|
+
@amount_details = amount_details
|
|
54
|
+
@facilitator_fee_amount = facilitator_fee_amount
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
58
|
+
def ==(other)
|
|
59
|
+
return false unless other.is_a? self.class
|
|
60
|
+
return false unless @capture_id == other.capture_id
|
|
61
|
+
return false unless @amount == other.amount
|
|
62
|
+
return false unless @is_final == other.is_final
|
|
63
|
+
return false unless @status == other.status
|
|
64
|
+
return false unless @created_on == other.created_on
|
|
65
|
+
return false unless @destination_payment_method_id == other.destination_payment_method_id
|
|
66
|
+
return false unless @description == other.description
|
|
67
|
+
return false unless @metadata == other.metadata
|
|
68
|
+
return false unless @foreign_id == other.foreign_id
|
|
69
|
+
return false unless @line_items == other.line_items
|
|
70
|
+
return false unless @amount_details == other.amount_details
|
|
71
|
+
return false unless @facilitator_fee_amount == other.facilitator_fee_amount
|
|
72
|
+
true
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|