moov_ruby 0.0.0.pre.dev.24 → 0.0.0.pre.dev.25
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/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 -26
- data/lib/moov/models/components/createdtransfer.rbi +8 -10
- 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/instantbankcredittransferprocessingdetails.rb +44 -0
- data/lib/moov/models/components/instantbankcredittransferprocessingdetails.rbi +19 -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/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/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 -26
- data/lib/moov/models/components/transfer.rbi +8 -10
- 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/{achtransactionstatus.rbi → transfertype.rbi} +2 -2
- 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 +26 -10
- 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 -26
- data/lib/moov/models/errors/transfer_error.rbi +8 -10
- 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 +6 -2
- data/lib/moov/models/operations/listtransfers_request.rbi +2 -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 +70 -22
- 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/cardtransactionstatus.rbi +0 -11
- 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
- data/lib/moov/models/components/transfercapture.rb +0 -36
- data/lib/moov/models/components/transfercapture.rbi +0 -15
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class Moov::Models::Components::
|
|
5
|
+
class Moov::Models::Components::CaptureStatus
|
|
6
6
|
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Moov::Models::Components::
|
|
10
|
+
class Moov::Models::Components::CaptureStatus
|
|
11
11
|
end
|
|
@@ -21,21 +21,24 @@ module Moov
|
|
|
21
21
|
|
|
22
22
|
field :status, Models::Components::RefundStatus, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('status'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::RefundStatus, false) } }
|
|
23
23
|
|
|
24
|
-
field :amount, Models::Components::
|
|
24
|
+
field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
25
25
|
|
|
26
|
-
field :
|
|
26
|
+
field :processing_details, Models::Components::RefundProcessingDetails, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('processingDetails'), required: true } }
|
|
27
|
+
# ID of the capture this refund applies to, when applicable.
|
|
28
|
+
field :capture_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureID') } }
|
|
27
29
|
|
|
28
|
-
field :
|
|
30
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
29
31
|
|
|
30
|
-
sig { params(refund_id: ::String, created_on: ::DateTime, updated_on: ::DateTime, status: Models::Components::RefundStatus, amount: Models::Components::
|
|
31
|
-
def initialize(refund_id:, created_on:, updated_on:, status:, amount:,
|
|
32
|
+
sig { params(refund_id: ::String, created_on: ::DateTime, updated_on: ::DateTime, status: Models::Components::RefundStatus, amount: Models::Components::AmountDecimal, processing_details: Models::Components::RefundProcessingDetails, capture_id: T.nilable(::String), amount_details: T.nilable(Models::Components::RefundAmountDetails)).void }
|
|
33
|
+
def initialize(refund_id:, created_on:, updated_on:, status:, amount:, processing_details:, capture_id: nil, amount_details: nil)
|
|
32
34
|
@refund_id = refund_id
|
|
33
35
|
@created_on = created_on
|
|
34
36
|
@updated_on = updated_on
|
|
35
37
|
@status = status
|
|
36
38
|
@amount = amount
|
|
39
|
+
@processing_details = processing_details
|
|
40
|
+
@capture_id = capture_id
|
|
37
41
|
@amount_details = amount_details
|
|
38
|
-
@card_details = card_details
|
|
39
42
|
end
|
|
40
43
|
|
|
41
44
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -46,8 +49,9 @@ module Moov
|
|
|
46
49
|
return false unless @updated_on == other.updated_on
|
|
47
50
|
return false unless @status == other.status
|
|
48
51
|
return false unless @amount == other.amount
|
|
52
|
+
return false unless @processing_details == other.processing_details
|
|
53
|
+
return false unless @capture_id == other.capture_id
|
|
49
54
|
return false unless @amount_details == other.amount_details
|
|
50
|
-
return false unless @card_details == other.card_details
|
|
51
55
|
true
|
|
52
56
|
end
|
|
53
57
|
end
|
|
@@ -18,8 +18,10 @@ class Moov::Models::Components::CardAcquiringRefund
|
|
|
18
18
|
def status=(str_); end
|
|
19
19
|
def amount(); end
|
|
20
20
|
def amount=(str_); end
|
|
21
|
+
def processing_details(); end
|
|
22
|
+
def processing_details=(str_); end
|
|
23
|
+
def capture_id(); end
|
|
24
|
+
def capture_id=(str_); end
|
|
21
25
|
def amount_details(); end
|
|
22
26
|
def amount_details=(str_); end
|
|
23
|
-
def card_details(); end
|
|
24
|
-
def card_details=(str_); end
|
|
25
27
|
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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 CardPaymentOptions
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.
|
|
16
|
+
field :dynamic_descriptor, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dynamicDescriptor') } }
|
|
17
|
+
# Specifies the nature and initiator of a transaction.
|
|
18
|
+
#
|
|
19
|
+
# Crucial for recurring and merchant-initiated transactions as per card scheme rules.
|
|
20
|
+
# Omit for customer-initiated e-commerce transactions.
|
|
21
|
+
field :transaction_source, Crystalline::Nilable.new(Models::Components::TransactionSource), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('transactionSource'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::TransactionSource, true) } }
|
|
22
|
+
|
|
23
|
+
sig { params(dynamic_descriptor: T.nilable(::String), transaction_source: T.nilable(Models::Components::TransactionSource)).void }
|
|
24
|
+
def initialize(dynamic_descriptor: nil, transaction_source: nil)
|
|
25
|
+
@dynamic_descriptor = dynamic_descriptor
|
|
26
|
+
@transaction_source = transaction_source
|
|
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 @dynamic_descriptor == other.dynamic_descriptor
|
|
33
|
+
return false unless @transaction_source == other.transaction_source
|
|
34
|
+
true
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CardPaymentOptions
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CardPaymentOptions
|
|
11
|
+
def dynamic_descriptor(); end
|
|
12
|
+
def dynamic_descriptor=(str_); end
|
|
13
|
+
def transaction_source(); end
|
|
14
|
+
def transaction_source=(str_); end
|
|
15
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class CardPaymentRefundProcessingDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :failure_code, Crystalline::Nilable.new(Models::Components::CardTransactionFailureCode), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('failureCode'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CardTransactionFailureCode, true) } }
|
|
17
|
+
|
|
18
|
+
sig { params(failure_code: T.nilable(Models::Components::CardTransactionFailureCode)).void }
|
|
19
|
+
def initialize(failure_code: nil)
|
|
20
|
+
@failure_code = failure_code
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a? self.class
|
|
26
|
+
return false unless @failure_code == other.failure_code
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CardPaymentRefundProcessingDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CardPaymentRefundProcessingDetails
|
|
11
|
+
def failure_code(); end
|
|
12
|
+
def failure_code=(str_); end
|
|
13
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
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 CardPaymentTransferProcessingDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :authorization_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('authorizationCode') } }
|
|
17
|
+
|
|
18
|
+
field :network_transaction_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('networkTransactionID') } }
|
|
19
|
+
|
|
20
|
+
field :network_response_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('networkResponseCode') } }
|
|
21
|
+
|
|
22
|
+
field :failure_code, Crystalline::Nilable.new(Models::Components::CardTransactionFailureCode), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('failureCode'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CardTransactionFailureCode, true) } }
|
|
23
|
+
|
|
24
|
+
sig { params(authorization_code: T.nilable(::String), network_transaction_id: T.nilable(::String), network_response_code: T.nilable(::String), failure_code: T.nilable(Models::Components::CardTransactionFailureCode)).void }
|
|
25
|
+
def initialize(authorization_code: nil, network_transaction_id: nil, network_response_code: nil, failure_code: nil)
|
|
26
|
+
@authorization_code = authorization_code
|
|
27
|
+
@network_transaction_id = network_transaction_id
|
|
28
|
+
@network_response_code = network_response_code
|
|
29
|
+
@failure_code = failure_code
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
33
|
+
def ==(other)
|
|
34
|
+
return false unless other.is_a? self.class
|
|
35
|
+
return false unless @authorization_code == other.authorization_code
|
|
36
|
+
return false unless @network_transaction_id == other.network_transaction_id
|
|
37
|
+
return false unless @network_response_code == other.network_response_code
|
|
38
|
+
return false unless @failure_code == other.failure_code
|
|
39
|
+
true
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CardPaymentTransferProcessingDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CardPaymentTransferProcessingDetails
|
|
11
|
+
def authorization_code(); end
|
|
12
|
+
def authorization_code=(str_); end
|
|
13
|
+
def network_transaction_id(); end
|
|
14
|
+
def network_transaction_id=(str_); end
|
|
15
|
+
def network_response_code(); end
|
|
16
|
+
def network_response_code=(str_); end
|
|
17
|
+
def failure_code(); end
|
|
18
|
+
def failure_code=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class CreateCancellation
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
17
|
+
|
|
18
|
+
sig { params(amount: T.nilable(Models::Components::AmountDecimal)).void }
|
|
19
|
+
def initialize(amount: nil)
|
|
20
|
+
@amount = amount
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a? self.class
|
|
26
|
+
return false unless @amount == other.amount
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateCancellation
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateCancellation
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
# Request to capture funds against an authorized transfer.
|
|
11
|
+
class CreateCapture
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# Payment method of the merchant account to capture funds into. For card-acquiring transfers, this must be a moov-wallet payment method.
|
|
16
|
+
field :destination_payment_method_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destinationPaymentMethodID'), required: true } }
|
|
17
|
+
# Amount to capture. If omitted, the remaining authorized amount is captured.
|
|
18
|
+
field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
19
|
+
# Indicates whether this is the final capture against the authorization. When `true`, any remaining authorized amount is voided.
|
|
20
|
+
field :is_final, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('isFinal') } }
|
|
21
|
+
# An optional description of the capture that is used on receipts and for your own internal use.
|
|
22
|
+
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
23
|
+
# Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
|
|
24
|
+
field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('metadata') } }
|
|
25
|
+
# Optional alias from a foreign/external system which can be used to reference this resource.
|
|
26
|
+
field :foreign_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('foreignID') } }
|
|
27
|
+
# An optional collection of line items for a transfer.
|
|
28
|
+
# When line items are provided, their total plus tax must equal the transfer amount.
|
|
29
|
+
field :line_items, Crystalline::Nilable.new(Models::Components::CreateTransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
30
|
+
|
|
31
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::CreateTransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
32
|
+
# The facilitator fee amount applied to the capture.
|
|
33
|
+
field :facilitator_fee_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('facilitatorFeeAmount') } }
|
|
34
|
+
|
|
35
|
+
sig { params(destination_payment_method_id: ::String, amount: T.nilable(Models::Components::AmountDecimal), is_final: T.nilable(T::Boolean), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::CreateTransferLineItems), amount_details: T.nilable(Models::Components::CreateTransferAmountDetails), facilitator_fee_amount: T.nilable(Models::Components::AmountDecimal)).void }
|
|
36
|
+
def initialize(destination_payment_method_id:, amount: nil, is_final: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil)
|
|
37
|
+
@destination_payment_method_id = destination_payment_method_id
|
|
38
|
+
@amount = amount
|
|
39
|
+
@is_final = is_final
|
|
40
|
+
@description = description
|
|
41
|
+
@metadata = metadata
|
|
42
|
+
@foreign_id = foreign_id
|
|
43
|
+
@line_items = line_items
|
|
44
|
+
@amount_details = amount_details
|
|
45
|
+
@facilitator_fee_amount = facilitator_fee_amount
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
49
|
+
def ==(other)
|
|
50
|
+
return false unless other.is_a? self.class
|
|
51
|
+
return false unless @destination_payment_method_id == other.destination_payment_method_id
|
|
52
|
+
return false unless @amount == other.amount
|
|
53
|
+
return false unless @is_final == other.is_final
|
|
54
|
+
return false unless @description == other.description
|
|
55
|
+
return false unless @metadata == other.metadata
|
|
56
|
+
return false unless @foreign_id == other.foreign_id
|
|
57
|
+
return false unless @line_items == other.line_items
|
|
58
|
+
return false unless @amount_details == other.amount_details
|
|
59
|
+
return false unless @facilitator_fee_amount == other.facilitator_fee_amount
|
|
60
|
+
true
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::CreateCapture
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::CreateCapture
|
|
11
|
+
def destination_payment_method_id(); end
|
|
12
|
+
def destination_payment_method_id=(str_); end
|
|
13
|
+
def amount(); end
|
|
14
|
+
def amount=(str_); end
|
|
15
|
+
def is_final(); end
|
|
16
|
+
def is_final=(str_); end
|
|
17
|
+
def description(); end
|
|
18
|
+
def description=(str_); end
|
|
19
|
+
def metadata(); end
|
|
20
|
+
def metadata=(str_); end
|
|
21
|
+
def foreign_id(); end
|
|
22
|
+
def foreign_id=(str_); end
|
|
23
|
+
def line_items(); end
|
|
24
|
+
def line_items=(str_); end
|
|
25
|
+
def amount_details(); end
|
|
26
|
+
def amount_details=(str_); end
|
|
27
|
+
def facilitator_fee_amount(); end
|
|
28
|
+
def facilitator_fee_amount=(str_); end
|
|
29
|
+
end
|
|
@@ -14,9 +14,15 @@ module Moov
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
field :transfer_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('transferID'), required: true } }
|
|
17
|
+
# The rail and direction used to move funds for a transfer.
|
|
18
|
+
field :transfer_type, Models::Components::TransferType, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('transferType'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::TransferType, false) } }
|
|
17
19
|
|
|
18
20
|
field :created_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('createdOn'), required: true, 'decoder': ::Moov::Utils.datetime_from_iso_format(false) } }
|
|
19
21
|
|
|
22
|
+
field :options, Models::Components::TransferRailOptions, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options'), required: true } }
|
|
23
|
+
|
|
24
|
+
field :processing_details, Models::Components::TransferProcessingDetails, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('processingDetails'), required: true } }
|
|
25
|
+
|
|
20
26
|
field :source, Crystalline::Nilable.new(Models::Components::TransferSource), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('source') } }
|
|
21
27
|
|
|
22
28
|
field :destination, Crystalline::Nilable.new(Models::Components::TransferDestination), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destination') } }
|
|
@@ -27,7 +33,7 @@ module Moov
|
|
|
27
33
|
# Reason for a transfer's failure.
|
|
28
34
|
field :failure_reason, Crystalline::Nilable.new(Models::Components::TransferFailureReason), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('failureReason'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::TransferFailureReason, true) } }
|
|
29
35
|
|
|
30
|
-
field :amount, Crystalline::Nilable.new(Models::Components::
|
|
36
|
+
field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
31
37
|
# An optional description of the transfer that is used on receipts and for your own internal use.
|
|
32
38
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
33
39
|
# Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
|
|
@@ -35,23 +41,15 @@ module Moov
|
|
|
35
41
|
# Total or markup fee.
|
|
36
42
|
field :facilitator_fee, Crystalline::Nilable.new(Models::Components::FacilitatorFee), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('facilitatorFee') } }
|
|
37
43
|
# Fees charged to your platform account for transfers.
|
|
38
|
-
field :moov_fee, Crystalline::Nilable.new(::
|
|
39
|
-
# Same as `moovFee`, but a decimal-formatted numerical string that represents up to 9 decimal place precision.
|
|
40
|
-
field :moov_fee_decimal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('moovFeeDecimal') } }
|
|
44
|
+
field :moov_fee, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('moovFee') } }
|
|
41
45
|
# Processing and pass-through costs that add up to the moovFee.
|
|
42
46
|
field :moov_fee_details, Crystalline::Nilable.new(Models::Components::MoovFeeDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('moovFeeDetails') } }
|
|
43
47
|
|
|
44
48
|
field :group_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('groupID') } }
|
|
45
49
|
|
|
46
|
-
field :
|
|
47
|
-
|
|
48
|
-
field :refunded_amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('refundedAmount') } }
|
|
50
|
+
field :refunded_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('refundedAmount') } }
|
|
49
51
|
|
|
50
|
-
field :
|
|
51
|
-
|
|
52
|
-
field :disputed_amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disputedAmount') } }
|
|
53
|
-
|
|
54
|
-
field :disputes, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CardAcquiringDispute)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disputes') } }
|
|
52
|
+
field :disputed_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disputedAmount') } }
|
|
55
53
|
|
|
56
54
|
field :sweep_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('sweepID') } }
|
|
57
55
|
|
|
@@ -67,13 +65,16 @@ module Moov
|
|
|
67
65
|
field :line_items, Crystalline::Nilable.new(Models::Components::TransferLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
|
|
68
66
|
|
|
69
67
|
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
68
|
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
field :authorization, Crystalline::Nilable.new(Models::Components::TransferAuthorization), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('authorization') } }
|
|
70
|
+
|
|
71
|
+
sig { params(transfer_id: ::String, transfer_type: Models::Components::TransferType, created_on: ::DateTime, options: Models::Components::TransferRailOptions, processing_details: Models::Components::TransferProcessingDetails, 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::AmountDecimal), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), facilitator_fee: T.nilable(Models::Components::FacilitatorFee), moov_fee: T.nilable(Models::Components::AmountDecimal), moov_fee_details: T.nilable(Models::Components::MoovFeeDetails), group_id: T.nilable(::String), refunded_amount: T.nilable(Models::Components::AmountDecimal), disputed_amount: T.nilable(Models::Components::AmountDecimal), 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), authorization: T.nilable(Models::Components::TransferAuthorization)).void }
|
|
72
|
+
def initialize(transfer_id:, transfer_type:, created_on:, options:, processing_details:, 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_details: nil, group_id: nil, refunded_amount: nil, disputed_amount: nil, sweep_id: nil, schedule_id: nil, occurrence_id: nil, payment_link_code: nil, foreign_id: nil, line_items: nil, amount_details: nil, authorization: nil)
|
|
75
73
|
@transfer_id = transfer_id
|
|
74
|
+
@transfer_type = transfer_type
|
|
76
75
|
@created_on = created_on
|
|
76
|
+
@options = options
|
|
77
|
+
@processing_details = processing_details
|
|
77
78
|
@source = source
|
|
78
79
|
@destination = destination
|
|
79
80
|
@completed_on = completed_on
|
|
@@ -84,14 +85,10 @@ module Moov
|
|
|
84
85
|
@metadata = metadata
|
|
85
86
|
@facilitator_fee = facilitator_fee
|
|
86
87
|
@moov_fee = moov_fee
|
|
87
|
-
@moov_fee_decimal = moov_fee_decimal
|
|
88
88
|
@moov_fee_details = moov_fee_details
|
|
89
89
|
@group_id = group_id
|
|
90
|
-
@cancellations = cancellations
|
|
91
90
|
@refunded_amount = refunded_amount
|
|
92
|
-
@refunds = refunds
|
|
93
91
|
@disputed_amount = disputed_amount
|
|
94
|
-
@disputes = disputes
|
|
95
92
|
@sweep_id = sweep_id
|
|
96
93
|
@schedule_id = schedule_id
|
|
97
94
|
@occurrence_id = occurrence_id
|
|
@@ -99,14 +96,17 @@ module Moov
|
|
|
99
96
|
@foreign_id = foreign_id
|
|
100
97
|
@line_items = line_items
|
|
101
98
|
@amount_details = amount_details
|
|
102
|
-
@
|
|
99
|
+
@authorization = authorization
|
|
103
100
|
end
|
|
104
101
|
|
|
105
102
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
106
103
|
def ==(other)
|
|
107
104
|
return false unless other.is_a? self.class
|
|
108
105
|
return false unless @transfer_id == other.transfer_id
|
|
106
|
+
return false unless @transfer_type == other.transfer_type
|
|
109
107
|
return false unless @created_on == other.created_on
|
|
108
|
+
return false unless @options == other.options
|
|
109
|
+
return false unless @processing_details == other.processing_details
|
|
110
110
|
return false unless @source == other.source
|
|
111
111
|
return false unless @destination == other.destination
|
|
112
112
|
return false unless @completed_on == other.completed_on
|
|
@@ -117,14 +117,10 @@ module Moov
|
|
|
117
117
|
return false unless @metadata == other.metadata
|
|
118
118
|
return false unless @facilitator_fee == other.facilitator_fee
|
|
119
119
|
return false unless @moov_fee == other.moov_fee
|
|
120
|
-
return false unless @moov_fee_decimal == other.moov_fee_decimal
|
|
121
120
|
return false unless @moov_fee_details == other.moov_fee_details
|
|
122
121
|
return false unless @group_id == other.group_id
|
|
123
|
-
return false unless @cancellations == other.cancellations
|
|
124
122
|
return false unless @refunded_amount == other.refunded_amount
|
|
125
|
-
return false unless @refunds == other.refunds
|
|
126
123
|
return false unless @disputed_amount == other.disputed_amount
|
|
127
|
-
return false unless @disputes == other.disputes
|
|
128
124
|
return false unless @sweep_id == other.sweep_id
|
|
129
125
|
return false unless @schedule_id == other.schedule_id
|
|
130
126
|
return false unless @occurrence_id == other.occurrence_id
|
|
@@ -132,7 +128,7 @@ module Moov
|
|
|
132
128
|
return false unless @foreign_id == other.foreign_id
|
|
133
129
|
return false unless @line_items == other.line_items
|
|
134
130
|
return false unless @amount_details == other.amount_details
|
|
135
|
-
return false unless @
|
|
131
|
+
return false unless @authorization == other.authorization
|
|
136
132
|
true
|
|
137
133
|
end
|
|
138
134
|
end
|
|
@@ -10,8 +10,14 @@ end
|
|
|
10
10
|
class Moov::Models::Components::CreatedTransfer
|
|
11
11
|
def transfer_id(); end
|
|
12
12
|
def transfer_id=(str_); end
|
|
13
|
+
def transfer_type(); end
|
|
14
|
+
def transfer_type=(str_); end
|
|
13
15
|
def created_on(); end
|
|
14
16
|
def created_on=(str_); end
|
|
17
|
+
def options(); end
|
|
18
|
+
def options=(str_); end
|
|
19
|
+
def processing_details(); end
|
|
20
|
+
def processing_details=(str_); end
|
|
15
21
|
def source(); end
|
|
16
22
|
def source=(str_); end
|
|
17
23
|
def destination(); end
|
|
@@ -32,22 +38,14 @@ class Moov::Models::Components::CreatedTransfer
|
|
|
32
38
|
def facilitator_fee=(str_); end
|
|
33
39
|
def moov_fee(); end
|
|
34
40
|
def moov_fee=(str_); end
|
|
35
|
-
def moov_fee_decimal(); end
|
|
36
|
-
def moov_fee_decimal=(str_); end
|
|
37
41
|
def moov_fee_details(); end
|
|
38
42
|
def moov_fee_details=(str_); end
|
|
39
43
|
def group_id(); end
|
|
40
44
|
def group_id=(str_); end
|
|
41
|
-
def cancellations(); end
|
|
42
|
-
def cancellations=(str_); end
|
|
43
45
|
def refunded_amount(); end
|
|
44
46
|
def refunded_amount=(str_); end
|
|
45
|
-
def refunds(); end
|
|
46
|
-
def refunds=(str_); end
|
|
47
47
|
def disputed_amount(); end
|
|
48
48
|
def disputed_amount=(str_); end
|
|
49
|
-
def disputes(); end
|
|
50
|
-
def disputes=(str_); end
|
|
51
49
|
def sweep_id(); end
|
|
52
50
|
def sweep_id=(str_); end
|
|
53
51
|
def schedule_id(); end
|
|
@@ -62,6 +60,6 @@ class Moov::Models::Components::CreatedTransfer
|
|
|
62
60
|
def line_items=(str_); end
|
|
63
61
|
def amount_details(); end
|
|
64
62
|
def amount_details=(str_); end
|
|
65
|
-
def
|
|
66
|
-
def
|
|
63
|
+
def authorization(); end
|
|
64
|
+
def authorization=(str_); end
|
|
67
65
|
end
|
|
@@ -9,19 +9,22 @@ module Moov
|
|
|
9
9
|
module Components
|
|
10
10
|
# Specifies a partial amount to refund.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
12
|
+
# Before v2026.10, this request body may be omitted. In v2026.10 and later, send an empty object to refund 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 in cents. If
|
|
18
|
-
field :amount, Crystalline::Nilable.new(::
|
|
17
|
+
# Amount to refund. Before v2026.10, specify the amount in integer cents. If omitted, the original transfer's full amount will be refunded.
|
|
18
|
+
field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
|
|
19
|
+
# ID of the capture to refund. Required for multi-capture card payment transfers.
|
|
20
|
+
field :capture_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('captureID') } }
|
|
19
21
|
# Breakdown of the refunded amount.
|
|
20
22
|
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
21
23
|
|
|
22
|
-
sig { params(amount: T.nilable(::
|
|
23
|
-
def initialize(amount: nil, amount_details: nil)
|
|
24
|
+
sig { params(amount: T.nilable(Models::Components::AmountDecimal), capture_id: T.nilable(::String), amount_details: T.nilable(Models::Components::RefundAmountDetails)).void }
|
|
25
|
+
def initialize(amount: nil, capture_id: nil, amount_details: nil)
|
|
24
26
|
@amount = amount
|
|
27
|
+
@capture_id = capture_id
|
|
25
28
|
@amount_details = amount_details
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -29,6 +32,7 @@ module Moov
|
|
|
29
32
|
def ==(other)
|
|
30
33
|
return false unless other.is_a? self.class
|
|
31
34
|
return false unless @amount == other.amount
|
|
35
|
+
return false unless @capture_id == other.capture_id
|
|
32
36
|
return false unless @amount_details == other.amount_details
|
|
33
37
|
true
|
|
34
38
|
end
|
|
@@ -12,12 +12,12 @@ module Moov
|
|
|
12
12
|
extend T::Sig
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
|
-
# Amount to reverse in cents. Partial amounts
|
|
16
|
-
field :amount, ::
|
|
15
|
+
# Amount to reverse. Before v2026.10, specify the amount in integer cents. Partial amounts automatically trigger a refund instead of a cancellation.
|
|
16
|
+
field :amount, Models::Components::AmountDecimal, { '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') } }
|
|
19
19
|
|
|
20
|
-
sig { params(amount: ::
|
|
20
|
+
sig { params(amount: Models::Components::AmountDecimal, amount_details: T.nilable(Models::Components::ReversalAmountDetails)).void }
|
|
21
21
|
def initialize(amount:, amount_details: nil)
|
|
22
22
|
@amount = amount
|
|
23
23
|
@amount_details = amount_details
|