moov_ruby 0.3.5 → 0.3.7

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 (103) 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/createpaymentlink.rb +2 -2
  9. data/lib/moov/models/components/createpaymentlinklineitem.rb +53 -0
  10. data/lib/moov/models/components/createpaymentlinklineitem.rbi +23 -0
  11. data/lib/moov/models/components/createpaymentlinklineitemoption.rb +49 -0
  12. data/lib/moov/models/components/createpaymentlinklineitemoption.rbi +21 -0
  13. data/lib/moov/models/components/createpaymentlinklineitemoptionvalidationerror.rb +45 -0
  14. data/lib/moov/models/components/createpaymentlinklineitemoptionvalidationerror.rbi +19 -0
  15. data/lib/moov/models/components/createpaymentlinklineitems.rb +34 -0
  16. data/lib/moov/models/components/{paymentlinklineitemsupdate.rbi → createpaymentlinklineitems.rbi} +2 -2
  17. data/lib/moov/models/components/{paymentlinklineitemsupdate.rb → createpaymentlinklineitemsupdate.rb} +3 -3
  18. data/lib/moov/models/components/{paymentlinklineitemsvalidationerror.rbi → createpaymentlinklineitemsupdate.rbi} +2 -2
  19. data/lib/moov/models/components/createpaymentlinklineitemsvalidationerror.rb +33 -0
  20. data/lib/moov/models/components/createpaymentlinklineitemsvalidationerror.rbi +13 -0
  21. data/lib/moov/models/components/createpaymentlinklineitemvalidationerror.rb +49 -0
  22. data/lib/moov/models/components/createpaymentlinklineitemvalidationerror.rbi +21 -0
  23. data/lib/moov/models/components/invoice.rb +117 -0
  24. data/lib/moov/models/components/invoice.rbi +55 -0
  25. data/lib/moov/models/components/invoiceexternalpayment.rb +49 -0
  26. data/lib/moov/models/components/invoiceexternalpayment.rbi +21 -0
  27. data/lib/moov/models/components/invoiceexternalpayment_paymenttype.rb +21 -0
  28. data/lib/moov/models/components/invoiceexternalpayment_paymenttype.rbi +11 -0
  29. data/lib/moov/models/components/invoicelineitem.rb +49 -0
  30. data/lib/moov/models/components/{paymentlinklineitemvalidationerror.rbi → invoicelineitem.rbi} +6 -6
  31. data/lib/moov/models/components/invoicelineitemoption.rb +45 -0
  32. data/lib/moov/models/components/{paymentlinklineitemoptionvalidationerror.rbi → invoicelineitemoption.rbi} +6 -6
  33. data/lib/moov/models/components/{paymentlinklineitemoptionvalidationerror.rb → invoicelineitemoptionvalidationerror.rb} +1 -1
  34. data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rbi +19 -0
  35. data/lib/moov/models/components/invoicelineitems.rb +33 -0
  36. data/lib/moov/models/components/invoicelineitems.rbi +13 -0
  37. data/lib/moov/models/components/invoicelineitemsupdate.rb +33 -0
  38. data/lib/moov/models/components/invoicelineitemsupdate.rbi +13 -0
  39. data/lib/moov/models/components/{paymentlinklineitemsvalidationerror.rb → invoicelineitemsvalidationerror.rb} +3 -3
  40. data/lib/moov/models/components/invoicelineitemsvalidationerror.rbi +13 -0
  41. data/lib/moov/models/components/{paymentlinklineitemvalidationerror.rb → invoicelineitemvalidationerror.rb} +3 -3
  42. data/lib/moov/models/components/invoicelineitemvalidationerror.rbi +21 -0
  43. data/lib/moov/models/components/invoicepayment.rb +28 -0
  44. data/lib/moov/models/components/invoicepayment.rbi +11 -0
  45. data/lib/moov/models/components/invoicestatus.rb +26 -0
  46. data/lib/moov/models/components/invoicestatus.rbi +11 -0
  47. data/lib/moov/models/components/invoicetransferpayment.rb +37 -0
  48. data/lib/moov/models/components/invoicetransferpayment.rbi +15 -0
  49. data/lib/moov/models/components/invoicetransferpayment_paymenttype.rb +21 -0
  50. data/lib/moov/models/components/invoicetransferpayment_paymenttype.rbi +11 -0
  51. data/lib/moov/models/components/markinvoicepaid.rb +41 -0
  52. data/lib/moov/models/components/markinvoicepaid.rbi +17 -0
  53. data/lib/moov/models/components/paymentlinklineitem.rb +6 -2
  54. data/lib/moov/models/components/paymentlinklineitem.rbi +2 -0
  55. data/lib/moov/models/components/paymentlinklineitemimagemetadata.rb +45 -0
  56. data/lib/moov/models/components/paymentlinklineitemimagemetadata.rbi +19 -0
  57. data/lib/moov/models/components/paymentlinklineitemoption.rb +6 -2
  58. data/lib/moov/models/components/paymentlinklineitemoption.rbi +2 -0
  59. data/lib/moov/models/components/updateinvoice.rb +53 -0
  60. data/lib/moov/models/components/updateinvoice.rbi +23 -0
  61. data/lib/moov/models/components/updatepaymentlink.rb +2 -2
  62. data/lib/moov/models/components/webhookdatainvoicecreated.rb +37 -0
  63. data/lib/moov/models/components/webhookdatainvoicecreated.rbi +15 -0
  64. data/lib/moov/models/components/webhookdatainvoiceupdated.rb +41 -0
  65. data/lib/moov/models/components/webhookdatainvoiceupdated.rbi +17 -0
  66. data/lib/moov/models/components/webhookevent.rb +2 -2
  67. data/lib/moov/models/components/webhookeventtype.rb +2 -0
  68. data/lib/moov/models/components.rb +28 -4
  69. data/lib/moov/models/errors/createinvoiceerror.rb +57 -0
  70. data/lib/moov/models/errors/createinvoiceerror.rbi +25 -0
  71. data/lib/moov/models/errors/createpaymentlinkerror.rb +2 -2
  72. data/lib/moov/models/errors/listinvoicesvalidationerror.rb +49 -0
  73. data/lib/moov/models/errors/listinvoicesvalidationerror.rbi +21 -0
  74. data/lib/moov/models/errors/markinvoicepaiderror.rb +45 -0
  75. data/lib/moov/models/errors/markinvoicepaiderror.rbi +19 -0
  76. data/lib/moov/models/errors/updateinvoiceerror.rb +57 -0
  77. data/lib/moov/models/errors/updateinvoiceerror.rbi +25 -0
  78. data/lib/moov/models/errors/updatepaymentlinkerror.rb +2 -2
  79. data/lib/moov/models/errors.rb +4 -0
  80. data/lib/moov/models/operations/createinvoice_request.rb +50 -0
  81. data/lib/moov/models/operations/createinvoice_request.rbi +17 -0
  82. data/lib/moov/models/operations/createinvoice_response.rb +49 -0
  83. data/lib/moov/models/operations/createinvoice_response.rbi +21 -0
  84. data/lib/moov/models/operations/getinvoice_request.rb +50 -0
  85. data/lib/moov/models/operations/getinvoice_request.rbi +17 -0
  86. data/lib/moov/models/operations/getinvoice_response.rb +49 -0
  87. data/lib/moov/models/operations/getinvoice_response.rbi +21 -0
  88. data/lib/moov/models/operations/listinvoices_request.rb +62 -0
  89. data/lib/moov/models/operations/listinvoices_request.rbi +23 -0
  90. data/lib/moov/models/operations/listinvoices_response.rb +49 -0
  91. data/lib/moov/models/operations/listinvoices_response.rbi +21 -0
  92. data/lib/moov/models/operations/markpaidinvoice_request.rb +54 -0
  93. data/lib/moov/models/operations/markpaidinvoice_request.rbi +19 -0
  94. data/lib/moov/models/operations/markpaidinvoice_response.rb +49 -0
  95. data/lib/moov/models/operations/markpaidinvoice_response.rbi +21 -0
  96. data/lib/moov/models/operations/updateinvoice_request.rb +54 -0
  97. data/lib/moov/models/operations/updateinvoice_request.rbi +19 -0
  98. data/lib/moov/models/operations/updateinvoice_response.rb +49 -0
  99. data/lib/moov/models/operations/updateinvoice_response.rbi +21 -0
  100. data/lib/moov/models/operations.rb +10 -0
  101. data/lib/moov/sdkconfiguration.rb +3 -3
  102. data/lib/moov_ruby.rb +1 -0
  103. metadata +87 -10
@@ -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
@@ -41,9 +41,9 @@ module Moov
41
41
  field :payout, Crystalline::Nilable.new(Models::Components::PaymentLinkPayoutDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('payout') } }
42
42
  # An optional collection of line items for a payment link.
43
43
  # When line items are provided, their total plus sales tax must equal the payment link amount.
44
- field :line_items, Crystalline::Nilable.new(Models::Components::PaymentLinkLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
44
+ field :line_items, Crystalline::Nilable.new(Models::Components::CreatePaymentLinkLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
45
45
 
46
- sig { params(partner_account_id: ::String, merchant_payment_method_id: ::String, amount: Models::Components::Amount, display: Models::Components::PaymentLinkDisplayOptions, max_uses: T.nilable(::Integer), expires_on: T.nilable(::DateTime), customer: T.nilable(Models::Components::PaymentLinkCustomerOptions), payment: T.nilable(Models::Components::PaymentLinkPaymentDetails), payout: T.nilable(Models::Components::PaymentLinkPayoutDetails), line_items: T.nilable(Models::Components::PaymentLinkLineItems)).void }
46
+ sig { params(partner_account_id: ::String, merchant_payment_method_id: ::String, amount: Models::Components::Amount, display: Models::Components::PaymentLinkDisplayOptions, max_uses: T.nilable(::Integer), expires_on: T.nilable(::DateTime), customer: T.nilable(Models::Components::PaymentLinkCustomerOptions), payment: T.nilable(Models::Components::PaymentLinkPaymentDetails), payout: T.nilable(Models::Components::PaymentLinkPayoutDetails), line_items: T.nilable(Models::Components::CreatePaymentLinkLineItems)).void }
47
47
  def initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: nil)
48
48
  @partner_account_id = partner_account_id
49
49
  @merchant_payment_method_id = merchant_payment_method_id
@@ -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
+ # Represents a single line item in a payment link, including optional modifiers and quantity.
12
+ class CreatePaymentLinkLineItem
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::CreatePaymentLinkLineItemOption)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
24
+ # Optional list of images associated with this line item.
25
+ field :image_i_ds, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageIDs') } }
26
+ # Optional unique identifier associating the line item with a product.
27
+ field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
28
+
29
+ sig { params(name: ::String, base_price: Models::Components::AmountDecimal, quantity: ::Integer, options: T.nilable(T::Array[Models::Components::CreatePaymentLinkLineItemOption]), image_i_ds: T.nilable(T::Array[::String]), product_id: T.nilable(::String)).void }
30
+ def initialize(name:, base_price:, quantity:, options: nil, image_i_ds: nil, product_id: nil)
31
+ @name = name
32
+ @base_price = base_price
33
+ @quantity = quantity
34
+ @options = options
35
+ @image_i_ds = image_i_ds
36
+ @product_id = product_id
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 @name == other.name
43
+ return false unless @base_price == other.base_price
44
+ return false unless @quantity == other.quantity
45
+ return false unless @options == other.options
46
+ return false unless @image_i_ds == other.image_i_ds
47
+ return false unless @product_id == other.product_id
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::CreatePaymentLinkLineItem
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkLineItem
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 image_i_ds(); end
20
+ def image_i_ds=(str_); end
21
+ def product_id(); end
22
+ def product_id=(str_); end
23
+ 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 modifier or option applied to a line item.
12
+ class CreatePaymentLinkLineItemOption
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 list of images associated with this line item option.
23
+ field :image_i_ds, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('imageIDs') } }
24
+ # Optional group identifier to categorize related options (e.g., 'toppings').
25
+ field :group, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('group') } }
26
+
27
+ sig { params(name: ::String, quantity: ::Integer, price_modifier: T.nilable(Models::Components::AmountDecimal), image_i_ds: T.nilable(T::Array[::String]), group: T.nilable(::String)).void }
28
+ def initialize(name:, quantity:, price_modifier: nil, image_i_ds: nil, group: nil)
29
+ @name = name
30
+ @quantity = quantity
31
+ @price_modifier = price_modifier
32
+ @image_i_ds = image_i_ds
33
+ @group = group
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 @quantity == other.quantity
41
+ return false unless @price_modifier == other.price_modifier
42
+ return false unless @image_i_ds == other.image_i_ds
43
+ return false unless @group == other.group
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::CreatePaymentLinkLineItemOption
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkLineItemOption
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 image_i_ds(); end
18
+ def image_i_ds=(str_); end
19
+ def group(); end
20
+ def group=(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
+
12
+ class CreatePaymentLinkLineItemOptionValidationError
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::CreatePaymentLinkLineItemOptionValidationError
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkLineItemOptionValidationError
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,34 @@
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
+ # An optional collection of line items for a payment link.
12
+ # When line items are provided, their total plus sales tax must equal the payment link amount.
13
+ class CreatePaymentLinkLineItems
14
+ extend T::Sig
15
+ include Crystalline::MetadataFields
16
+
17
+ # The list of line items.
18
+ field :items, Crystalline::Array.new(Models::Components::CreatePaymentLinkLineItem), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items'), required: true } }
19
+
20
+ sig { params(items: T::Array[Models::Components::CreatePaymentLinkLineItem]).void }
21
+ def initialize(items:)
22
+ @items = items
23
+ end
24
+
25
+ sig { params(other: T.untyped).returns(T::Boolean) }
26
+ def ==(other)
27
+ return false unless other.is_a? self.class
28
+ return false unless @items == other.items
29
+ true
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -2,12 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
 
5
- class Moov::Models::Components::PaymentLinkLineItemsUpdate
5
+ class Moov::Models::Components::CreatePaymentLinkLineItems
6
6
  extend ::Crystalline::MetadataFields::ClassMethods
7
7
  end
8
8
 
9
9
 
10
- class Moov::Models::Components::PaymentLinkLineItemsUpdate
10
+ class Moov::Models::Components::CreatePaymentLinkLineItems
11
11
  def items(); end
12
12
  def items=(str_); end
13
13
  end
@@ -10,14 +10,14 @@ module Moov
10
10
 
11
11
  # An optional collection of line items for a payment link.
12
12
  # When line items are provided, their total plus sales tax must equal the payment link amount.
13
- class PaymentLinkLineItemsUpdate
13
+ class CreatePaymentLinkLineItemsUpdate
14
14
  extend T::Sig
15
15
  include Crystalline::MetadataFields
16
16
 
17
17
  # The list of line items.
18
- field :items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::PaymentLinkLineItem)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items') } }
18
+ field :items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CreatePaymentLinkLineItem)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items') } }
19
19
 
20
- sig { params(items: T.nilable(T::Array[Models::Components::PaymentLinkLineItem])).void }
20
+ sig { params(items: T.nilable(T::Array[Models::Components::CreatePaymentLinkLineItem])).void }
21
21
  def initialize(items: nil)
22
22
  @items = items
23
23
  end
@@ -2,12 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
 
5
- class Moov::Models::Components::PaymentLinkLineItemsValidationError
5
+ class Moov::Models::Components::CreatePaymentLinkLineItemsUpdate
6
6
  extend ::Crystalline::MetadataFields::ClassMethods
7
7
  end
8
8
 
9
9
 
10
- class Moov::Models::Components::PaymentLinkLineItemsValidationError
10
+ class Moov::Models::Components::CreatePaymentLinkLineItemsUpdate
11
11
  def items(); end
12
12
  def items=(str_); end
13
13
  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
+
12
+ class CreatePaymentLinkLineItemsValidationError
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :items, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, Models::Components::CreatePaymentLinkLineItemValidationError)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('items') } }
18
+
19
+ sig { params(items: T.nilable(T::Hash[Symbol, Models::Components::CreatePaymentLinkLineItemValidationError])).void }
20
+ def initialize(items: nil)
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::CreatePaymentLinkLineItemsValidationError
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkLineItemsValidationError
11
+ def items(); end
12
+ def items=(str_); end
13
+ 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 CreatePaymentLinkLineItemValidationError
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('productID') } }
18
+
19
+ field :name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('name') } }
20
+
21
+ field :base_price, Crystalline::Nilable.new(Models::Components::AmountDecimalValidationError), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('basePrice') } }
22
+
23
+ field :options, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, Models::Components::CreatePaymentLinkLineItemOptionValidationError)), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
24
+
25
+ field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('quantity') } }
26
+
27
+ sig { params(product_id: T.nilable(::String), name: T.nilable(::String), base_price: T.nilable(Models::Components::AmountDecimalValidationError), options: T.nilable(T::Hash[Symbol, Models::Components::CreatePaymentLinkLineItemOptionValidationError]), quantity: T.nilable(::String)).void }
28
+ def initialize(product_id: nil, name: nil, base_price: nil, options: nil, quantity: nil)
29
+ @product_id = product_id
30
+ @name = name
31
+ @base_price = base_price
32
+ @options = options
33
+ @quantity = quantity
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 @product_id == other.product_id
40
+ return false unless @name == other.name
41
+ return false unless @base_price == other.base_price
42
+ return false unless @options == other.options
43
+ return false unless @quantity == other.quantity
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::CreatePaymentLinkLineItemValidationError
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkLineItemValidationError
11
+ def product_id(); end
12
+ def product_id=(str_); end
13
+ def name(); end
14
+ def name=(str_); end
15
+ def base_price(); end
16
+ def base_price=(str_); end
17
+ def options(); end
18
+ def options=(str_); end
19
+ def quantity(); end
20
+ def quantity=(str_); end
21
+ end