moov_ruby 0.0.0.pre.dev.31 → 0.0.0.pre.dev.32
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/invoices.rb +180 -0
- data/lib/moov/issuing_transactions.rb +123 -0
- data/lib/moov/models/components/capturestatus.rb +1 -0
- data/lib/moov/models/components/createauthorizationsimulation.rb +2 -2
- data/lib/moov/models/components/createinvoice.rb +10 -2
- data/lib/moov/models/components/createinvoice.rbi +4 -0
- data/lib/moov/models/components/createinvoicenotification.rb +32 -0
- data/lib/moov/models/components/createinvoicenotification.rbi +13 -0
- data/lib/moov/models/components/createtransfer.rb +6 -2
- data/lib/moov/models/components/createtransfer.rbi +2 -0
- data/lib/moov/models/components/createtransferdestination.rb +2 -14
- data/lib/moov/models/components/createtransferdestination.rbi +0 -6
- data/lib/moov/models/components/createtransferrailoptions.rb +52 -0
- data/lib/moov/models/components/createtransferrailoptions.rbi +23 -0
- data/lib/moov/models/components/createtransferresponse.rb +27 -0
- data/lib/moov/models/components/createtransferresponse.rbi +11 -0
- data/lib/moov/models/components/createtransfersource.rb +2 -10
- data/lib/moov/models/components/createtransfersource.rbi +0 -4
- data/lib/moov/models/components/invoice.rb +6 -2
- data/lib/moov/models/components/invoice.rbi +2 -0
- data/lib/moov/models/components/invoicenotificationlimitedchannel.rb +36 -0
- data/lib/moov/models/components/invoicenotificationlimitedchannel.rbi +15 -0
- data/lib/moov/models/components/invoicepaymentoptions.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptions.rbi +17 -0
- data/lib/moov/models/components/invoicepaymentoptionserror.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptionserror.rbi +17 -0
- data/lib/moov/models/components/invoicepaymentoptionsupdate.rb +40 -0
- data/lib/moov/models/components/invoicepaymentoptionsupdate.rbi +17 -0
- data/lib/moov/models/components/notificationchannel.rb +18 -0
- data/lib/moov/models/components/notificationchannel.rbi +11 -0
- data/lib/moov/models/components/pushtocardoptions.rb +6 -2
- data/lib/moov/models/components/pushtocardoptions.rbi +2 -0
- data/lib/moov/models/components/requestcard.rb +2 -6
- data/lib/moov/models/components/requestcard.rbi +0 -2
- data/lib/moov/models/components/simulationissuingmerchantdata.rb +56 -0
- data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rbi → simulationissuingmerchantdata.rbi} +2 -2
- data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rb → simulationissuingmerchantdatavalidationerror.rb} +1 -1
- data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rbi +25 -0
- data/lib/moov/models/components/updateinvoice.rb +6 -2
- data/lib/moov/models/components/updateinvoice.rbi +2 -0
- data/lib/moov/models/components.rb +10 -3
- data/lib/moov/models/errors/authorizationsimulationvalidationerror.rb +3 -3
- data/lib/moov/models/errors/clearingsimulationvalidationerror.rb +1 -1
- data/lib/moov/models/errors/createinvoiceerror.rb +10 -2
- data/lib/moov/models/errors/createinvoiceerror.rbi +4 -0
- data/lib/moov/models/errors/invoicenotificationerror.rb +36 -0
- data/lib/moov/models/errors/invoicenotificationerror.rbi +15 -0
- data/lib/moov/models/errors/invoicenotificationratelimitederror.rb +44 -0
- data/lib/moov/models/errors/invoicenotificationratelimitederror.rbi +19 -0
- data/lib/moov/models/errors/requestcarderror.rb +2 -6
- data/lib/moov/models/errors/requestcarderror.rbi +0 -2
- data/lib/moov/models/errors/updateinvoiceerror.rb +6 -2
- data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -0
- data/lib/moov/models/errors.rb +2 -0
- data/lib/moov/models/operations/createinvoicenotification_request.rb +40 -0
- data/lib/moov/models/operations/createinvoicenotification_request.rbi +17 -0
- data/lib/moov/models/operations/{createcancellation_response.rb → createinvoicenotification_response.rb} +3 -7
- data/lib/moov/models/operations/{createcancellation_response.rbi → createinvoicenotification_response.rbi} +2 -4
- data/lib/moov/models/operations/createtransfer_response.rb +5 -5
- data/lib/moov/models/operations/createtransfer_response.rbi +2 -2
- data/lib/moov/models/operations/getissuedcardactivity_request.rb +36 -0
- data/lib/moov/models/operations/getissuedcardactivity_request.rbi +15 -0
- data/lib/moov/models/operations/getissuedcardactivity_response.rb +48 -0
- data/lib/moov/models/operations/getissuedcardactivity_response.rbi +21 -0
- data/lib/moov/models/operations/initiaterefund_request.rb +1 -1
- data/lib/moov/models/operations.rb +4 -2
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/transfers.rb +3 -156
- metadata +34 -12
- data/lib/moov/models/components/cardexpirationerror.rb +0 -36
- data/lib/moov/models/components/cardexpirationerror.rbi +0 -15
- data/lib/moov/models/components/createcancellation.rb +0 -34
- data/lib/moov/models/components/createcancellation.rbi +0 -13
- data/lib/moov/models/operations/createcancellation_request.rb +0 -40
- data/lib/moov/models/operations/createcancellation_request.rbi +0 -17
|
@@ -20,17 +20,11 @@ module Moov
|
|
|
20
20
|
|
|
21
21
|
field :payment_token, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentToken') } }
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
field :ach_details, Crystalline::Nilable.new(Models::Components::CreateTransferSourceACH), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDetails') } }
|
|
26
|
-
|
|
27
|
-
sig { params(transfer_id: T.nilable(::String), payment_method_id: T.nilable(::String), payment_token: T.nilable(::String), card_details: T.nilable(Models::Components::CreateTransferSourceCard), ach_details: T.nilable(Models::Components::CreateTransferSourceACH)).void }
|
|
28
|
-
def initialize(transfer_id: nil, payment_method_id: nil, payment_token: nil, card_details: nil, ach_details: nil)
|
|
23
|
+
sig { params(transfer_id: T.nilable(::String), payment_method_id: T.nilable(::String), payment_token: T.nilable(::String)).void }
|
|
24
|
+
def initialize(transfer_id: nil, payment_method_id: nil, payment_token: nil)
|
|
29
25
|
@transfer_id = transfer_id
|
|
30
26
|
@payment_method_id = payment_method_id
|
|
31
27
|
@payment_token = payment_token
|
|
32
|
-
@card_details = card_details
|
|
33
|
-
@ach_details = ach_details
|
|
34
28
|
end
|
|
35
29
|
|
|
36
30
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -39,8 +33,6 @@ module Moov
|
|
|
39
33
|
return false unless @transfer_id == other.transfer_id
|
|
40
34
|
return false unless @payment_method_id == other.payment_method_id
|
|
41
35
|
return false unless @payment_token == other.payment_token
|
|
42
|
-
return false unless @card_details == other.card_details
|
|
43
|
-
return false unless @ach_details == other.ach_details
|
|
44
36
|
true
|
|
45
37
|
end
|
|
46
38
|
end
|
|
@@ -14,8 +14,4 @@ class Moov::Models::Components::CreateTransferSource
|
|
|
14
14
|
def payment_method_id=(str_); end
|
|
15
15
|
def payment_token(); end
|
|
16
16
|
def payment_token=(str_); end
|
|
17
|
-
def card_details(); end
|
|
18
|
-
def card_details=(str_); end
|
|
19
|
-
def ach_details(); end
|
|
20
|
-
def ach_details=(str_); end
|
|
21
17
|
end
|
|
@@ -50,6 +50,8 @@ module Moov
|
|
|
50
50
|
field :payment_link_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentLinkCode') } }
|
|
51
51
|
# URL to the hosted payment link for the invoice.
|
|
52
52
|
field :payment_link_url, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentLinkURL') } }
|
|
53
|
+
# Payment options for the invoice.
|
|
54
|
+
field :payment, Crystalline::Nilable.new(Models::Components::InvoicePaymentOptions), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('payment') } }
|
|
53
55
|
# Payment made towards an invoice, will be either a transfer or an external payment.
|
|
54
56
|
field :invoice_payments, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::InvoicePayment)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoicePayments') } }
|
|
55
57
|
|
|
@@ -65,8 +67,8 @@ module Moov
|
|
|
65
67
|
|
|
66
68
|
field :disabled_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disabledOn'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
|
|
67
69
|
|
|
68
|
-
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), payment_link_url: 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 }
|
|
69
|
-
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, payment_link_url: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil, disabled_on: nil)
|
|
70
|
+
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), payment_link_url: T.nilable(::String), payment: T.nilable(Models::Components::InvoicePaymentOptions), 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 }
|
|
71
|
+
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, payment_link_url: nil, payment: nil, invoice_payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil, disabled_on: nil)
|
|
70
72
|
@invoice_id = invoice_id
|
|
71
73
|
@invoice_number = invoice_number
|
|
72
74
|
@customer_account_id = customer_account_id
|
|
@@ -86,6 +88,7 @@ module Moov
|
|
|
86
88
|
@amount_details = amount_details
|
|
87
89
|
@payment_link_code = payment_link_code
|
|
88
90
|
@payment_link_url = payment_link_url
|
|
91
|
+
@payment = payment
|
|
89
92
|
@invoice_payments = invoice_payments
|
|
90
93
|
@invoice_date = invoice_date
|
|
91
94
|
@due_date = due_date
|
|
@@ -117,6 +120,7 @@ module Moov
|
|
|
117
120
|
return false unless @amount_details == other.amount_details
|
|
118
121
|
return false unless @payment_link_code == other.payment_link_code
|
|
119
122
|
return false unless @payment_link_url == other.payment_link_url
|
|
123
|
+
return false unless @payment == other.payment
|
|
120
124
|
return false unless @invoice_payments == other.invoice_payments
|
|
121
125
|
return false unless @invoice_date == other.invoice_date
|
|
122
126
|
return false unless @due_date == other.due_date
|
|
@@ -46,6 +46,8 @@ class Moov::Models::Components::Invoice
|
|
|
46
46
|
def payment_link_code=(str_); end
|
|
47
47
|
def payment_link_url(); end
|
|
48
48
|
def payment_link_url=(str_); end
|
|
49
|
+
def payment(); end
|
|
50
|
+
def payment=(str_); end
|
|
49
51
|
def invoice_payments(); end
|
|
50
52
|
def invoice_payments=(str_); end
|
|
51
53
|
def invoice_date(); 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 InvoiceNotificationLimitedChannel
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :channel, Models::Components::NotificationChannel, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('channel'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::NotificationChannel, false) } }
|
|
17
|
+
# When a notification to the channel can be sent again.
|
|
18
|
+
field :available_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('availableOn'), required: true, 'decoder': ::Moov::Utils.datetime_from_iso_format(false) } }
|
|
19
|
+
|
|
20
|
+
sig { params(channel: Models::Components::NotificationChannel, available_on: ::DateTime).void }
|
|
21
|
+
def initialize(channel:, available_on:)
|
|
22
|
+
@channel = channel
|
|
23
|
+
@available_on = available_on
|
|
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 @channel == other.channel
|
|
30
|
+
return false unless @available_on == other.available_on
|
|
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::InvoiceNotificationLimitedChannel
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::InvoiceNotificationLimitedChannel
|
|
11
|
+
def channel(); end
|
|
12
|
+
def channel=(str_); end
|
|
13
|
+
def available_on(); end
|
|
14
|
+
def available_on=(str_); end
|
|
15
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
# Payment options for an invoice.
|
|
11
|
+
class InvoicePaymentOptions
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# Payment methods the customer can use to pay the invoice. If omitted, all methods the merchant supports are allowed. The request is rejected if a listed method is not supported by the merchant.
|
|
16
|
+
field :allowed_methods, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CollectionPaymentMethodType)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('allowedMethods') } }
|
|
17
|
+
# Options for payment links used to collect a card payment.
|
|
18
|
+
field :card_details, Crystalline::Nilable.new(Models::Components::CardPaymentDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
|
|
19
|
+
# Options for payment links used to collect an ACH payment.
|
|
20
|
+
field :ach_details, Crystalline::Nilable.new(Models::Components::ACHPaymentDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDetails') } }
|
|
21
|
+
|
|
22
|
+
sig { params(allowed_methods: T.nilable(T::Array[Models::Components::CollectionPaymentMethodType]), card_details: T.nilable(Models::Components::CardPaymentDetails), ach_details: T.nilable(Models::Components::ACHPaymentDetails)).void }
|
|
23
|
+
def initialize(allowed_methods: nil, card_details: nil, ach_details: nil)
|
|
24
|
+
@allowed_methods = allowed_methods
|
|
25
|
+
@card_details = card_details
|
|
26
|
+
@ach_details = ach_details
|
|
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 @allowed_methods == other.allowed_methods
|
|
33
|
+
return false unless @card_details == other.card_details
|
|
34
|
+
return false unless @ach_details == other.ach_details
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::InvoicePaymentOptions
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::InvoicePaymentOptions
|
|
11
|
+
def allowed_methods(); end
|
|
12
|
+
def allowed_methods=(str_); end
|
|
13
|
+
def card_details(); end
|
|
14
|
+
def card_details=(str_); end
|
|
15
|
+
def ach_details(); end
|
|
16
|
+
def ach_details=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class InvoicePaymentOptionsError
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :allowed_methods, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('allowedMethods') } }
|
|
17
|
+
|
|
18
|
+
field :card_details, Crystalline::Nilable.new(Models::Components::CardPaymentDetailsError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
|
|
19
|
+
|
|
20
|
+
field :ach_details, Crystalline::Nilable.new(Models::Components::ACHPaymentDetailsError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDetails') } }
|
|
21
|
+
|
|
22
|
+
sig { params(allowed_methods: T.nilable(::String), card_details: T.nilable(Models::Components::CardPaymentDetailsError), ach_details: T.nilable(Models::Components::ACHPaymentDetailsError)).void }
|
|
23
|
+
def initialize(allowed_methods: nil, card_details: nil, ach_details: nil)
|
|
24
|
+
@allowed_methods = allowed_methods
|
|
25
|
+
@card_details = card_details
|
|
26
|
+
@ach_details = ach_details
|
|
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 @allowed_methods == other.allowed_methods
|
|
33
|
+
return false unless @card_details == other.card_details
|
|
34
|
+
return false unless @ach_details == other.ach_details
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::InvoicePaymentOptionsError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::InvoicePaymentOptionsError
|
|
11
|
+
def allowed_methods(); end
|
|
12
|
+
def allowed_methods=(str_); end
|
|
13
|
+
def card_details(); end
|
|
14
|
+
def card_details=(str_); end
|
|
15
|
+
def ach_details(); end
|
|
16
|
+
def ach_details=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Moov
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
# Payment options to update on an invoice.
|
|
11
|
+
class InvoicePaymentOptionsUpdate
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# Options for payment links used to collect a card payment.
|
|
16
|
+
field :card_details, Crystalline::Nilable.new(Models::Components::CardPaymentDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
|
|
17
|
+
# Options for payment links used to collect an ACH payment.
|
|
18
|
+
field :ach_details, Crystalline::Nilable.new(Models::Components::ACHPaymentDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDetails') } }
|
|
19
|
+
# Payment methods the customer can use to pay the invoice. Omit to leave unchanged. Set to null to allow all methods the merchant supports. The request is rejected if a listed method is not supported by the merchant.
|
|
20
|
+
field :allowed_methods, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CollectionPaymentMethodType)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('allowedMethods') } }
|
|
21
|
+
|
|
22
|
+
sig { params(card_details: T.nilable(Models::Components::CardPaymentDetails), ach_details: T.nilable(Models::Components::ACHPaymentDetails), allowed_methods: T.nilable(T::Array[Models::Components::CollectionPaymentMethodType])).void }
|
|
23
|
+
def initialize(card_details: nil, ach_details: nil, allowed_methods: nil)
|
|
24
|
+
@card_details = card_details
|
|
25
|
+
@ach_details = ach_details
|
|
26
|
+
@allowed_methods = allowed_methods
|
|
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 @card_details == other.card_details
|
|
33
|
+
return false unless @ach_details == other.ach_details
|
|
34
|
+
return false unless @allowed_methods == other.allowed_methods
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::InvoicePaymentOptionsUpdate
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::InvoicePaymentOptionsUpdate
|
|
11
|
+
def card_details(); end
|
|
12
|
+
def card_details=(str_); end
|
|
13
|
+
def ach_details(); end
|
|
14
|
+
def ach_details=(str_); end
|
|
15
|
+
def allowed_methods(); end
|
|
16
|
+
def allowed_methods=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
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 NotificationChannel < T::Enum
|
|
12
|
+
enums do
|
|
13
|
+
EMAIL = new('email')
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -14,16 +14,20 @@ module Moov
|
|
|
14
14
|
|
|
15
15
|
# An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.
|
|
16
16
|
field :dynamic_descriptor, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dynamicDescriptor') } }
|
|
17
|
+
# The scheduled date and time for the push-to-card transfer to be delivered, as set when the transfer was created.
|
|
18
|
+
field :scheduled_delivery_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('scheduledDeliveryOn'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
|
|
17
19
|
|
|
18
|
-
sig { params(dynamic_descriptor: T.nilable(::String)).void }
|
|
19
|
-
def initialize(dynamic_descriptor: nil)
|
|
20
|
+
sig { params(dynamic_descriptor: T.nilable(::String), scheduled_delivery_on: T.nilable(::DateTime)).void }
|
|
21
|
+
def initialize(dynamic_descriptor: nil, scheduled_delivery_on: nil)
|
|
20
22
|
@dynamic_descriptor = dynamic_descriptor
|
|
23
|
+
@scheduled_delivery_on = scheduled_delivery_on
|
|
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 @dynamic_descriptor == other.dynamic_descriptor
|
|
30
|
+
return false unless @scheduled_delivery_on == other.scheduled_delivery_on
|
|
27
31
|
true
|
|
28
32
|
end
|
|
29
33
|
end
|
|
@@ -20,18 +20,15 @@ module Moov
|
|
|
20
20
|
field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('metadata') } }
|
|
21
21
|
|
|
22
22
|
field :billing_address, Crystalline::Nilable.new(Models::Components::Address), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('billingAddress') } }
|
|
23
|
-
# The expiration date of the card or token.
|
|
24
|
-
field :expiration, Crystalline::Nilable.new(Models::Components::CardExpiration), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('expiration') } }
|
|
25
23
|
# Mutable spend controls for the card.
|
|
26
24
|
field :controls, Crystalline::Nilable.new(Models::Components::IssuingControls), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('controls') } }
|
|
27
25
|
|
|
28
|
-
sig { params(authorized_user_account_id: T.nilable(::String), nickname: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), billing_address: T.nilable(Models::Components::Address),
|
|
29
|
-
def initialize(authorized_user_account_id: nil, nickname: nil, metadata: nil, billing_address: nil,
|
|
26
|
+
sig { params(authorized_user_account_id: T.nilable(::String), nickname: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), billing_address: T.nilable(Models::Components::Address), controls: T.nilable(Models::Components::IssuingControls)).void }
|
|
27
|
+
def initialize(authorized_user_account_id: nil, nickname: nil, metadata: nil, billing_address: nil, controls: nil)
|
|
30
28
|
@authorized_user_account_id = authorized_user_account_id
|
|
31
29
|
@nickname = nickname
|
|
32
30
|
@metadata = metadata
|
|
33
31
|
@billing_address = billing_address
|
|
34
|
-
@expiration = expiration
|
|
35
32
|
@controls = controls
|
|
36
33
|
end
|
|
37
34
|
|
|
@@ -42,7 +39,6 @@ module Moov
|
|
|
42
39
|
return false unless @nickname == other.nickname
|
|
43
40
|
return false unless @metadata == other.metadata
|
|
44
41
|
return false unless @billing_address == other.billing_address
|
|
45
|
-
return false unless @expiration == other.expiration
|
|
46
42
|
return false unless @controls == other.controls
|
|
47
43
|
true
|
|
48
44
|
end
|
|
@@ -0,0 +1,56 @@
|
|
|
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 SimulationIssuingMerchantData
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# External identifier used to identify the merchant with the card brand.
|
|
16
|
+
field :network_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('networkID') } }
|
|
17
|
+
# Name of the merchant.
|
|
18
|
+
field :name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name') } }
|
|
19
|
+
# The merchant's location.
|
|
20
|
+
field :city, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('city') } }
|
|
21
|
+
# Two-letter country code.
|
|
22
|
+
field :country, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('country') } }
|
|
23
|
+
# The merchant's five-digit postal code.
|
|
24
|
+
field :postal_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('postalCode') } }
|
|
25
|
+
# The merchant's two-letter state abbreviation.
|
|
26
|
+
field :state, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('state') } }
|
|
27
|
+
# The Merchant Category Code.
|
|
28
|
+
field :mcc, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('mcc') } }
|
|
29
|
+
|
|
30
|
+
sig { params(network_id: T.nilable(::String), name: T.nilable(::String), city: T.nilable(::String), country: T.nilable(::String), postal_code: T.nilable(::String), state: T.nilable(::String), mcc: T.nilable(::String)).void }
|
|
31
|
+
def initialize(network_id: nil, name: nil, city: nil, country: nil, postal_code: nil, state: nil, mcc: nil)
|
|
32
|
+
@network_id = network_id
|
|
33
|
+
@name = name
|
|
34
|
+
@city = city
|
|
35
|
+
@country = country
|
|
36
|
+
@postal_code = postal_code
|
|
37
|
+
@state = state
|
|
38
|
+
@mcc = mcc
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
42
|
+
def ==(other)
|
|
43
|
+
return false unless other.is_a? self.class
|
|
44
|
+
return false unless @network_id == other.network_id
|
|
45
|
+
return false unless @name == other.name
|
|
46
|
+
return false unless @city == other.city
|
|
47
|
+
return false unless @country == other.country
|
|
48
|
+
return false unless @postal_code == other.postal_code
|
|
49
|
+
return false unless @state == other.state
|
|
50
|
+
return false unless @mcc == other.mcc
|
|
51
|
+
true
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class Moov::Models::Components::
|
|
5
|
+
class Moov::Models::Components::SimulationIssuingMerchantData
|
|
6
6
|
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Moov::Models::Components::
|
|
10
|
+
class Moov::Models::Components::SimulationIssuingMerchantData
|
|
11
11
|
def network_id(); end
|
|
12
12
|
def network_id=(str_); end
|
|
13
13
|
def name(); end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Moov::Models::Components::SimulationIssuingMerchantDataValidationError
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Moov::Models::Components::SimulationIssuingMerchantDataValidationError
|
|
11
|
+
def network_id(); end
|
|
12
|
+
def network_id=(str_); end
|
|
13
|
+
def name(); end
|
|
14
|
+
def name=(str_); end
|
|
15
|
+
def city(); end
|
|
16
|
+
def city=(str_); end
|
|
17
|
+
def country(); end
|
|
18
|
+
def country=(str_); end
|
|
19
|
+
def postal_code(); end
|
|
20
|
+
def postal_code=(str_); end
|
|
21
|
+
def state(); end
|
|
22
|
+
def state=(str_); end
|
|
23
|
+
def mcc(); end
|
|
24
|
+
def mcc=(str_); end
|
|
25
|
+
end
|
|
@@ -23,6 +23,8 @@ module Moov
|
|
|
23
23
|
# To completely discard an invoice created by mistake, use the delete endpoint instead.
|
|
24
24
|
# - `unpaid`: Can only be set if the current status is `draft`. Setting the status to `unpaid` finalizes the invoice and sends an email with a payment link to the customer.
|
|
25
25
|
field :status, Crystalline::Nilable.new(Models::Components::InvoiceStatus), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('status'), 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::InvoiceStatus, true) } }
|
|
26
|
+
# Payment options to update on the invoice.
|
|
27
|
+
field :payment, Crystalline::Nilable.new(Models::Components::InvoicePaymentOptionsUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('payment') } }
|
|
26
28
|
|
|
27
29
|
field :amount_details, Crystalline::Nilable.new(Models::Components::AmountDetailsUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
|
|
28
30
|
|
|
@@ -30,11 +32,12 @@ module Moov
|
|
|
30
32
|
|
|
31
33
|
field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
|
|
32
34
|
|
|
33
|
-
sig { params(description: T.nilable(::String), line_items: T.nilable(Models::Components::CreateInvoiceLineItemsUpdate), status: T.nilable(Models::Components::InvoiceStatus), amount_details: T.nilable(Models::Components::AmountDetailsUpdate), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime)).void }
|
|
34
|
-
def initialize(description: nil, line_items: nil, status: nil, amount_details: nil, invoice_date: nil, due_date: nil)
|
|
35
|
+
sig { params(description: T.nilable(::String), line_items: T.nilable(Models::Components::CreateInvoiceLineItemsUpdate), status: T.nilable(Models::Components::InvoiceStatus), payment: T.nilable(Models::Components::InvoicePaymentOptionsUpdate), amount_details: T.nilable(Models::Components::AmountDetailsUpdate), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime)).void }
|
|
36
|
+
def initialize(description: nil, line_items: nil, status: nil, payment: nil, amount_details: nil, invoice_date: nil, due_date: nil)
|
|
35
37
|
@description = description
|
|
36
38
|
@line_items = line_items
|
|
37
39
|
@status = status
|
|
40
|
+
@payment = payment
|
|
38
41
|
@amount_details = amount_details
|
|
39
42
|
@invoice_date = invoice_date
|
|
40
43
|
@due_date = due_date
|
|
@@ -46,6 +49,7 @@ module Moov
|
|
|
46
49
|
return false unless @description == other.description
|
|
47
50
|
return false unless @line_items == other.line_items
|
|
48
51
|
return false unless @status == other.status
|
|
52
|
+
return false unless @payment == other.payment
|
|
49
53
|
return false unless @amount_details == other.amount_details
|
|
50
54
|
return false unless @invoice_date == other.invoice_date
|
|
51
55
|
return false unless @due_date == other.due_date
|
|
@@ -14,6 +14,8 @@ class Moov::Models::Components::UpdateInvoice
|
|
|
14
14
|
def line_items=(str_); end
|
|
15
15
|
def status(); end
|
|
16
16
|
def status=(str_); end
|
|
17
|
+
def payment(); end
|
|
18
|
+
def payment=(str_); end
|
|
17
19
|
def amount_details(); end
|
|
18
20
|
def amount_details=(str_); end
|
|
19
21
|
def invoice_date(); end
|