moov_ruby 26.7.0.pre.dev.1 → 26.7.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/models/components/amountdetails.rb +36 -0
- data/lib/moov/models/components/amountdetails.rbi +15 -0
- data/lib/moov/models/components/amountdetailsupdate.rb +36 -0
- data/lib/moov/models/components/amountdetailsupdate.rbi +15 -0
- data/lib/moov/models/components/amountdetailsvalidationerror.rb +36 -0
- data/lib/moov/models/components/amountdetailsvalidationerror.rbi +15 -0
- data/lib/moov/models/components/asynccreatedrefund.rb +6 -2
- data/lib/moov/models/components/asynccreatedrefund.rbi +2 -0
- data/lib/moov/models/components/cardacquiringrefund.rb +6 -2
- data/lib/moov/models/components/cardacquiringrefund.rbi +2 -0
- data/lib/moov/models/components/createinvoice.rb +5 -5
- data/lib/moov/models/components/createinvoice.rbi +2 -2
- data/lib/moov/models/components/createpaymentlinkamountdetails.rb +6 -2
- data/lib/moov/models/components/createpaymentlinkamountdetails.rbi +2 -0
- data/lib/moov/models/components/createpaymentlinkamountdetailsvalidationerror.rb +6 -2
- data/lib/moov/models/components/createpaymentlinkamountdetailsvalidationerror.rbi +2 -0
- data/lib/moov/models/components/createrefund.rb +6 -2
- data/lib/moov/models/components/createrefund.rbi +2 -0
- data/lib/moov/models/components/createreversal.rb +6 -2
- data/lib/moov/models/components/createreversal.rbi +2 -0
- data/lib/moov/models/components/createtransferamountdetails.rb +6 -2
- data/lib/moov/models/components/createtransferamountdetails.rbi +2 -0
- data/lib/moov/models/components/createtransferamountdetailsvalidationerror.rb +6 -2
- data/lib/moov/models/components/createtransferamountdetailsvalidationerror.rbi +2 -0
- data/lib/moov/models/components/invoice.rb +7 -7
- data/lib/moov/models/components/invoice.rbi +2 -2
- data/lib/moov/models/components/paymentlinkamountdetails.rb +6 -2
- data/lib/moov/models/components/paymentlinkamountdetails.rbi +2 -0
- data/lib/moov/models/components/refundamountdetails.rb +32 -0
- data/lib/moov/models/components/refundamountdetails.rbi +13 -0
- data/lib/moov/models/components/refundamountdetailsvalidationerror.rb +32 -0
- data/lib/moov/models/components/refundamountdetailsvalidationerror.rbi +13 -0
- data/lib/moov/models/components/reversalamountdetails.rb +32 -0
- data/lib/moov/models/components/reversalamountdetails.rbi +13 -0
- data/lib/moov/models/components/reversalamountdetailsvalidationerror.rb +32 -0
- data/lib/moov/models/components/reversalamountdetailsvalidationerror.rbi +13 -0
- data/lib/moov/models/components/transferamountdetails.rb +6 -2
- data/lib/moov/models/components/transferamountdetails.rbi +2 -0
- data/lib/moov/models/components/transferconfig.rb +6 -2
- data/lib/moov/models/components/transferconfig.rbi +2 -0
- data/lib/moov/models/components/transfercontrols.rb +48 -0
- data/lib/moov/models/components/transfercontrols.rbi +21 -0
- data/lib/moov/models/components/updateinvoice.rb +11 -11
- data/lib/moov/models/components/updateinvoice.rbi +2 -2
- data/lib/moov/models/components/updatepaymentlinkamountdetails.rb +6 -2
- data/lib/moov/models/components/updatepaymentlinkamountdetails.rbi +2 -0
- data/lib/moov/models/components/updatepaymentlinkamountdetailsvalidationerror.rb +6 -2
- data/lib/moov/models/components/updatepaymentlinkamountdetailsvalidationerror.rbi +2 -0
- data/lib/moov/models/components.rb +8 -0
- data/lib/moov/models/errors/cardacquiringrefund_error.rb +6 -2
- data/lib/moov/models/errors/cardacquiringrefund_error.rbi +2 -0
- data/lib/moov/models/errors/createinvoiceerror.rb +5 -5
- data/lib/moov/models/errors/createinvoiceerror.rbi +2 -2
- data/lib/moov/models/errors/refundvalidationerror.rb +6 -2
- data/lib/moov/models/errors/refundvalidationerror.rbi +2 -0
- data/lib/moov/models/errors/reversalvalidationerror.rb +6 -2
- data/lib/moov/models/errors/reversalvalidationerror.rbi +2 -0
- data/lib/moov/models/errors/updateinvoiceerror.rb +5 -5
- data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -2
- data/lib/moov/sdkconfiguration.rb +3 -3
- metadata +18 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e923bb5493ebb4b44a58e1b1b6828641cfe5f43ef93b49b00534b5bd343874e0
|
|
4
|
+
data.tar.gz: c3bdbc3529faac0759a4863292abea184b0e041e244f9ffb7a8f00a926ca48de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f45d33df1f37a8339950948b2a65c6c2cdab74dc10fe535545b460a1c6c236ca920abd6563e791dacf69dfc4b287d770c322de5a8649334ac38ffdc4e0b2d2b
|
|
7
|
+
data.tar.gz: 14e9af366d23fe33294479daf96b32c0e2cfb1632be6d77805a347c66f75a5be1a996602067460794fd2b89354a08dd11b2ad760bff84ffab0c333c3331c9087
|
|
@@ -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 AmountDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The amount of tax applied to the invoice.
|
|
16
|
+
field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
|
+
# The amount of surcharge applied to the invoice.
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
19
|
+
|
|
20
|
+
sig { params(tax: T.nilable(Models::Components::AmountDecimal), surcharge: T.nilable(Models::Components::AmountDecimal)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
22
|
+
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
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 @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
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::AmountDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::AmountDetails
|
|
11
|
+
def tax(); end
|
|
12
|
+
def tax=(str_); end
|
|
13
|
+
def surcharge(); end
|
|
14
|
+
def surcharge=(str_); end
|
|
15
|
+
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 AmountDetailsUpdate
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The amount of tax applied to the invoice.
|
|
16
|
+
field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimalUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
|
+
# The amount of surcharge applied to the invoice.
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimalUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
19
|
+
|
|
20
|
+
sig { params(tax: T.nilable(Models::Components::AmountDecimalUpdate), surcharge: T.nilable(Models::Components::AmountDecimalUpdate)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
22
|
+
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
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 @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
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::AmountDetailsUpdate
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::AmountDetailsUpdate
|
|
11
|
+
def tax(); end
|
|
12
|
+
def tax=(str_); end
|
|
13
|
+
def surcharge(); end
|
|
14
|
+
def surcharge=(str_); end
|
|
15
|
+
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 AmountDetailsValidationError
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :tax, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
|
+
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
19
|
+
|
|
20
|
+
sig { params(tax: T.nilable(::String), surcharge: T.nilable(::String)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
22
|
+
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
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 @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
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::AmountDetailsValidationError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::AmountDetailsValidationError
|
|
11
|
+
def tax(); end
|
|
12
|
+
def tax=(str_); end
|
|
13
|
+
def surcharge(); end
|
|
14
|
+
def surcharge=(str_); end
|
|
15
|
+
end
|
|
@@ -19,11 +19,14 @@ module Moov
|
|
|
19
19
|
|
|
20
20
|
field :amount, Models::Components::Amount, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
23
|
+
|
|
24
|
+
sig { params(refund_id: ::String, created_on: ::DateTime, amount: Models::Components::Amount, amount_details: T.nilable(Models::Components::RefundAmountDetails)).void }
|
|
25
|
+
def initialize(refund_id:, created_on:, amount:, amount_details: nil)
|
|
24
26
|
@refund_id = refund_id
|
|
25
27
|
@created_on = created_on
|
|
26
28
|
@amount = amount
|
|
29
|
+
@amount_details = amount_details
|
|
27
30
|
end
|
|
28
31
|
|
|
29
32
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -32,6 +35,7 @@ module Moov
|
|
|
32
35
|
return false unless @refund_id == other.refund_id
|
|
33
36
|
return false unless @created_on == other.created_on
|
|
34
37
|
return false unless @amount == other.amount
|
|
38
|
+
return false unless @amount_details == other.amount_details
|
|
35
39
|
true
|
|
36
40
|
end
|
|
37
41
|
end
|
|
@@ -23,15 +23,18 @@ module Moov
|
|
|
23
23
|
|
|
24
24
|
field :amount, Models::Components::Amount, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
|
|
25
25
|
|
|
26
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
27
|
+
|
|
26
28
|
field :card_details, Crystalline::Nilable.new(Models::Components::RefundCardDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
|
|
27
29
|
|
|
28
|
-
sig { params(refund_id: ::String, created_on: ::DateTime, updated_on: ::DateTime, status: Models::Components::RefundStatus, amount: Models::Components::Amount, card_details: T.nilable(Models::Components::RefundCardDetails)).void }
|
|
29
|
-
def initialize(refund_id:, created_on:, updated_on:, status:, amount:, card_details: nil)
|
|
30
|
+
sig { params(refund_id: ::String, created_on: ::DateTime, updated_on: ::DateTime, status: Models::Components::RefundStatus, amount: Models::Components::Amount, amount_details: T.nilable(Models::Components::RefundAmountDetails), card_details: T.nilable(Models::Components::RefundCardDetails)).void }
|
|
31
|
+
def initialize(refund_id:, created_on:, updated_on:, status:, amount:, amount_details: nil, card_details: nil)
|
|
30
32
|
@refund_id = refund_id
|
|
31
33
|
@created_on = created_on
|
|
32
34
|
@updated_on = updated_on
|
|
33
35
|
@status = status
|
|
34
36
|
@amount = amount
|
|
37
|
+
@amount_details = amount_details
|
|
35
38
|
@card_details = card_details
|
|
36
39
|
end
|
|
37
40
|
|
|
@@ -43,6 +46,7 @@ module Moov
|
|
|
43
46
|
return false unless @updated_on == other.updated_on
|
|
44
47
|
return false unless @status == other.status
|
|
45
48
|
return false unless @amount == other.amount
|
|
49
|
+
return false unless @amount_details == other.amount_details
|
|
46
50
|
return false unless @card_details == other.card_details
|
|
47
51
|
true
|
|
48
52
|
end
|
|
@@ -23,16 +23,16 @@ module Moov
|
|
|
23
23
|
|
|
24
24
|
field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
|
|
25
25
|
|
|
26
|
-
field :
|
|
26
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::AmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
27
27
|
|
|
28
|
-
sig { params(customer_account_id: ::String, line_items: Models::Components::CreateInvoiceLineItems, description: T.nilable(::String), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime),
|
|
29
|
-
def initialize(customer_account_id:, line_items:, description: nil, invoice_date: nil, due_date: nil,
|
|
28
|
+
sig { params(customer_account_id: ::String, line_items: Models::Components::CreateInvoiceLineItems, description: T.nilable(::String), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), amount_details: T.nilable(Models::Components::AmountDetails)).void }
|
|
29
|
+
def initialize(customer_account_id:, line_items:, description: nil, invoice_date: nil, due_date: nil, amount_details: nil)
|
|
30
30
|
@customer_account_id = customer_account_id
|
|
31
31
|
@line_items = line_items
|
|
32
32
|
@description = description
|
|
33
33
|
@invoice_date = invoice_date
|
|
34
34
|
@due_date = due_date
|
|
35
|
-
@
|
|
35
|
+
@amount_details = amount_details
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -43,7 +43,7 @@ module Moov
|
|
|
43
43
|
return false unless @description == other.description
|
|
44
44
|
return false unless @invoice_date == other.invoice_date
|
|
45
45
|
return false unless @due_date == other.due_date
|
|
46
|
-
return false unless @
|
|
46
|
+
return false unless @amount_details == other.amount_details
|
|
47
47
|
true
|
|
48
48
|
end
|
|
49
49
|
end
|
|
@@ -14,16 +14,20 @@ module Moov
|
|
|
14
14
|
|
|
15
15
|
# The amount of tax applied to the payment link.
|
|
16
16
|
field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
|
+
# The amount of surcharge applied to the payment link.
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
17
19
|
|
|
18
|
-
sig { params(tax: T.nilable(Models::Components::AmountDecimal)).void }
|
|
19
|
-
def initialize(tax: nil)
|
|
20
|
+
sig { params(tax: T.nilable(Models::Components::AmountDecimal), surcharge: T.nilable(Models::Components::AmountDecimal)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
20
22
|
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
27
|
def ==(other)
|
|
25
28
|
return false unless other.is_a? self.class
|
|
26
29
|
return false unless @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
27
31
|
true
|
|
28
32
|
end
|
|
29
33
|
end
|
|
@@ -15,15 +15,19 @@ module Moov
|
|
|
15
15
|
|
|
16
16
|
field :tax, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
19
|
+
|
|
20
|
+
sig { params(tax: T.nilable(::String), surcharge: T.nilable(::String)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
20
22
|
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
27
|
def ==(other)
|
|
25
28
|
return false unless other.is_a? self.class
|
|
26
29
|
return false unless @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
27
31
|
true
|
|
28
32
|
end
|
|
29
33
|
end
|
|
@@ -16,16 +16,20 @@ module Moov
|
|
|
16
16
|
|
|
17
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
|
+
# Breakdown of the refunded amount.
|
|
20
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::RefundAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
19
21
|
|
|
20
|
-
sig { params(amount: T.nilable(::Integer)).void }
|
|
21
|
-
def initialize(amount: nil)
|
|
22
|
+
sig { params(amount: T.nilable(::Integer), amount_details: T.nilable(Models::Components::RefundAmountDetails)).void }
|
|
23
|
+
def initialize(amount: nil, amount_details: nil)
|
|
22
24
|
@amount = amount
|
|
25
|
+
@amount_details = amount_details
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
26
29
|
def ==(other)
|
|
27
30
|
return false unless other.is_a? self.class
|
|
28
31
|
return false unless @amount == other.amount
|
|
32
|
+
return false unless @amount_details == other.amount_details
|
|
29
33
|
true
|
|
30
34
|
end
|
|
31
35
|
end
|
|
@@ -14,16 +14,20 @@ module Moov
|
|
|
14
14
|
|
|
15
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
|
+
# Breakdown of the reversed amount.
|
|
18
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::ReversalAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
17
19
|
|
|
18
|
-
sig { params(amount: ::Integer).void }
|
|
19
|
-
def initialize(amount:)
|
|
20
|
+
sig { params(amount: ::Integer, amount_details: T.nilable(Models::Components::ReversalAmountDetails)).void }
|
|
21
|
+
def initialize(amount:, amount_details: nil)
|
|
20
22
|
@amount = amount
|
|
23
|
+
@amount_details = amount_details
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
27
|
def ==(other)
|
|
25
28
|
return false unless other.is_a? self.class
|
|
26
29
|
return false unless @amount == other.amount
|
|
30
|
+
return false unless @amount_details == other.amount_details
|
|
27
31
|
true
|
|
28
32
|
end
|
|
29
33
|
end
|
|
@@ -16,11 +16,14 @@ module Moov
|
|
|
16
16
|
field :tip, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tip') } }
|
|
17
17
|
# The amount of tax applied to the transfer.
|
|
18
18
|
field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
19
|
+
# The amount of surcharge applied to the transfer.
|
|
20
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
19
21
|
|
|
20
|
-
sig { params(tip: T.nilable(Models::Components::AmountDecimal), tax: T.nilable(Models::Components::AmountDecimal)).void }
|
|
21
|
-
def initialize(tip: nil, tax: nil)
|
|
22
|
+
sig { params(tip: T.nilable(Models::Components::AmountDecimal), tax: T.nilable(Models::Components::AmountDecimal), surcharge: T.nilable(Models::Components::AmountDecimal)).void }
|
|
23
|
+
def initialize(tip: nil, tax: nil, surcharge: nil)
|
|
22
24
|
@tip = tip
|
|
23
25
|
@tax = tax
|
|
26
|
+
@surcharge = surcharge
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -28,6 +31,7 @@ module Moov
|
|
|
28
31
|
return false unless other.is_a? self.class
|
|
29
32
|
return false unless @tip == other.tip
|
|
30
33
|
return false unless @tax == other.tax
|
|
34
|
+
return false unless @surcharge == other.surcharge
|
|
31
35
|
true
|
|
32
36
|
end
|
|
33
37
|
end
|
|
@@ -17,10 +17,13 @@ module Moov
|
|
|
17
17
|
|
|
18
18
|
field :tax, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
field :surcharge, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
21
|
+
|
|
22
|
+
sig { params(tip: T.nilable(::String), tax: T.nilable(::String), surcharge: T.nilable(::String)).void }
|
|
23
|
+
def initialize(tip: nil, tax: nil, surcharge: nil)
|
|
22
24
|
@tip = tip
|
|
23
25
|
@tax = tax
|
|
26
|
+
@surcharge = surcharge
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -28,6 +31,7 @@ module Moov
|
|
|
28
31
|
return false unless other.is_a? self.class
|
|
29
32
|
return false unless @tip == other.tip
|
|
30
33
|
return false unless @tax == other.tax
|
|
34
|
+
return false unless @surcharge == other.surcharge
|
|
31
35
|
true
|
|
32
36
|
end
|
|
33
37
|
end
|
|
@@ -30,9 +30,7 @@ module Moov
|
|
|
30
30
|
field :line_items, Models::Components::InvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
|
|
31
31
|
|
|
32
32
|
field :subtotal_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('subtotalAmount'), required: true } }
|
|
33
|
-
|
|
34
|
-
field :tax_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('taxAmount'), required: true } }
|
|
35
|
-
# Total amount of the invoice, sum of subTotalAmount and taxAmount
|
|
33
|
+
# Total amount of the invoice, including subtotal, tax, and surcharge amounts.
|
|
36
34
|
field :total_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('totalAmount'), required: true } }
|
|
37
35
|
# Total amount of pending transfers paid towards the invoice
|
|
38
36
|
field :pending_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('pendingAmount'), required: true } }
|
|
@@ -47,6 +45,8 @@ module Moov
|
|
|
47
45
|
|
|
48
46
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
|
|
49
47
|
|
|
48
|
+
field :amount_details, Crystalline::Nilable.new(Models::Components::AmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
49
|
+
|
|
50
50
|
field :payment_link_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentLinkCode') } }
|
|
51
51
|
# Payment made towards an invoice, will be either a transfer or an external payment.
|
|
52
52
|
field :invoice_payments, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::InvoicePayment)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoicePayments') } }
|
|
@@ -63,8 +63,8 @@ module Moov
|
|
|
63
63
|
|
|
64
64
|
field :disabled_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disabledOn'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
|
|
65
65
|
|
|
66
|
-
sig { params(invoice_id: ::String, invoice_number: ::String, customer_account_id: ::String, customer_display_name: ::String, customer_email: ::String, partner_account_id: ::String, status: Models::Components::InvoiceStatus, line_items: Models::Components::InvoiceLineItems, subtotal_amount: Models::Components::AmountDecimal,
|
|
67
|
-
def initialize(invoice_id:, invoice_number:, customer_account_id:, customer_display_name:, customer_email:, partner_account_id:, status:, line_items:, subtotal_amount:,
|
|
66
|
+
sig { params(invoice_id: ::String, invoice_number: ::String, customer_account_id: ::String, customer_display_name: ::String, customer_email: ::String, partner_account_id: ::String, status: Models::Components::InvoiceStatus, line_items: Models::Components::InvoiceLineItems, subtotal_amount: Models::Components::AmountDecimal, total_amount: Models::Components::AmountDecimal, pending_amount: Models::Components::AmountDecimal, paid_amount: Models::Components::AmountDecimal, refunded_amount: Models::Components::AmountDecimal, disputed_amount: Models::Components::AmountDecimal, created_on: ::DateTime, description: T.nilable(::String), amount_details: T.nilable(Models::Components::AmountDetails), payment_link_code: T.nilable(::String), invoice_payments: T.nilable(T::Array[Models::Components::InvoicePayment]), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), sent_on: T.nilable(::DateTime), paid_on: T.nilable(::DateTime), canceled_on: T.nilable(::DateTime), disabled_on: T.nilable(::DateTime)).void }
|
|
67
|
+
def initialize(invoice_id:, invoice_number:, customer_account_id:, customer_display_name:, customer_email:, partner_account_id:, status:, line_items:, subtotal_amount:, total_amount:, pending_amount:, paid_amount:, refunded_amount:, disputed_amount:, created_on:, description: nil, amount_details: nil, payment_link_code: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil, disabled_on: nil)
|
|
68
68
|
@invoice_id = invoice_id
|
|
69
69
|
@invoice_number = invoice_number
|
|
70
70
|
@customer_account_id = customer_account_id
|
|
@@ -74,7 +74,6 @@ module Moov
|
|
|
74
74
|
@status = status
|
|
75
75
|
@line_items = line_items
|
|
76
76
|
@subtotal_amount = subtotal_amount
|
|
77
|
-
@tax_amount = tax_amount
|
|
78
77
|
@total_amount = total_amount
|
|
79
78
|
@pending_amount = pending_amount
|
|
80
79
|
@paid_amount = paid_amount
|
|
@@ -82,6 +81,7 @@ module Moov
|
|
|
82
81
|
@disputed_amount = disputed_amount
|
|
83
82
|
@created_on = created_on
|
|
84
83
|
@description = description
|
|
84
|
+
@amount_details = amount_details
|
|
85
85
|
@payment_link_code = payment_link_code
|
|
86
86
|
@invoice_payments = invoice_payments
|
|
87
87
|
@invoice_date = invoice_date
|
|
@@ -104,7 +104,6 @@ module Moov
|
|
|
104
104
|
return false unless @status == other.status
|
|
105
105
|
return false unless @line_items == other.line_items
|
|
106
106
|
return false unless @subtotal_amount == other.subtotal_amount
|
|
107
|
-
return false unless @tax_amount == other.tax_amount
|
|
108
107
|
return false unless @total_amount == other.total_amount
|
|
109
108
|
return false unless @pending_amount == other.pending_amount
|
|
110
109
|
return false unless @paid_amount == other.paid_amount
|
|
@@ -112,6 +111,7 @@ module Moov
|
|
|
112
111
|
return false unless @disputed_amount == other.disputed_amount
|
|
113
112
|
return false unless @created_on == other.created_on
|
|
114
113
|
return false unless @description == other.description
|
|
114
|
+
return false unless @amount_details == other.amount_details
|
|
115
115
|
return false unless @payment_link_code == other.payment_link_code
|
|
116
116
|
return false unless @invoice_payments == other.invoice_payments
|
|
117
117
|
return false unless @invoice_date == other.invoice_date
|
|
@@ -26,8 +26,6 @@ class Moov::Models::Components::Invoice
|
|
|
26
26
|
def line_items=(str_); end
|
|
27
27
|
def subtotal_amount(); end
|
|
28
28
|
def subtotal_amount=(str_); end
|
|
29
|
-
def tax_amount(); end
|
|
30
|
-
def tax_amount=(str_); end
|
|
31
29
|
def total_amount(); end
|
|
32
30
|
def total_amount=(str_); end
|
|
33
31
|
def pending_amount(); end
|
|
@@ -42,6 +40,8 @@ class Moov::Models::Components::Invoice
|
|
|
42
40
|
def created_on=(str_); end
|
|
43
41
|
def description(); end
|
|
44
42
|
def description=(str_); end
|
|
43
|
+
def amount_details(); end
|
|
44
|
+
def amount_details=(str_); end
|
|
45
45
|
def payment_link_code(); end
|
|
46
46
|
def payment_link_code=(str_); end
|
|
47
47
|
def invoice_payments(); end
|
|
@@ -14,16 +14,20 @@ module Moov
|
|
|
14
14
|
|
|
15
15
|
# The amount of tax applied to the payment link.
|
|
16
16
|
field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
|
|
17
|
+
# The amount of surcharge applied to the payment link.
|
|
18
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
17
19
|
|
|
18
|
-
sig { params(tax: T.nilable(Models::Components::AmountDecimal)).void }
|
|
19
|
-
def initialize(tax: nil)
|
|
20
|
+
sig { params(tax: T.nilable(Models::Components::AmountDecimal), surcharge: T.nilable(Models::Components::AmountDecimal)).void }
|
|
21
|
+
def initialize(tax: nil, surcharge: nil)
|
|
20
22
|
@tax = tax
|
|
23
|
+
@surcharge = surcharge
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
27
|
def ==(other)
|
|
25
28
|
return false unless other.is_a? self.class
|
|
26
29
|
return false unless @tax == other.tax
|
|
30
|
+
return false unless @surcharge == other.surcharge
|
|
27
31
|
true
|
|
28
32
|
end
|
|
29
33
|
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 RefundAmountDetails
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The amount of surcharge to refund. Should be proportionate to the surcharge on the original transfer
|
|
16
|
+
field :surcharge, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('surcharge') } }
|
|
17
|
+
|
|
18
|
+
sig { params(surcharge: T.nilable(Models::Components::AmountDecimal)).void }
|
|
19
|
+
def initialize(surcharge: nil)
|
|
20
|
+
@surcharge = surcharge
|
|
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 @surcharge == other.surcharge
|
|
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::RefundAmountDetails
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::RefundAmountDetails
|
|
11
|
+
def surcharge(); end
|
|
12
|
+
def surcharge=(str_); end
|
|
13
|
+
end
|