moov_ruby 0.3.5 → 0.3.6

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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moov/client.rb +2 -1
  3. data/lib/moov/invoices.rb +792 -0
  4. data/lib/moov/models/components/amountdecimalupdate.rb +39 -0
  5. data/lib/moov/models/components/amountdecimalupdate.rbi +15 -0
  6. data/lib/moov/models/components/createinvoice.rb +53 -0
  7. data/lib/moov/models/components/createinvoice.rbi +23 -0
  8. data/lib/moov/models/components/invoice.rb +117 -0
  9. data/lib/moov/models/components/invoice.rbi +55 -0
  10. data/lib/moov/models/components/invoiceexternalpayment.rb +49 -0
  11. data/lib/moov/models/components/invoiceexternalpayment.rbi +21 -0
  12. data/lib/moov/models/components/invoiceexternalpayment_paymenttype.rb +21 -0
  13. data/lib/moov/models/components/invoiceexternalpayment_paymenttype.rbi +11 -0
  14. data/lib/moov/models/components/invoicelineitem.rb +49 -0
  15. data/lib/moov/models/components/invoicelineitem.rbi +21 -0
  16. data/lib/moov/models/components/invoicelineitemoption.rb +45 -0
  17. data/lib/moov/models/components/invoicelineitemoption.rbi +19 -0
  18. data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rb +45 -0
  19. data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rbi +19 -0
  20. data/lib/moov/models/components/invoicelineitems.rb +33 -0
  21. data/lib/moov/models/components/invoicelineitems.rbi +13 -0
  22. data/lib/moov/models/components/invoicelineitemsupdate.rb +33 -0
  23. data/lib/moov/models/components/invoicelineitemsupdate.rbi +13 -0
  24. data/lib/moov/models/components/invoicelineitemsvalidationerror.rb +33 -0
  25. data/lib/moov/models/components/invoicelineitemsvalidationerror.rbi +13 -0
  26. data/lib/moov/models/components/invoicelineitemvalidationerror.rb +49 -0
  27. data/lib/moov/models/components/invoicelineitemvalidationerror.rbi +21 -0
  28. data/lib/moov/models/components/invoicepayment.rb +28 -0
  29. data/lib/moov/models/components/invoicepayment.rbi +11 -0
  30. data/lib/moov/models/components/invoicestatus.rb +26 -0
  31. data/lib/moov/models/components/invoicestatus.rbi +11 -0
  32. data/lib/moov/models/components/invoicetransferpayment.rb +37 -0
  33. data/lib/moov/models/components/invoicetransferpayment.rbi +15 -0
  34. data/lib/moov/models/components/invoicetransferpayment_paymenttype.rb +21 -0
  35. data/lib/moov/models/components/invoicetransferpayment_paymenttype.rbi +11 -0
  36. data/lib/moov/models/components/markinvoicepaid.rb +41 -0
  37. data/lib/moov/models/components/markinvoicepaid.rbi +17 -0
  38. data/lib/moov/models/components/updateinvoice.rb +53 -0
  39. data/lib/moov/models/components/updateinvoice.rbi +23 -0
  40. data/lib/moov/models/components/webhookdatainvoicecreated.rb +37 -0
  41. data/lib/moov/models/components/webhookdatainvoicecreated.rbi +15 -0
  42. data/lib/moov/models/components/webhookdatainvoiceupdated.rb +41 -0
  43. data/lib/moov/models/components/webhookdatainvoiceupdated.rbi +17 -0
  44. data/lib/moov/models/components/webhookevent.rb +2 -2
  45. data/lib/moov/models/components/webhookeventtype.rb +2 -0
  46. data/lib/moov/models/components.rb +20 -0
  47. data/lib/moov/models/errors/createinvoiceerror.rb +57 -0
  48. data/lib/moov/models/errors/createinvoiceerror.rbi +25 -0
  49. data/lib/moov/models/errors/listinvoicesvalidationerror.rb +49 -0
  50. data/lib/moov/models/errors/listinvoicesvalidationerror.rbi +21 -0
  51. data/lib/moov/models/errors/markinvoicepaiderror.rb +45 -0
  52. data/lib/moov/models/errors/markinvoicepaiderror.rbi +19 -0
  53. data/lib/moov/models/errors/updateinvoiceerror.rb +57 -0
  54. data/lib/moov/models/errors/updateinvoiceerror.rbi +25 -0
  55. data/lib/moov/models/errors.rb +4 -0
  56. data/lib/moov/models/operations/createinvoice_request.rb +50 -0
  57. data/lib/moov/models/operations/createinvoice_request.rbi +17 -0
  58. data/lib/moov/models/operations/createinvoice_response.rb +49 -0
  59. data/lib/moov/models/operations/createinvoice_response.rbi +21 -0
  60. data/lib/moov/models/operations/getinvoice_request.rb +50 -0
  61. data/lib/moov/models/operations/getinvoice_request.rbi +17 -0
  62. data/lib/moov/models/operations/getinvoice_response.rb +49 -0
  63. data/lib/moov/models/operations/getinvoice_response.rbi +21 -0
  64. data/lib/moov/models/operations/listinvoices_request.rb +62 -0
  65. data/lib/moov/models/operations/listinvoices_request.rbi +23 -0
  66. data/lib/moov/models/operations/listinvoices_response.rb +49 -0
  67. data/lib/moov/models/operations/listinvoices_response.rbi +21 -0
  68. data/lib/moov/models/operations/markpaidinvoice_request.rb +54 -0
  69. data/lib/moov/models/operations/markpaidinvoice_request.rbi +19 -0
  70. data/lib/moov/models/operations/markpaidinvoice_response.rb +49 -0
  71. data/lib/moov/models/operations/markpaidinvoice_response.rbi +21 -0
  72. data/lib/moov/models/operations/updateinvoice_request.rb +54 -0
  73. data/lib/moov/models/operations/updateinvoice_request.rbi +19 -0
  74. data/lib/moov/models/operations/updateinvoice_response.rb +49 -0
  75. data/lib/moov/models/operations/updateinvoice_response.rbi +21 -0
  76. data/lib/moov/models/operations.rb +10 -0
  77. data/lib/moov/sdkconfiguration.rb +2 -2
  78. data/lib/moov_ruby.rb +1 -0
  79. metadata +71 -2
@@ -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
+
12
+ class AmountDecimalUpdate
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # A 3-letter ISO 4217 currency code.
17
+ field :currency, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('currency') } }
18
+ # A decimal-formatted numerical string that represents up to 9 decimal place precision.
19
+ #
20
+ # For example, $12.987654321 is '12.987654321'.
21
+ field :value_decimal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('valueDecimal') } }
22
+
23
+ sig { params(currency: T.nilable(::String), value_decimal: T.nilable(::String)).void }
24
+ def initialize(currency: nil, value_decimal: nil)
25
+ @currency = currency
26
+ @value_decimal = value_decimal
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 @currency == other.currency
33
+ return false unless @value_decimal == other.value_decimal
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::AmountDecimalUpdate
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::AmountDecimalUpdate
11
+ def currency(); end
12
+ def currency=(str_); end
13
+ def value_decimal(); end
14
+ def value_decimal=(str_); end
15
+ end
@@ -0,0 +1,53 @@
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
+
12
+ class CreateInvoice
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :customer_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('customerAccountID'), required: true } }
18
+
19
+ field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
20
+ # A collection of line items for an invoice.
21
+ field :line_items, Models::Components::InvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
22
+
23
+ field :invoice_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
24
+
25
+ field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
26
+
27
+ field :tax_amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('taxAmount') } }
28
+
29
+ sig { params(customer_account_id: ::String, description: ::String, line_items: Models::Components::InvoiceLineItems, invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), tax_amount: T.nilable(Models::Components::AmountDecimal)).void }
30
+ def initialize(customer_account_id:, description:, line_items:, invoice_date: nil, due_date: nil, tax_amount: nil)
31
+ @customer_account_id = customer_account_id
32
+ @description = description
33
+ @line_items = line_items
34
+ @invoice_date = invoice_date
35
+ @due_date = due_date
36
+ @tax_amount = tax_amount
37
+ end
38
+
39
+ sig { params(other: T.untyped).returns(T::Boolean) }
40
+ def ==(other)
41
+ return false unless other.is_a? self.class
42
+ return false unless @customer_account_id == other.customer_account_id
43
+ return false unless @description == other.description
44
+ return false unless @line_items == other.line_items
45
+ return false unless @invoice_date == other.invoice_date
46
+ return false unless @due_date == other.due_date
47
+ return false unless @tax_amount == other.tax_amount
48
+ true
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,23 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CreateInvoice
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateInvoice
11
+ def customer_account_id(); end
12
+ def customer_account_id=(str_); end
13
+ def description(); end
14
+ def description=(str_); end
15
+ def line_items(); end
16
+ def line_items=(str_); end
17
+ def invoice_date(); end
18
+ def invoice_date=(str_); end
19
+ def due_date(); end
20
+ def due_date=(str_); end
21
+ def tax_amount(); end
22
+ def tax_amount=(str_); end
23
+ end
@@ -0,0 +1,117 @@
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
+
12
+ class Invoice
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :invoice_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceID'), required: true } }
18
+
19
+ field :invoice_number, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceNumber'), required: true } }
20
+
21
+ field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
22
+
23
+ field :customer_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('customerAccountID'), required: true } }
24
+
25
+ field :partner_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('partnerAccountID'), required: true } }
26
+
27
+ field :status, Models::Components::InvoiceStatus, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('status'), required: true, 'decoder': Utils.enum_from_string(Models::Components::InvoiceStatus, false) } }
28
+ # A collection of line items for an invoice.
29
+ field :line_items, Models::Components::InvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
30
+
31
+ field :subtotal_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('subtotalAmount'), required: true } }
32
+
33
+ field :tax_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('taxAmount'), required: true } }
34
+ # Total amount of the invoice, sum of subTotalAmount and taxAmount
35
+ field :total_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('totalAmount'), required: true } }
36
+ # Total amount of pending transfers paid towards the invoice
37
+ field :pending_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('pendingAmount'), required: true } }
38
+ # Total amount of completed transfers paid towards the invoice
39
+ field :paid_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paidAmount'), required: true } }
40
+ # Total amount of refunds initiated against transfers paid towards the invoice
41
+ field :refunded_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('refundedAmount'), required: true } }
42
+ # Total amount of disputes initiated against transfers paid towards the invoice
43
+ field :disputed_amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('disputedAmount'), required: true } }
44
+
45
+ field :created_on, ::DateTime, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('createdOn'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
46
+
47
+ field :payment_link_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentLinkCode') } }
48
+
49
+ field :payments, Crystalline::Nilable.new(Crystalline::Array.new(Crystalline::Union.new(Models::Components::InvoiceTransferPayment, Models::Components::InvoiceExternalPayment))), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('payments') } }
50
+
51
+ field :invoice_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
52
+
53
+ field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
54
+
55
+ field :sent_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('sentOn'), 'decoder': Utils.datetime_from_iso_format(true) } }
56
+
57
+ field :paid_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paidOn'), 'decoder': Utils.datetime_from_iso_format(true) } }
58
+
59
+ field :canceled_on, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('canceledOn'), 'decoder': Utils.datetime_from_iso_format(true) } }
60
+
61
+ sig { params(invoice_id: ::String, invoice_number: ::String, description: ::String, customer_account_id: ::String, partner_account_id: ::String, status: Models::Components::InvoiceStatus, line_items: Models::Components::InvoiceLineItems, subtotal_amount: Models::Components::AmountDecimal, tax_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, payment_link_code: T.nilable(::String), payments: T.nilable(T::Array[T.any(Models::Components::InvoiceTransferPayment, Models::Components::InvoiceExternalPayment)]), 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)).void }
62
+ def initialize(invoice_id:, invoice_number:, description:, customer_account_id:, partner_account_id:, status:, line_items:, subtotal_amount:, tax_amount:, total_amount:, pending_amount:, paid_amount:, refunded_amount:, disputed_amount:, created_on:, payment_link_code: nil, payments: nil, invoice_date: nil, due_date: nil, sent_on: nil, paid_on: nil, canceled_on: nil)
63
+ @invoice_id = invoice_id
64
+ @invoice_number = invoice_number
65
+ @description = description
66
+ @customer_account_id = customer_account_id
67
+ @partner_account_id = partner_account_id
68
+ @status = status
69
+ @line_items = line_items
70
+ @subtotal_amount = subtotal_amount
71
+ @tax_amount = tax_amount
72
+ @total_amount = total_amount
73
+ @pending_amount = pending_amount
74
+ @paid_amount = paid_amount
75
+ @refunded_amount = refunded_amount
76
+ @disputed_amount = disputed_amount
77
+ @created_on = created_on
78
+ @payment_link_code = payment_link_code
79
+ @payments = payments
80
+ @invoice_date = invoice_date
81
+ @due_date = due_date
82
+ @sent_on = sent_on
83
+ @paid_on = paid_on
84
+ @canceled_on = canceled_on
85
+ end
86
+
87
+ sig { params(other: T.untyped).returns(T::Boolean) }
88
+ def ==(other)
89
+ return false unless other.is_a? self.class
90
+ return false unless @invoice_id == other.invoice_id
91
+ return false unless @invoice_number == other.invoice_number
92
+ return false unless @description == other.description
93
+ return false unless @customer_account_id == other.customer_account_id
94
+ return false unless @partner_account_id == other.partner_account_id
95
+ return false unless @status == other.status
96
+ return false unless @line_items == other.line_items
97
+ return false unless @subtotal_amount == other.subtotal_amount
98
+ return false unless @tax_amount == other.tax_amount
99
+ return false unless @total_amount == other.total_amount
100
+ return false unless @pending_amount == other.pending_amount
101
+ return false unless @paid_amount == other.paid_amount
102
+ return false unless @refunded_amount == other.refunded_amount
103
+ return false unless @disputed_amount == other.disputed_amount
104
+ return false unless @created_on == other.created_on
105
+ return false unless @payment_link_code == other.payment_link_code
106
+ return false unless @payments == other.payments
107
+ return false unless @invoice_date == other.invoice_date
108
+ return false unless @due_date == other.due_date
109
+ return false unless @sent_on == other.sent_on
110
+ return false unless @paid_on == other.paid_on
111
+ return false unless @canceled_on == other.canceled_on
112
+ true
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,55 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::Invoice
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::Invoice
11
+ def invoice_id(); end
12
+ def invoice_id=(str_); end
13
+ def invoice_number(); end
14
+ def invoice_number=(str_); end
15
+ def description(); end
16
+ def description=(str_); end
17
+ def customer_account_id(); end
18
+ def customer_account_id=(str_); end
19
+ def partner_account_id(); end
20
+ def partner_account_id=(str_); end
21
+ def status(); end
22
+ def status=(str_); end
23
+ def line_items(); end
24
+ def line_items=(str_); end
25
+ def subtotal_amount(); end
26
+ def subtotal_amount=(str_); end
27
+ def tax_amount(); end
28
+ def tax_amount=(str_); end
29
+ def total_amount(); end
30
+ def total_amount=(str_); end
31
+ def pending_amount(); end
32
+ def pending_amount=(str_); end
33
+ def paid_amount(); end
34
+ def paid_amount=(str_); end
35
+ def refunded_amount(); end
36
+ def refunded_amount=(str_); end
37
+ def disputed_amount(); end
38
+ def disputed_amount=(str_); end
39
+ def created_on(); end
40
+ def created_on=(str_); end
41
+ def payment_link_code(); end
42
+ def payment_link_code=(str_); end
43
+ def payments(); end
44
+ def payments=(str_); end
45
+ def invoice_date(); end
46
+ def invoice_date=(str_); end
47
+ def due_date(); end
48
+ def due_date=(str_); end
49
+ def sent_on(); end
50
+ def sent_on=(str_); end
51
+ def paid_on(); end
52
+ def paid_on=(str_); end
53
+ def canceled_on(); end
54
+ def canceled_on=(str_); end
55
+ end
@@ -0,0 +1,49 @@
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
+
12
+ class InvoiceExternalPayment
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :payment_type, Models::Components::InvoiceExternalPaymentPaymentType, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentType'), required: true, 'decoder': Utils.enum_from_string(Models::Components::InvoiceExternalPaymentPaymentType, false) } }
18
+
19
+ field :description, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description'), required: true } }
20
+
21
+ field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
22
+
23
+ field :foreign_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('foreignID') } }
24
+
25
+ field :payment_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentDate'), 'decoder': Utils.datetime_from_iso_format(true) } }
26
+
27
+ sig { params(payment_type: Models::Components::InvoiceExternalPaymentPaymentType, description: ::String, amount: Models::Components::AmountDecimal, foreign_id: T.nilable(::String), payment_date: T.nilable(::DateTime)).void }
28
+ def initialize(payment_type:, description:, amount:, foreign_id: nil, payment_date: nil)
29
+ @payment_type = payment_type
30
+ @description = description
31
+ @amount = amount
32
+ @foreign_id = foreign_id
33
+ @payment_date = payment_date
34
+ end
35
+
36
+ sig { params(other: T.untyped).returns(T::Boolean) }
37
+ def ==(other)
38
+ return false unless other.is_a? self.class
39
+ return false unless @payment_type == other.payment_type
40
+ return false unless @description == other.description
41
+ return false unless @amount == other.amount
42
+ return false unless @foreign_id == other.foreign_id
43
+ return false unless @payment_date == other.payment_date
44
+ true
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,21 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceExternalPayment
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceExternalPayment
11
+ def payment_type(); end
12
+ def payment_type=(str_); end
13
+ def description(); end
14
+ def description=(str_); end
15
+ def amount(); end
16
+ def amount=(str_); end
17
+ def foreign_id(); end
18
+ def foreign_id=(str_); end
19
+ def payment_date(); end
20
+ def payment_date=(str_); end
21
+ end
@@ -0,0 +1,21 @@
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
+
12
+ class InvoiceExternalPaymentPaymentType < T::Enum
13
+
14
+
15
+ enums do
16
+ EXTERNAL = new('external')
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceExternalPaymentPaymentType
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceExternalPaymentPaymentType
11
+ end
@@ -0,0 +1,49 @@
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
+ # Represents a single item in an invoice, including optional modifiers and quantity.
12
+ class InvoiceLineItem
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # The name of the item.
17
+ field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
18
+ # The base price of the item before applying option modifiers.
19
+ field :base_price, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('basePrice'), required: true } }
20
+ # The quantity of this item.
21
+ field :quantity, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity'), required: true } }
22
+ # Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
23
+ field :options, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::InvoiceLineItemOption)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
24
+ # Optional unique identifier associating the line item with a product.
25
+ field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
26
+
27
+ sig { params(name: ::String, base_price: Models::Components::AmountDecimal, quantity: ::Integer, options: T.nilable(T::Array[Models::Components::InvoiceLineItemOption]), product_id: T.nilable(::String)).void }
28
+ def initialize(name:, base_price:, quantity:, options: nil, product_id: nil)
29
+ @name = name
30
+ @base_price = base_price
31
+ @quantity = quantity
32
+ @options = options
33
+ @product_id = product_id
34
+ end
35
+
36
+ sig { params(other: T.untyped).returns(T::Boolean) }
37
+ def ==(other)
38
+ return false unless other.is_a? self.class
39
+ return false unless @name == other.name
40
+ return false unless @base_price == other.base_price
41
+ return false unless @quantity == other.quantity
42
+ return false unless @options == other.options
43
+ return false unless @product_id == other.product_id
44
+ true
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,21 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceLineItem
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceLineItem
11
+ def name(); end
12
+ def name=(str_); end
13
+ def base_price(); end
14
+ def base_price=(str_); end
15
+ def quantity(); end
16
+ def quantity=(str_); end
17
+ def options(); end
18
+ def options=(str_); end
19
+ def product_id(); end
20
+ def product_id=(str_); end
21
+ end
@@ -0,0 +1,45 @@
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
+ # Represents a modifier or option applied to a line item.
12
+ class InvoiceLineItemOption
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # The name of the option or modifier.
17
+ field :name, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name'), required: true } }
18
+ # The quantity of this option.
19
+ field :quantity, ::Integer, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity'), required: true } }
20
+ # Optional price modification applied by this option. Can be positive, negative, or zero.
21
+ field :price_modifier, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
22
+ # Optional group identifier to categorize related options (e.g., 'toppings').
23
+ field :group, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('group') } }
24
+
25
+ sig { params(name: ::String, quantity: ::Integer, price_modifier: T.nilable(Models::Components::AmountDecimal), group: T.nilable(::String)).void }
26
+ def initialize(name:, quantity:, price_modifier: nil, group: nil)
27
+ @name = name
28
+ @quantity = quantity
29
+ @price_modifier = price_modifier
30
+ @group = group
31
+ end
32
+
33
+ sig { params(other: T.untyped).returns(T::Boolean) }
34
+ def ==(other)
35
+ return false unless other.is_a? self.class
36
+ return false unless @name == other.name
37
+ return false unless @quantity == other.quantity
38
+ return false unless @price_modifier == other.price_modifier
39
+ return false unless @group == other.group
40
+ true
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,19 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceLineItemOption
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceLineItemOption
11
+ def name(); end
12
+ def name=(str_); end
13
+ def quantity(); end
14
+ def quantity=(str_); end
15
+ def price_modifier(); end
16
+ def price_modifier=(str_); end
17
+ def group(); end
18
+ def group=(str_); end
19
+ end
@@ -0,0 +1,45 @@
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
+
12
+ class InvoiceLineItemOptionValidationError
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name') } }
18
+
19
+ field :group, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('group') } }
20
+
21
+ field :price_modifier, Crystalline::Nilable.new(Models::Components::AmountDecimalValidationError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('priceModifier') } }
22
+
23
+ field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity') } }
24
+
25
+ sig { params(name: T.nilable(::String), group: T.nilable(::String), price_modifier: T.nilable(Models::Components::AmountDecimalValidationError), quantity: T.nilable(::String)).void }
26
+ def initialize(name: nil, group: nil, price_modifier: nil, quantity: nil)
27
+ @name = name
28
+ @group = group
29
+ @price_modifier = price_modifier
30
+ @quantity = quantity
31
+ end
32
+
33
+ sig { params(other: T.untyped).returns(T::Boolean) }
34
+ def ==(other)
35
+ return false unless other.is_a? self.class
36
+ return false unless @name == other.name
37
+ return false unless @group == other.group
38
+ return false unless @price_modifier == other.price_modifier
39
+ return false unless @quantity == other.quantity
40
+ true
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,19 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceLineItemOptionValidationError
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceLineItemOptionValidationError
11
+ def name(); end
12
+ def name=(str_); end
13
+ def group(); end
14
+ def group=(str_); end
15
+ def price_modifier(); end
16
+ def price_modifier=(str_); end
17
+ def quantity(); end
18
+ def quantity=(str_); end
19
+ end
@@ -0,0 +1,33 @@
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
+ # A collection of line items for an invoice.
12
+ class InvoiceLineItems
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # The list of line items.
17
+ field :items, Crystalline::Array.new(Models::Components::InvoiceLineItem), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items'), required: true } }
18
+
19
+ sig { params(items: T::Array[Models::Components::InvoiceLineItem]).void }
20
+ def initialize(items:)
21
+ @items = items
22
+ end
23
+
24
+ sig { params(other: T.untyped).returns(T::Boolean) }
25
+ def ==(other)
26
+ return false unless other.is_a? self.class
27
+ return false unless @items == other.items
28
+ true
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,13 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::InvoiceLineItems
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::InvoiceLineItems
11
+ def items(); end
12
+ def items=(str_); end
13
+ end