moov_ruby 26.7.1 → 26.10.0.pre.dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/moov/avatars.rb +1 -276
- data/lib/moov/card_issuing.rb +0 -116
- 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/capabilityid.rb +0 -1
- data/lib/moov/models/components/{avataruploadrequest.rb → contributingrule.rb} +8 -8
- data/lib/moov/models/components/contributingrule.rbi +13 -0
- data/lib/moov/models/components/createdtransfer.rb +2 -6
- data/lib/moov/models/components/createdtransfer.rbi +0 -2
- data/lib/moov/models/components/createrefund.rb +2 -2
- data/lib/moov/models/components/createreversal.rb +1 -1
- data/lib/moov/models/components/createtransfer.rb +2 -6
- data/lib/moov/models/components/createtransfer.rbi +0 -2
- data/lib/moov/models/components/fullissuedcard.rb +3 -3
- data/lib/moov/models/components/incurredfee.rb +2 -6
- data/lib/moov/models/components/incurredfee.rbi +0 -2
- data/lib/moov/models/components/issuedcard.rb +3 -3
- data/lib/moov/models/components/issuingcontrols.rb +2 -18
- data/lib/moov/models/components/issuingcontrols.rbi +0 -8
- data/lib/moov/models/components/issuingcontrolserror.rb +2 -18
- data/lib/moov/models/components/issuingcontrolserror.rbi +0 -8
- data/lib/moov/models/components/issuingintervallimit.rb +1 -4
- data/lib/moov/models/components/issuingvelocitylimit.rb +7 -11
- data/lib/moov/models/components/issuingvelocitylimit.rbi +2 -4
- data/lib/moov/models/components/issuingvelocitylimiterror.rb +2 -6
- data/lib/moov/models/components/issuingvelocitylimiterror.rbi +0 -2
- data/lib/moov/models/components/partnerriskoutcomesresponse.rb +38 -0
- data/lib/moov/models/components/partnerriskoutcomesresponse.rbi +15 -0
- data/lib/moov/models/components/paymentlinkpayoutdetails.rb +2 -8
- data/lib/moov/models/components/paymentlinkpayoutdetails.rbi +0 -2
- data/lib/moov/models/components/paymentlinkpayoutdetailsupdate.rb +2 -8
- data/lib/moov/models/components/paymentlinkpayoutdetailsupdate.rbi +0 -2
- data/lib/moov/models/components/paymentmethodswallet.rb +0 -1
- data/lib/moov/models/components/payoutdetailserror.rb +2 -6
- data/lib/moov/models/components/payoutdetailserror.rbi +0 -2
- data/lib/moov/models/components/product.rb +2 -6
- data/lib/moov/models/components/product.rbi +0 -2
- data/lib/moov/models/components/productrequest.rb +2 -6
- data/lib/moov/models/components/productrequest.rbi +0 -2
- data/lib/moov/models/components/sendfunds.rb +2 -6
- data/lib/moov/models/components/sendfunds.rbi +0 -2
- data/lib/moov/models/components/sendfundserror.rb +2 -6
- data/lib/moov/models/components/sendfundserror.rbi +0 -2
- data/lib/moov/models/components/transfer.rb +2 -6
- data/lib/moov/models/components/transfer.rbi +0 -2
- data/lib/moov/models/components/transferpaymentmethodswallet.rb +0 -1
- data/lib/moov/models/components/updateissuedcard.rb +2 -6
- data/lib/moov/models/components/updateissuedcard.rbi +0 -2
- data/lib/moov/models/components/wallet.rb +0 -1
- data/lib/moov/models/components/wallettype.rb +0 -2
- data/lib/moov/models/components/webhookdatatransferstatus.rb +0 -3
- data/lib/moov/models/components.rb +2 -34
- data/lib/moov/models/errors/productrequestvalidationerror.rb +2 -6
- data/lib/moov/models/errors/productrequestvalidationerror.rbi +0 -2
- data/lib/moov/models/errors/transfer_error.rb +2 -6
- data/lib/moov/models/errors/transfer_error.rbi +0 -2
- data/lib/moov/models/errors/updateissuedcarderror.rb +2 -6
- data/lib/moov/models/errors/updateissuedcarderror.rbi +0 -2
- data/lib/moov/models/operations/gettransferriskoutcomes_request.rb +37 -0
- data/lib/moov/models/operations/gettransferriskoutcomes_request.rbi +15 -0
- data/lib/moov/models/operations/{listissuingmerchantcategories_response.rb → gettransferriskoutcomes_response.rb} +6 -6
- data/lib/moov/models/operations/{deleteavatar_response.rbi → gettransferriskoutcomes_response.rbi} +4 -2
- data/lib/moov/models/operations/listproducts_request.rb +2 -8
- data/lib/moov/models/operations/listproducts_request.rbi +0 -2
- data/lib/moov/models/operations/listtransfers_request.rb +2 -10
- data/lib/moov/models/operations/listtransfers_request.rbi +0 -4
- data/lib/moov/models/operations.rb +2 -8
- data/lib/moov/products.rb +8 -113
- data/lib/moov/sdk_hooks/hooks.rb +0 -6
- data/lib/moov/sdkconfiguration.rb +4 -4
- data/lib/moov/transfers.rb +125 -0
- data/lib/moov_ruby.rb +1 -1
- metadata +12 -90
- data/lib/moov/models/components/allowedscheduleerror.rb +0 -36
- data/lib/moov/models/components/allowedscheduleerror.rbi +0 -15
- data/lib/moov/models/components/avataruploadrequest.rbi +0 -13
- data/lib/moov/models/components/avataruploadrequest_file.rb +0 -36
- data/lib/moov/models/components/avataruploadrequest_file.rbi +0 -15
- data/lib/moov/models/components/feepaidby.rb +0 -19
- data/lib/moov/models/components/feepaidby.rbi +0 -11
- data/lib/moov/models/components/issuedcontrols.rb +0 -52
- data/lib/moov/models/components/issuedcontrols.rbi +0 -23
- data/lib/moov/models/components/issuedcontrols_allowedschedule.rb +0 -36
- data/lib/moov/models/components/issuedcontrols_allowedschedule.rbi +0 -15
- data/lib/moov/models/components/issuedvelocitylimit.rb +0 -60
- data/lib/moov/models/components/issuedvelocitylimit.rbi +0 -27
- data/lib/moov/models/components/issuingcontrols_allowedschedule.rb +0 -36
- data/lib/moov/models/components/issuingcontrols_allowedschedule.rbi +0 -15
- data/lib/moov/models/components/issuingcontrolsrestrictionmode.rb +0 -19
- data/lib/moov/models/components/issuingcontrolsrestrictionmode.rbi +0 -11
- data/lib/moov/models/components/issuingmerchantcategory.rb +0 -43
- data/lib/moov/models/components/issuingmerchantcategory.rbi +0 -11
- data/lib/moov/models/components/issuingscheduleday.rb +0 -24
- data/lib/moov/models/components/issuingscheduleday.rbi +0 -11
- data/lib/moov/models/components/merchantcategories.rb +0 -32
- data/lib/moov/models/components/merchantcategories.rbi +0 -13
- data/lib/moov/models/components/merchantcategory.rb +0 -37
- data/lib/moov/models/components/merchantcategory.rbi +0 -15
- data/lib/moov/models/components/merchantcategoryrestrictions.rb +0 -44
- data/lib/moov/models/components/merchantcategoryrestrictions.rbi +0 -19
- data/lib/moov/models/components/merchantcategoryrestrictionserror.rb +0 -44
- data/lib/moov/models/components/merchantcategoryrestrictionserror.rbi +0 -19
- data/lib/moov/models/components/merchantentry.rb +0 -40
- data/lib/moov/models/components/merchantentry.rbi +0 -17
- data/lib/moov/models/components/merchantentryerror.rb +0 -36
- data/lib/moov/models/components/merchantentryerror.rbi +0 -15
- data/lib/moov/models/components/merchantrestrictions.rb +0 -36
- data/lib/moov/models/components/merchantrestrictions.rbi +0 -15
- data/lib/moov/models/components/merchantrestrictionserror.rb +0 -36
- data/lib/moov/models/components/merchantrestrictionserror.rbi +0 -15
- data/lib/moov/models/components/productcategories.rb +0 -32
- data/lib/moov/models/components/productcategories.rbi +0 -13
- data/lib/moov/models/components/productcategory.rb +0 -48
- data/lib/moov/models/components/productcategory.rbi +0 -21
- data/lib/moov/models/components/schedulewindow.rb +0 -40
- data/lib/moov/models/components/schedulewindow.rbi +0 -17
- data/lib/moov/models/components/schedulewindowerror.rb +0 -40
- data/lib/moov/models/components/schedulewindowerror.rbi +0 -17
- data/lib/moov/models/components/schemebasicauth.rb +0 -36
- data/lib/moov/models/components/schemebasicauth.rbi +0 -15
- data/lib/moov/models/components/schemeoauth2auth.rb +0 -40
- data/lib/moov/models/components/schemeoauth2auth.rbi +0 -17
- data/lib/moov/models/components/sendfundswire.rb +0 -32
- data/lib/moov/models/components/sendfundswire.rbi +0 -13
- data/lib/moov/models/components/sendfundswireerror.rb +0 -32
- data/lib/moov/models/components/sendfundswireerror.rbi +0 -13
- data/lib/moov/models/components/transfercapture.rb +0 -36
- data/lib/moov/models/components/transfercapture.rbi +0 -15
- data/lib/moov/models/components/transferfeepaidby.rb +0 -32
- data/lib/moov/models/components/transferfeepaidby.rbi +0 -13
- data/lib/moov/models/components/updateissuingcontrols.rb +0 -48
- data/lib/moov/models/components/updateissuingcontrols.rbi +0 -21
- data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rb +0 -36
- data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rbi +0 -15
- data/lib/moov/models/components/updateissuingcontrols_merchantcategoryrestrictions.rb +0 -44
- data/lib/moov/models/components/updateissuingcontrols_merchantcategoryrestrictions.rbi +0 -19
- data/lib/moov/models/components/updateissuingcontrols_merchantrestrictions.rb +0 -36
- data/lib/moov/models/components/updateissuingcontrols_merchantrestrictions.rbi +0 -15
- data/lib/moov/models/components/updateissuingcontrolserror.rb +0 -48
- data/lib/moov/models/components/updateissuingcontrolserror.rbi +0 -21
- data/lib/moov/models/operations/deleteavatar_request.rb +0 -32
- data/lib/moov/models/operations/deleteavatar_request.rbi +0 -13
- data/lib/moov/models/operations/deleteavatar_response.rb +0 -44
- data/lib/moov/models/operations/deleteavatar_security.rb +0 -36
- data/lib/moov/models/operations/deleteavatar_security.rbi +0 -15
- data/lib/moov/models/operations/listissuingmerchantcategories_response.rbi +0 -21
- data/lib/moov/models/operations/listproductcategories_response.rb +0 -48
- data/lib/moov/models/operations/listproductcategories_response.rbi +0 -21
- data/lib/moov/models/operations/uploadavatar_request.rb +0 -36
- data/lib/moov/models/operations/uploadavatar_request.rbi +0 -15
- data/lib/moov/models/operations/uploadavatar_response.rb +0 -44
- data/lib/moov/models/operations/uploadavatar_response.rbi +0 -19
- data/lib/moov/models/operations/uploadavatar_security.rb +0 -36
- data/lib/moov/models/operations/uploadavatar_security.rbi +0 -15
- data/lib/moov/sdk_hooks/clientcredentials.rb +0 -386
- data/lib/moov/sdk_hooks/oauth2scopes.rb +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c77bbc725f68cede57f1adda1d48f0f6f4c1ab78645734966d6fd09845a7d7c4
|
|
4
|
+
data.tar.gz: a93a955ff6d05c724042a966f86e8059676efdfcd666e8be6e7d1bef2e8afd4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9aedc88867bbbd6d40de65e27b7d7b8dbdf8af12bd9dafa94b46a2903e60c21b8171bd62ec8156497e666d8ae9ce3f821de00cc60824020aff88ac1c1a717485
|
|
7
|
+
data.tar.gz: 88cc77ac6ceeabe19385945a5423ca7b0c6809e77d6410046efc1c0d0af6c2363e14bd1f94c7fecd00b4fb4a94ed858323402b33755b83847ce11c4b4568b6a3
|
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
|
|
@@ -159,280 +159,5 @@ module Moov
|
|
|
159
159
|
|
|
160
160
|
end
|
|
161
161
|
end
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
sig { params(security: Models::Operations::UploadAvatarSecurity, avatar_upload_request: Models::Components::AvatarUploadRequest, unique_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::UploadAvatarResponse) }
|
|
165
|
-
def upload(security:, avatar_upload_request:, unique_id:, timeout_ms: nil, http_headers: nil)
|
|
166
|
-
# upload - Upload a user avatar image for an account.
|
|
167
|
-
#
|
|
168
|
-
# The image will be normalized to 512x512 PNG format and stored separately from
|
|
169
|
-
# automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
|
|
170
|
-
#
|
|
171
|
-
# This endpoint only accepts accountID values for the uniqueID parameter.
|
|
172
|
-
#
|
|
173
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
174
|
-
# you'll need to specify the `/accounts.write` scope.
|
|
175
|
-
request = Models::Operations::UploadAvatarRequest.new(
|
|
176
|
-
unique_id: unique_id,
|
|
177
|
-
avatar_upload_request: avatar_upload_request
|
|
178
|
-
)
|
|
179
|
-
url, params = @sdk_configuration.get_server_details
|
|
180
|
-
base_url = Utils.template_url(url, params)
|
|
181
|
-
url = Utils.generate_url(
|
|
182
|
-
Models::Operations::UploadAvatarRequest,
|
|
183
|
-
base_url,
|
|
184
|
-
'/avatars/{uniqueID}',
|
|
185
|
-
request
|
|
186
|
-
)
|
|
187
|
-
headers = {}
|
|
188
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
189
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :avatar_upload_request, :multipart)
|
|
190
|
-
headers['content-type'] = req_content_type
|
|
191
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
192
|
-
|
|
193
|
-
if form && !form.empty?
|
|
194
|
-
body = Utils.encode_form(form)
|
|
195
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
196
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
197
|
-
else
|
|
198
|
-
body = data
|
|
199
|
-
end
|
|
200
|
-
headers['Accept'] = 'application/json'
|
|
201
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
|
202
|
-
|
|
203
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
204
|
-
timeout ||= @sdk_configuration.timeout
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
connection = @sdk_configuration.client
|
|
208
|
-
|
|
209
|
-
hook_ctx = SDKHooks::HookContext.new(
|
|
210
|
-
config: @sdk_configuration,
|
|
211
|
-
base_url: base_url,
|
|
212
|
-
oauth2_scopes: ['/accounts.write'],
|
|
213
|
-
operation_id: 'uploadAvatar',
|
|
214
|
-
security_source: -> { security }
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
218
|
-
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
begin
|
|
222
|
-
http_response = T.must(connection).put(url) do |req|
|
|
223
|
-
req.body = body
|
|
224
|
-
req.headers.merge!(headers)
|
|
225
|
-
req.options.timeout = timeout unless timeout.nil?
|
|
226
|
-
Utils.configure_request_security(req, security)
|
|
227
|
-
http_headers&.each do |key, value|
|
|
228
|
-
req.headers[key.to_s] = value
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
@sdk_configuration.hooks.before_request(
|
|
232
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
233
|
-
hook_ctx: hook_ctx
|
|
234
|
-
),
|
|
235
|
-
request: req
|
|
236
|
-
)
|
|
237
|
-
end
|
|
238
|
-
rescue StandardError => e
|
|
239
|
-
error = e
|
|
240
|
-
ensure
|
|
241
|
-
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
242
|
-
http_response = @sdk_configuration.hooks.after_error(
|
|
243
|
-
error: error,
|
|
244
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
245
|
-
hook_ctx: hook_ctx
|
|
246
|
-
),
|
|
247
|
-
response: http_response
|
|
248
|
-
)
|
|
249
|
-
else
|
|
250
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
251
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
252
|
-
hook_ctx: hook_ctx
|
|
253
|
-
),
|
|
254
|
-
response: http_response
|
|
255
|
-
)
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
if http_response.nil?
|
|
259
|
-
raise error if !error.nil?
|
|
260
|
-
raise 'no response'
|
|
261
|
-
end
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
265
|
-
if Utils.match_status_code(http_response.status, ['204'])
|
|
266
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
267
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
268
|
-
hook_ctx: hook_ctx
|
|
269
|
-
),
|
|
270
|
-
response: http_response
|
|
271
|
-
)
|
|
272
|
-
return Models::Operations::UploadAvatarResponse.new(
|
|
273
|
-
status_code: http_response.status,
|
|
274
|
-
content_type: content_type,
|
|
275
|
-
raw_response: http_response,
|
|
276
|
-
headers: {}
|
|
277
|
-
)
|
|
278
|
-
elsif Utils.match_status_code(http_response.status, ['400'])
|
|
279
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
280
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
281
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
282
|
-
hook_ctx: hook_ctx
|
|
283
|
-
),
|
|
284
|
-
response: http_response
|
|
285
|
-
)
|
|
286
|
-
response_data = http_response.env.response_body
|
|
287
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
288
|
-
obj.raw_response = http_response
|
|
289
|
-
raise obj
|
|
290
|
-
else
|
|
291
|
-
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'
|
|
292
|
-
end
|
|
293
|
-
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '413', '415', '429'])
|
|
294
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
295
|
-
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
296
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
297
|
-
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
298
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
299
|
-
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
300
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
301
|
-
else
|
|
302
|
-
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'
|
|
303
|
-
|
|
304
|
-
end
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
sig { params(security: Models::Operations::DeleteAvatarSecurity, unique_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::DeleteAvatarResponse) }
|
|
309
|
-
def delete(security:, unique_id:, timeout_ms: nil, http_headers: nil)
|
|
310
|
-
# delete - Delete a user-uploaded avatar for an account.
|
|
311
|
-
#
|
|
312
|
-
# After deletion, the avatar endpoint will fall back to the enriched avatar
|
|
313
|
-
# or an account-type-aware fallback icon.
|
|
314
|
-
#
|
|
315
|
-
# This endpoint only accepts accountID values for the uniqueID parameter.
|
|
316
|
-
#
|
|
317
|
-
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
318
|
-
# you'll need to specify the `/accounts.write` scope.
|
|
319
|
-
request = Models::Operations::DeleteAvatarRequest.new(
|
|
320
|
-
unique_id: unique_id
|
|
321
|
-
)
|
|
322
|
-
url, params = @sdk_configuration.get_server_details
|
|
323
|
-
base_url = Utils.template_url(url, params)
|
|
324
|
-
url = Utils.generate_url(
|
|
325
|
-
Models::Operations::DeleteAvatarRequest,
|
|
326
|
-
base_url,
|
|
327
|
-
'/avatars/{uniqueID}',
|
|
328
|
-
request
|
|
329
|
-
)
|
|
330
|
-
headers = {}
|
|
331
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
332
|
-
headers['Accept'] = 'application/json'
|
|
333
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
|
334
|
-
|
|
335
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
336
|
-
timeout ||= @sdk_configuration.timeout
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
connection = @sdk_configuration.client
|
|
340
|
-
|
|
341
|
-
hook_ctx = SDKHooks::HookContext.new(
|
|
342
|
-
config: @sdk_configuration,
|
|
343
|
-
base_url: base_url,
|
|
344
|
-
oauth2_scopes: ['/accounts.write'],
|
|
345
|
-
operation_id: 'deleteAvatar',
|
|
346
|
-
security_source: -> { security }
|
|
347
|
-
)
|
|
348
|
-
|
|
349
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
350
|
-
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
begin
|
|
354
|
-
http_response = T.must(connection).delete(url) do |req|
|
|
355
|
-
req.headers.merge!(headers)
|
|
356
|
-
req.options.timeout = timeout unless timeout.nil?
|
|
357
|
-
Utils.configure_request_security(req, security)
|
|
358
|
-
http_headers&.each do |key, value|
|
|
359
|
-
req.headers[key.to_s] = value
|
|
360
|
-
end
|
|
361
|
-
|
|
362
|
-
@sdk_configuration.hooks.before_request(
|
|
363
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
364
|
-
hook_ctx: hook_ctx
|
|
365
|
-
),
|
|
366
|
-
request: req
|
|
367
|
-
)
|
|
368
|
-
end
|
|
369
|
-
rescue StandardError => e
|
|
370
|
-
error = e
|
|
371
|
-
ensure
|
|
372
|
-
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
373
|
-
http_response = @sdk_configuration.hooks.after_error(
|
|
374
|
-
error: error,
|
|
375
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
376
|
-
hook_ctx: hook_ctx
|
|
377
|
-
),
|
|
378
|
-
response: http_response
|
|
379
|
-
)
|
|
380
|
-
else
|
|
381
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
382
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
383
|
-
hook_ctx: hook_ctx
|
|
384
|
-
),
|
|
385
|
-
response: http_response
|
|
386
|
-
)
|
|
387
|
-
end
|
|
388
|
-
|
|
389
|
-
if http_response.nil?
|
|
390
|
-
raise error if !error.nil?
|
|
391
|
-
raise 'no response'
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
396
|
-
if Utils.match_status_code(http_response.status, ['204'])
|
|
397
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
398
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
399
|
-
hook_ctx: hook_ctx
|
|
400
|
-
),
|
|
401
|
-
response: http_response
|
|
402
|
-
)
|
|
403
|
-
return Models::Operations::DeleteAvatarResponse.new(
|
|
404
|
-
status_code: http_response.status,
|
|
405
|
-
content_type: content_type,
|
|
406
|
-
raw_response: http_response,
|
|
407
|
-
headers: {}
|
|
408
|
-
)
|
|
409
|
-
elsif Utils.match_status_code(http_response.status, ['400'])
|
|
410
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
411
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
412
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
413
|
-
hook_ctx: hook_ctx
|
|
414
|
-
),
|
|
415
|
-
response: http_response
|
|
416
|
-
)
|
|
417
|
-
response_data = http_response.env.response_body
|
|
418
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
419
|
-
obj.raw_response = http_response
|
|
420
|
-
raise obj
|
|
421
|
-
else
|
|
422
|
-
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'
|
|
423
|
-
end
|
|
424
|
-
elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
|
|
425
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
426
|
-
elsif Utils.match_status_code(http_response.status, ['500', '504'])
|
|
427
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
428
|
-
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
429
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
430
|
-
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
431
|
-
raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
432
|
-
else
|
|
433
|
-
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'
|
|
434
|
-
|
|
435
|
-
end
|
|
436
|
-
end
|
|
437
162
|
end
|
|
438
163
|
end
|
data/lib/moov/card_issuing.rb
CHANGED
|
@@ -41,122 +41,6 @@ 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
|
-
|
|
160
44
|
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) }
|
|
161
45
|
def request(request_card:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
162
46
|
# 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, :issuing_transactions, :card_issuing, :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
|
-
@card_issuing = CardIssuing.new(@sdk_configuration)
|
|
117
116
|
@issuing_transactions = IssuingTransactions.new(@sdk_configuration)
|
|
117
|
+
@card_issuing = CardIssuing.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.
|
|
@@ -25,7 +25,6 @@ module Moov
|
|
|
25
25
|
SEND_FUNDS_ACH = new('send-funds.ach')
|
|
26
26
|
SEND_FUNDS_RTP = new('send-funds.rtp')
|
|
27
27
|
SEND_FUNDS_INSTANT_BANK = new('send-funds.instant-bank')
|
|
28
|
-
SEND_FUNDS_WIRE = new('send-funds.wire')
|
|
29
28
|
COLLECT_FUNDS = new('collect-funds')
|
|
30
29
|
COLLECT_FUNDS_CARD_PAYMENTS = new('collect-funds.card-payments')
|
|
31
30
|
MONEY_TRANSFER_PULL_FROM_CARD = new('money-transfer.pull-from-card')
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
module Moov
|
|
8
8
|
module Models
|
|
9
9
|
module Components
|
|
10
|
-
|
|
11
|
-
class
|
|
10
|
+
# A risk rule that contributed to a transfer's risk decision.
|
|
11
|
+
class ContributingRule
|
|
12
12
|
extend T::Sig
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
field :
|
|
15
|
+
# Human-readable name of the contributing risk rule.
|
|
16
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
|
|
17
17
|
|
|
18
|
-
sig { params(
|
|
19
|
-
def initialize(
|
|
20
|
-
@
|
|
18
|
+
sig { params(name: ::String).void }
|
|
19
|
+
def initialize(name:)
|
|
20
|
+
@name = name
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
24
|
def ==(other)
|
|
25
25
|
return false unless other.is_a? self.class
|
|
26
|
-
return false unless @
|
|
26
|
+
return false unless @name == other.name
|
|
27
27
|
true
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::ContributingRule
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::ContributingRule
|
|
11
|
+
def name(); end
|
|
12
|
+
def name=(str_); end
|
|
13
|
+
end
|
|
@@ -67,11 +67,9 @@ module Moov
|
|
|
67
67
|
field :line_items, Crystalline::Nilable.new(Models::Components::TransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
68
68
|
|
|
69
69
|
field :amount_details, Crystalline::Nilable.new(Models::Components::TransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
70
|
-
# The card authorization and capture IDs associated with a transfer.
|
|
71
|
-
field :capture, Crystalline::Nilable.new(Models::Components::TransferCapture), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('capture') } }
|
|
72
70
|
|
|
73
|
-
sig { params(transfer_id: ::String, created_on: ::DateTime, source: T.nilable(Models::Components::TransferSource), destination: T.nilable(Models::Components::TransferDestination), completed_on: T.nilable(::DateTime), status: T.nilable(Models::Components::TransferStatus), failure_reason: T.nilable(Models::Components::TransferFailureReason), amount: T.nilable(Models::Components::Amount), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), facilitator_fee: T.nilable(Models::Components::FacilitatorFee), moov_fee: T.nilable(::Integer), moov_fee_decimal: T.nilable(::String), moov_fee_details: T.nilable(Models::Components::MoovFeeDetails), group_id: T.nilable(::String), cancellations: T.nilable(T::Array[Models::Components::Cancellation]), refunded_amount: T.nilable(Models::Components::Amount), refunds: T.nilable(T::Array[Models::Components::CardAcquiringRefund]), disputed_amount: T.nilable(Models::Components::Amount), disputes: T.nilable(T::Array[Models::Components::CardAcquiringDispute]), sweep_id: T.nilable(::String), schedule_id: T.nilable(::String), occurrence_id: T.nilable(::String), payment_link_code: T.nilable(::String), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::TransferLineItems), amount_details: T.nilable(Models::Components::TransferAmountDetails)
|
|
74
|
-
def initialize(transfer_id:, created_on:, source: nil, destination: nil, completed_on: nil, status: nil, failure_reason: nil, amount: nil, description: nil, metadata: nil, facilitator_fee: nil, moov_fee: nil, moov_fee_decimal: nil, moov_fee_details: nil, group_id: nil, cancellations: nil, refunded_amount: nil, refunds: nil, disputed_amount: nil, disputes: nil, sweep_id: nil, schedule_id: nil, occurrence_id: nil, payment_link_code: nil, foreign_id: nil, line_items: nil, amount_details: nil
|
|
71
|
+
sig { params(transfer_id: ::String, created_on: ::DateTime, source: T.nilable(Models::Components::TransferSource), destination: T.nilable(Models::Components::TransferDestination), completed_on: T.nilable(::DateTime), status: T.nilable(Models::Components::TransferStatus), failure_reason: T.nilable(Models::Components::TransferFailureReason), amount: T.nilable(Models::Components::Amount), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), facilitator_fee: T.nilable(Models::Components::FacilitatorFee), moov_fee: T.nilable(::Integer), moov_fee_decimal: T.nilable(::String), moov_fee_details: T.nilable(Models::Components::MoovFeeDetails), group_id: T.nilable(::String), cancellations: T.nilable(T::Array[Models::Components::Cancellation]), refunded_amount: T.nilable(Models::Components::Amount), refunds: T.nilable(T::Array[Models::Components::CardAcquiringRefund]), disputed_amount: T.nilable(Models::Components::Amount), disputes: T.nilable(T::Array[Models::Components::CardAcquiringDispute]), sweep_id: T.nilable(::String), schedule_id: T.nilable(::String), occurrence_id: T.nilable(::String), payment_link_code: T.nilable(::String), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::TransferLineItems), amount_details: T.nilable(Models::Components::TransferAmountDetails)).void }
|
|
72
|
+
def initialize(transfer_id:, created_on:, source: nil, destination: nil, completed_on: nil, status: nil, failure_reason: nil, amount: nil, description: nil, metadata: nil, facilitator_fee: nil, moov_fee: nil, moov_fee_decimal: nil, moov_fee_details: nil, group_id: nil, cancellations: nil, refunded_amount: nil, refunds: nil, disputed_amount: nil, disputes: nil, sweep_id: nil, schedule_id: nil, occurrence_id: nil, payment_link_code: nil, foreign_id: nil, line_items: nil, amount_details: nil)
|
|
75
73
|
@transfer_id = transfer_id
|
|
76
74
|
@created_on = created_on
|
|
77
75
|
@source = source
|
|
@@ -99,7 +97,6 @@ module Moov
|
|
|
99
97
|
@foreign_id = foreign_id
|
|
100
98
|
@line_items = line_items
|
|
101
99
|
@amount_details = amount_details
|
|
102
|
-
@capture = capture
|
|
103
100
|
end
|
|
104
101
|
|
|
105
102
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -132,7 +129,6 @@ module Moov
|
|
|
132
129
|
return false unless @foreign_id == other.foreign_id
|
|
133
130
|
return false unless @line_items == other.line_items
|
|
134
131
|
return false unless @amount_details == other.amount_details
|
|
135
|
-
return false unless @capture == other.capture
|
|
136
132
|
true
|
|
137
133
|
end
|
|
138
134
|
end
|
|
@@ -9,12 +9,12 @@ module Moov
|
|
|
9
9
|
module Components
|
|
10
10
|
# Specifies a partial amount to refund.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
12
|
+
# This request body is optional, an empty body will issue a refund for the full amount of the original transfer.
|
|
13
13
|
class CreateRefund
|
|
14
14
|
extend T::Sig
|
|
15
15
|
include Crystalline::MetadataFields
|
|
16
16
|
|
|
17
|
-
# Amount to refund
|
|
17
|
+
# Amount to refund in cents. If null, the original transfer's full amount will be refunded.
|
|
18
18
|
field :amount, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
19
19
|
# Breakdown of the refunded amount.
|
|
20
20
|
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
@@ -12,7 +12,7 @@ module Moov
|
|
|
12
12
|
extend T::Sig
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
|
-
# Amount to reverse
|
|
15
|
+
# Amount to reverse in cents. Partial amounts will automatically trigger a refund instead of a cancellation.
|
|
16
16
|
field :amount, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
17
17
|
# Breakdown of the reversed amount.
|
|
18
18
|
field :amount_details, Crystalline::Nilable.new(Models::Components::ReversalAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
@@ -31,11 +31,9 @@ module Moov
|
|
|
31
31
|
field :line_items, Crystalline::Nilable.new(Models::Components::CreateTransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
32
32
|
|
|
33
33
|
field :amount_details, Crystalline::Nilable.new(Models::Components::CreateTransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
34
|
-
# Indicates which party bears fees for the transfer, keyed by fee type.
|
|
35
|
-
field :fee_paid_by, Crystalline::Nilable.new(Models::Components::TransferFeePaidBy), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('feePaidBy') } }
|
|
36
34
|
|
|
37
|
-
sig { params(source: Models::Components::CreateTransferSource, destination: Models::Components::CreateTransferDestination, amount: Models::Components::Amount, facilitator_fee: T.nilable(Models::Components::FacilitatorFee), 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)
|
|
38
|
-
def initialize(source:, destination:, amount:, facilitator_fee: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil
|
|
35
|
+
sig { params(source: Models::Components::CreateTransferSource, destination: Models::Components::CreateTransferDestination, amount: Models::Components::Amount, facilitator_fee: T.nilable(Models::Components::FacilitatorFee), 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)).void }
|
|
36
|
+
def initialize(source:, destination:, amount:, facilitator_fee: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil)
|
|
39
37
|
@source = source
|
|
40
38
|
@destination = destination
|
|
41
39
|
@amount = amount
|
|
@@ -45,7 +43,6 @@ module Moov
|
|
|
45
43
|
@foreign_id = foreign_id
|
|
46
44
|
@line_items = line_items
|
|
47
45
|
@amount_details = amount_details
|
|
48
|
-
@fee_paid_by = fee_paid_by
|
|
49
46
|
end
|
|
50
47
|
|
|
51
48
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -60,7 +57,6 @@ module Moov
|
|
|
60
57
|
return false unless @foreign_id == other.foreign_id
|
|
61
58
|
return false unless @line_items == other.line_items
|
|
62
59
|
return false unless @amount_details == other.amount_details
|
|
63
|
-
return false unless @fee_paid_by == other.fee_paid_by
|
|
64
60
|
true
|
|
65
61
|
end
|
|
66
62
|
end
|