moov_ruby 0.0.0.pre.dev.31 → 0.0.0.pre.dev.33

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 (142) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moov/card_issuing.rb +2 -8
  3. data/lib/moov/invoices.rb +180 -0
  4. data/lib/moov/issuing_transactions.rb +123 -0
  5. data/lib/moov/models/components/capability.rb +2 -0
  6. data/lib/moov/models/components/capabilityid.rb +3 -0
  7. data/lib/moov/models/components/capture.rb +2 -6
  8. data/lib/moov/models/components/capture.rbi +0 -2
  9. data/lib/moov/models/components/capturemethod.rb +21 -0
  10. data/lib/moov/models/components/capturemethod.rbi +11 -0
  11. data/lib/moov/models/components/capturestatus.rb +1 -0
  12. data/lib/moov/models/components/cardpaymentoptions.rb +14 -2
  13. data/lib/moov/models/components/cardpaymentoptions.rbi +6 -0
  14. data/lib/moov/models/components/createauthorizationsimulation.rb +2 -2
  15. data/lib/moov/models/components/createcapture.rb +2 -6
  16. data/lib/moov/models/components/createcapture.rbi +0 -2
  17. data/lib/moov/models/components/createcardpaymentoptions.rb +55 -0
  18. data/lib/moov/models/components/createcardpaymentoptions.rbi +21 -0
  19. data/lib/moov/models/components/createcardpaymentoptions_capturemethod.rb +20 -0
  20. data/lib/moov/models/components/createcardpaymentoptions_capturemethod.rbi +11 -0
  21. data/lib/moov/models/components/createinvoice.rb +10 -2
  22. data/lib/moov/models/components/createinvoice.rbi +4 -0
  23. data/lib/moov/models/components/createinvoicenotification.rb +32 -0
  24. data/lib/moov/models/components/createinvoicenotification.rbi +13 -0
  25. data/lib/moov/models/components/createsweepconfig.rb +6 -2
  26. data/lib/moov/models/components/createsweepconfig.rbi +2 -0
  27. data/lib/moov/models/components/createtransfer.rb +6 -2
  28. data/lib/moov/models/components/createtransfer.rbi +2 -0
  29. data/lib/moov/models/components/createtransferdestination.rb +2 -14
  30. data/lib/moov/models/components/createtransferdestination.rbi +0 -6
  31. data/lib/moov/models/components/createtransferrailoptions.rb +52 -0
  32. data/lib/moov/models/components/createtransferrailoptions.rbi +23 -0
  33. data/lib/moov/models/components/createtransferresponse.rb +27 -0
  34. data/lib/moov/models/components/createtransferresponse.rbi +11 -0
  35. data/lib/moov/models/components/createtransfersource.rb +2 -10
  36. data/lib/moov/models/components/createtransfersource.rbi +0 -4
  37. data/lib/moov/models/components/fullissuedcard.rb +6 -4
  38. data/lib/moov/models/components/invoice.rb +6 -2
  39. data/lib/moov/models/components/invoice.rbi +2 -0
  40. data/lib/moov/models/components/invoicenotificationlimitedchannel.rb +36 -0
  41. data/lib/moov/models/components/invoicenotificationlimitedchannel.rbi +15 -0
  42. data/lib/moov/models/components/invoicepaymentoptions.rb +40 -0
  43. data/lib/moov/models/components/invoicepaymentoptions.rbi +17 -0
  44. data/lib/moov/models/components/invoicepaymentoptionserror.rb +40 -0
  45. data/lib/moov/models/components/invoicepaymentoptionserror.rbi +17 -0
  46. data/lib/moov/models/components/invoicepaymentoptionsupdate.rb +40 -0
  47. data/lib/moov/models/components/invoicepaymentoptionsupdate.rbi +17 -0
  48. data/lib/moov/models/components/issuedcard.rb +6 -4
  49. data/lib/moov/models/components/issuedcardauthorization.rb +6 -2
  50. data/lib/moov/models/components/issuedcardauthorization.rbi +2 -0
  51. data/lib/moov/models/components/issuedcardstate.rb +6 -4
  52. data/lib/moov/models/components/issuedcardtransaction.rb +6 -2
  53. data/lib/moov/models/components/issuedcardtransaction.rbi +2 -0
  54. data/lib/moov/models/components/issuedcontrols_allowedschedule.rb +1 -1
  55. data/lib/moov/models/components/issuingcontrols_allowedschedule.rb +1 -1
  56. data/lib/moov/models/components/notificationchannel.rb +18 -0
  57. data/lib/moov/models/components/notificationchannel.rbi +11 -0
  58. data/lib/moov/models/components/patchsweepconfig.rb +6 -2
  59. data/lib/moov/models/components/patchsweepconfig.rbi +2 -0
  60. data/lib/moov/models/components/pushtocardoptions.rb +6 -2
  61. data/lib/moov/models/components/pushtocardoptions.rbi +2 -0
  62. data/lib/moov/models/components/requestcard.rb +2 -6
  63. data/lib/moov/models/components/requestcard.rbi +0 -2
  64. data/lib/moov/models/components/schedule.rb +40 -0
  65. data/lib/moov/models/components/schedule.rbi +17 -0
  66. data/lib/moov/models/components/schedulewindow.rb +1 -1
  67. data/lib/moov/models/components/simulationissuingmerchantdata.rb +56 -0
  68. data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rbi → simulationissuingmerchantdata.rbi} +2 -2
  69. data/lib/moov/models/components/{issuingmerchantdatavalidationerror.rb → simulationissuingmerchantdatavalidationerror.rb} +1 -1
  70. data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rbi +25 -0
  71. data/lib/moov/models/components/sweepconfig.rb +6 -2
  72. data/lib/moov/models/components/sweepconfig.rbi +2 -0
  73. data/lib/moov/models/components/sweepconfigschedule.rb +40 -0
  74. data/lib/moov/models/components/sweepconfigschedule.rbi +17 -0
  75. data/lib/moov/models/components/sweepconfigscheduleerror.rb +40 -0
  76. data/lib/moov/models/components/sweepconfigscheduleerror.rbi +17 -0
  77. data/lib/moov/models/components/sweepschedulefrequency.rb +18 -0
  78. data/lib/moov/models/components/sweepschedulefrequency.rbi +11 -0
  79. data/lib/moov/models/components/transferauthorization.rb +6 -2
  80. data/lib/moov/models/components/transferauthorization.rbi +2 -0
  81. data/lib/moov/models/components/updateinvoice.rb +6 -2
  82. data/lib/moov/models/components/updateinvoice.rbi +2 -0
  83. data/lib/moov/models/components/updateissuedcard.rb +3 -3
  84. data/lib/moov/models/components/updateissuedcardstate.rb +3 -3
  85. data/lib/moov/models/components/updateissuingcontrols_allowedschedule.rb +1 -1
  86. data/lib/moov/models/components/upsertunderwriting.rb +1 -1
  87. data/lib/moov/models/components/webhookdatacapabilityrequested.rb +2 -0
  88. data/lib/moov/models/components/webhookdatacapabilityupdated.rb +2 -0
  89. data/lib/moov/models/components.rb +17 -3
  90. data/lib/moov/models/errors/authorizationsimulationvalidationerror.rb +3 -3
  91. data/lib/moov/models/errors/capturevalidationerror.rb +2 -6
  92. data/lib/moov/models/errors/capturevalidationerror.rbi +0 -2
  93. data/lib/moov/models/errors/clearingsimulationvalidationerror.rb +1 -1
  94. data/lib/moov/models/errors/createinvoiceerror.rb +10 -2
  95. data/lib/moov/models/errors/createinvoiceerror.rbi +4 -0
  96. data/lib/moov/models/errors/createsweepconfigerror.rb +6 -2
  97. data/lib/moov/models/errors/createsweepconfigerror.rbi +2 -0
  98. data/lib/moov/models/errors/invoicenotificationerror.rb +36 -0
  99. data/lib/moov/models/errors/invoicenotificationerror.rbi +15 -0
  100. data/lib/moov/models/errors/invoicenotificationratelimitederror.rb +44 -0
  101. data/lib/moov/models/errors/invoicenotificationratelimitederror.rbi +19 -0
  102. data/lib/moov/models/errors/listtransfersvalidationerror.rb +6 -2
  103. data/lib/moov/models/errors/listtransfersvalidationerror.rbi +2 -0
  104. data/lib/moov/models/errors/patchsweepconfigerror.rb +6 -2
  105. data/lib/moov/models/errors/patchsweepconfigerror.rbi +2 -0
  106. data/lib/moov/models/errors/requestcarderror.rb +2 -6
  107. data/lib/moov/models/errors/requestcarderror.rbi +0 -2
  108. data/lib/moov/models/errors/updateinvoiceerror.rb +6 -2
  109. data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -0
  110. data/lib/moov/models/errors.rb +2 -0
  111. data/lib/moov/models/operations/createinvoicenotification_request.rb +40 -0
  112. data/lib/moov/models/operations/createinvoicenotification_request.rbi +17 -0
  113. data/lib/moov/models/operations/{createcancellation_response.rb → createinvoicenotification_response.rb} +3 -7
  114. data/lib/moov/models/operations/{createcancellation_response.rbi → createinvoicenotification_response.rbi} +2 -4
  115. data/lib/moov/models/operations/createtransfer_response.rb +5 -5
  116. data/lib/moov/models/operations/createtransfer_response.rbi +2 -2
  117. data/lib/moov/models/operations/disablecapability_request.rb +2 -0
  118. data/lib/moov/models/operations/getcapability_request.rb +2 -0
  119. data/lib/moov/models/operations/getissuedcardactivity_request.rb +36 -0
  120. data/lib/moov/models/operations/getissuedcardactivity_request.rbi +15 -0
  121. data/lib/moov/models/operations/getissuedcardactivity_response.rb +48 -0
  122. data/lib/moov/models/operations/getissuedcardactivity_response.rbi +21 -0
  123. data/lib/moov/models/operations/initiaterefund_request.rb +1 -1
  124. data/lib/moov/models/operations/listissuedcardauthorizations_request.rb +6 -2
  125. data/lib/moov/models/operations/listissuedcardauthorizations_request.rbi +2 -0
  126. data/lib/moov/models/operations/listissuedcards_request.rb +6 -2
  127. data/lib/moov/models/operations/listissuedcards_request.rbi +2 -0
  128. data/lib/moov/models/operations/listissuedcardtransactions_request.rb +6 -2
  129. data/lib/moov/models/operations/listissuedcardtransactions_request.rbi +2 -0
  130. data/lib/moov/models/operations/listtransfers_request.rb +7 -2
  131. data/lib/moov/models/operations/listtransfers_request.rbi +2 -0
  132. data/lib/moov/models/operations/listtransfers_response.rb +1 -1
  133. data/lib/moov/models/operations.rb +4 -2
  134. data/lib/moov/sdkconfiguration.rb +3 -3
  135. data/lib/moov/transfers.rb +9 -157
  136. metadata +48 -12
  137. data/lib/moov/models/components/cardexpirationerror.rb +0 -36
  138. data/lib/moov/models/components/cardexpirationerror.rbi +0 -15
  139. data/lib/moov/models/components/createcancellation.rb +0 -34
  140. data/lib/moov/models/components/createcancellation.rbi +0 -13
  141. data/lib/moov/models/operations/createcancellation_request.rb +0 -40
  142. data/lib/moov/models/operations/createcancellation_request.rbi +0 -17
@@ -0,0 +1,20 @@
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
+ # CreateCardPaymentOptionsCaptureMethod - How funds are captured. `automatic` (default) authorizes and captures the full amount right away.
11
+ # `manual` authorizes only; capture later with the capture endpoint.
12
+ class CreateCardPaymentOptionsCaptureMethod < T::Enum
13
+ enums do
14
+ AUTOMATIC = new('automatic')
15
+ MANUAL = new('manual')
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CreateCardPaymentOptionsCaptureMethod
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateCardPaymentOptionsCaptureMethod
11
+ end
@@ -18,23 +18,29 @@ module Moov
18
18
  field :line_items, Models::Components::CreateInvoiceLineItems, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems'), required: true } }
19
19
  # Email address to use for invoice checkout OTP verification instead of the customer account email.
20
20
  field :customer_email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('customerEmail') } }
21
+ # Optional merchant-defined invoice number, up to 64 characters. Must be unique for the account. If omitted, empty, or whitespace-only, the next number in the INV-<n> sequence is assigned automatically.
22
+ field :invoice_number, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceNumber') } }
21
23
 
22
24
  field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('description') } }
23
25
 
24
26
  field :invoice_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('invoiceDate'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
25
27
 
26
28
  field :due_date, Crystalline::Nilable.new(::DateTime), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('dueDate'), 'decoder': ::Moov::Utils.datetime_from_iso_format(true) } }
29
+ # Payment options for the invoice.
30
+ field :payment, Crystalline::Nilable.new(Models::Components::InvoicePaymentOptions), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('payment') } }
27
31
 
28
32
  field :amount_details, Crystalline::Nilable.new(Models::Components::AmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
29
33
 
30
- sig { params(customer_account_id: ::String, line_items: Models::Components::CreateInvoiceLineItems, customer_email: T.nilable(::String), description: T.nilable(::String), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), amount_details: T.nilable(Models::Components::AmountDetails)).void }
31
- def initialize(customer_account_id:, line_items:, customer_email: nil, description: nil, invoice_date: nil, due_date: nil, amount_details: nil)
34
+ sig { params(customer_account_id: ::String, line_items: Models::Components::CreateInvoiceLineItems, customer_email: T.nilable(::String), invoice_number: T.nilable(::String), description: T.nilable(::String), invoice_date: T.nilable(::DateTime), due_date: T.nilable(::DateTime), payment: T.nilable(Models::Components::InvoicePaymentOptions), amount_details: T.nilable(Models::Components::AmountDetails)).void }
35
+ def initialize(customer_account_id:, line_items:, customer_email: nil, invoice_number: nil, description: nil, invoice_date: nil, due_date: nil, payment: nil, amount_details: nil)
32
36
  @customer_account_id = customer_account_id
33
37
  @line_items = line_items
34
38
  @customer_email = customer_email
39
+ @invoice_number = invoice_number
35
40
  @description = description
36
41
  @invoice_date = invoice_date
37
42
  @due_date = due_date
43
+ @payment = payment
38
44
  @amount_details = amount_details
39
45
  end
40
46
 
@@ -44,9 +50,11 @@ module Moov
44
50
  return false unless @customer_account_id == other.customer_account_id
45
51
  return false unless @line_items == other.line_items
46
52
  return false unless @customer_email == other.customer_email
53
+ return false unless @invoice_number == other.invoice_number
47
54
  return false unless @description == other.description
48
55
  return false unless @invoice_date == other.invoice_date
49
56
  return false unless @due_date == other.due_date
57
+ return false unless @payment == other.payment
50
58
  return false unless @amount_details == other.amount_details
51
59
  true
52
60
  end
@@ -14,12 +14,16 @@ class Moov::Models::Components::CreateInvoice
14
14
  def line_items=(str_); end
15
15
  def customer_email(); end
16
16
  def customer_email=(str_); end
17
+ def invoice_number(); end
18
+ def invoice_number=(str_); end
17
19
  def description(); end
18
20
  def description=(str_); end
19
21
  def invoice_date(); end
20
22
  def invoice_date=(str_); end
21
23
  def due_date(); end
22
24
  def due_date=(str_); end
25
+ def payment(); end
26
+ def payment=(str_); end
23
27
  def amount_details(); end
24
28
  def amount_details=(str_); end
25
29
  end
@@ -0,0 +1,32 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Moov
8
+ module Models
9
+ module Components
10
+
11
+ class CreateInvoiceNotification
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # The channels to send the notification on. Required, must contain at least one channel.
16
+ field :channels, Crystalline::Array.new(Models::Components::NotificationChannel), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('channels'), required: true } }
17
+
18
+ sig { params(channels: T::Array[Models::Components::NotificationChannel]).void }
19
+ def initialize(channels:)
20
+ @channels = channels
21
+ end
22
+
23
+ sig { params(other: T.untyped).returns(T::Boolean) }
24
+ def ==(other)
25
+ return false unless other.is_a? self.class
26
+ return false unless @channels == other.channels
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,13 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CreateInvoiceNotification
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateInvoiceNotification
11
+ def channels(); end
12
+ def channels=(str_); end
13
+ end
@@ -24,15 +24,18 @@ module Moov
24
24
  field :statement_descriptor, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('statementDescriptor') } }
25
25
 
26
26
  field :minimum_balance, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('minimumBalance') } }
27
+ # Overrides the time of day this wallet's sweep runs. Sweeps only run on US banking days.
28
+ field :schedule, Crystalline::Nilable.new(Models::Components::SweepConfigSchedule), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('schedule') } }
27
29
 
28
- sig { params(wallet_id: ::String, status: Models::Components::SweepConfigStatus, push_payment_method_id: ::String, pull_payment_method_id: ::String, statement_descriptor: T.nilable(::String), minimum_balance: T.nilable(::String)).void }
29
- def initialize(wallet_id:, status:, push_payment_method_id:, pull_payment_method_id:, statement_descriptor: nil, minimum_balance: nil)
30
+ sig { params(wallet_id: ::String, status: Models::Components::SweepConfigStatus, push_payment_method_id: ::String, pull_payment_method_id: ::String, statement_descriptor: T.nilable(::String), minimum_balance: T.nilable(::String), schedule: T.nilable(Models::Components::SweepConfigSchedule)).void }
31
+ def initialize(wallet_id:, status:, push_payment_method_id:, pull_payment_method_id:, statement_descriptor: nil, minimum_balance: nil, schedule: nil)
30
32
  @wallet_id = wallet_id
31
33
  @status = status
32
34
  @push_payment_method_id = push_payment_method_id
33
35
  @pull_payment_method_id = pull_payment_method_id
34
36
  @statement_descriptor = statement_descriptor
35
37
  @minimum_balance = minimum_balance
38
+ @schedule = schedule
36
39
  end
37
40
 
38
41
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -44,6 +47,7 @@ module Moov
44
47
  return false unless @pull_payment_method_id == other.pull_payment_method_id
45
48
  return false unless @statement_descriptor == other.statement_descriptor
46
49
  return false unless @minimum_balance == other.minimum_balance
50
+ return false unless @schedule == other.schedule
47
51
  true
48
52
  end
49
53
  end
@@ -20,4 +20,6 @@ class Moov::Models::Components::CreateSweepConfig
20
20
  def statement_descriptor=(str_); end
21
21
  def minimum_balance(); end
22
22
  def minimum_balance=(str_); end
23
+ def schedule(); end
24
+ def schedule=(str_); end
23
25
  end
@@ -18,6 +18,8 @@ module Moov
18
18
  field :destination, Models::Components::CreateTransferDestination, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('destination'), required: true } }
19
19
 
20
20
  field :amount, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
21
+ # Rail-specific options for a new transfer. Set only the key that matches the transfer's rail.
22
+ field :options, Crystalline::Nilable.new(Models::Components::CreateTransferRailOptions), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('options') } }
21
23
  # Total or markup fee to apply when creating a transfer.
22
24
  field :facilitator_fee, Crystalline::Nilable.new(Models::Components::CreateTransferFacilitatorFee), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('facilitatorFee') } }
23
25
  # An optional description of the transfer that is used on receipts and for your own internal use.
@@ -34,11 +36,12 @@ module Moov
34
36
  # Indicates which party bears fees for a transfer, keyed by fee type.
35
37
  field :fee_paid_by, Crystalline::Nilable.new(Models::Components::TransferFeePaidBy), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('feePaidBy') } }
36
38
 
37
- sig { params(source: Models::Components::CreateTransferSource, destination: Models::Components::CreateTransferDestination, amount: Models::Components::AmountDecimal, facilitator_fee: T.nilable(Models::Components::CreateTransferFacilitatorFee), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::CreateTransferLineItems), amount_details: T.nilable(Models::Components::CreateTransferAmountDetails), fee_paid_by: T.nilable(Models::Components::TransferFeePaidBy)).void }
38
- def initialize(source:, destination:, amount:, facilitator_fee: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, fee_paid_by: nil)
39
+ sig { params(source: Models::Components::CreateTransferSource, destination: Models::Components::CreateTransferDestination, amount: Models::Components::AmountDecimal, options: T.nilable(Models::Components::CreateTransferRailOptions), facilitator_fee: T.nilable(Models::Components::CreateTransferFacilitatorFee), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::CreateTransferLineItems), amount_details: T.nilable(Models::Components::CreateTransferAmountDetails), fee_paid_by: T.nilable(Models::Components::TransferFeePaidBy)).void }
40
+ def initialize(source:, destination:, amount:, options: nil, facilitator_fee: nil, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, fee_paid_by: nil)
39
41
  @source = source
40
42
  @destination = destination
41
43
  @amount = amount
44
+ @options = options
42
45
  @facilitator_fee = facilitator_fee
43
46
  @description = description
44
47
  @metadata = metadata
@@ -54,6 +57,7 @@ module Moov
54
57
  return false unless @source == other.source
55
58
  return false unless @destination == other.destination
56
59
  return false unless @amount == other.amount
60
+ return false unless @options == other.options
57
61
  return false unless @facilitator_fee == other.facilitator_fee
58
62
  return false unless @description == other.description
59
63
  return false unless @metadata == other.metadata
@@ -14,6 +14,8 @@ class Moov::Models::Components::CreateTransfer
14
14
  def destination=(str_); end
15
15
  def amount(); end
16
16
  def amount=(str_); end
17
+ def options(); end
18
+ def options=(str_); end
17
19
  def facilitator_fee(); end
18
20
  def facilitator_fee=(str_); end
19
21
  def description(); end
@@ -15,27 +15,15 @@ module Moov
15
15
 
16
16
  field :payment_method_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentMethodID'), required: true } }
17
17
 
18
- field :card_details, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
19
-
20
- field :ach_details, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationACH), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDetails') } }
21
- # Wire-specific options supplied when creating a transfer.
22
- field :wire_details, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationWire), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('wireDetails') } }
23
-
24
- sig { params(payment_method_id: ::String, card_details: T.nilable(Models::Components::CreateTransferDestinationCard), ach_details: T.nilable(Models::Components::CreateTransferDestinationACH), wire_details: T.nilable(Models::Components::CreateTransferDestinationWire)).void }
25
- def initialize(payment_method_id:, card_details: nil, ach_details: nil, wire_details: nil)
18
+ sig { params(payment_method_id: ::String).void }
19
+ def initialize(payment_method_id:)
26
20
  @payment_method_id = payment_method_id
27
- @card_details = card_details
28
- @ach_details = ach_details
29
- @wire_details = wire_details
30
21
  end
31
22
 
32
23
  sig { params(other: T.untyped).returns(T::Boolean) }
33
24
  def ==(other)
34
25
  return false unless other.is_a? self.class
35
26
  return false unless @payment_method_id == other.payment_method_id
36
- return false unless @card_details == other.card_details
37
- return false unless @ach_details == other.ach_details
38
- return false unless @wire_details == other.wire_details
39
27
  true
40
28
  end
41
29
  end
@@ -10,10 +10,4 @@ end
10
10
  class Moov::Models::Components::CreateTransferDestination
11
11
  def payment_method_id(); end
12
12
  def payment_method_id=(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
- def wire_details(); end
18
- def wire_details=(str_); end
19
13
  end
@@ -0,0 +1,52 @@
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
+ # Rail-specific options for a new transfer. Set only the key that matches the transfer's rail.
11
+ class CreateTransferRailOptions
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # Options for a new `card-payment` transfer.
16
+ field :card_payment, Crystalline::Nilable.new(Models::Components::CreateCardPaymentOptions), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardPayment') } }
17
+
18
+ field :push_to_card, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('pushToCard') } }
19
+
20
+ field :pull_from_card, Crystalline::Nilable.new(Models::Components::CreateTransferSourceCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('pullFromCard') } }
21
+
22
+ field :ach_debit, Crystalline::Nilable.new(Models::Components::CreateTransferSourceACH), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achDebit') } }
23
+
24
+ field :ach_credit, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationACH), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('achCredit') } }
25
+ # Wire-specific options supplied when creating a transfer.
26
+ field :wire, Crystalline::Nilable.new(Models::Components::CreateTransferDestinationWire), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('wire') } }
27
+
28
+ sig { params(card_payment: T.nilable(Models::Components::CreateCardPaymentOptions), push_to_card: T.nilable(Models::Components::CreateTransferDestinationCard), pull_from_card: T.nilable(Models::Components::CreateTransferSourceCard), ach_debit: T.nilable(Models::Components::CreateTransferSourceACH), ach_credit: T.nilable(Models::Components::CreateTransferDestinationACH), wire: T.nilable(Models::Components::CreateTransferDestinationWire)).void }
29
+ def initialize(card_payment: nil, push_to_card: nil, pull_from_card: nil, ach_debit: nil, ach_credit: nil, wire: nil)
30
+ @card_payment = card_payment
31
+ @push_to_card = push_to_card
32
+ @pull_from_card = pull_from_card
33
+ @ach_debit = ach_debit
34
+ @ach_credit = ach_credit
35
+ @wire = wire
36
+ end
37
+
38
+ sig { params(other: T.untyped).returns(T::Boolean) }
39
+ def ==(other)
40
+ return false unless other.is_a? self.class
41
+ return false unless @card_payment == other.card_payment
42
+ return false unless @push_to_card == other.push_to_card
43
+ return false unless @pull_from_card == other.pull_from_card
44
+ return false unless @ach_debit == other.ach_debit
45
+ return false unless @ach_credit == other.ach_credit
46
+ return false unless @wire == other.wire
47
+ true
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,23 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CreateTransferRailOptions
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateTransferRailOptions
11
+ def card_payment(); end
12
+ def card_payment=(str_); end
13
+ def push_to_card(); end
14
+ def push_to_card=(str_); end
15
+ def pull_from_card(); end
16
+ def pull_from_card=(str_); end
17
+ def ach_debit(); end
18
+ def ach_debit=(str_); end
19
+ def ach_credit(); end
20
+ def ach_credit=(str_); end
21
+ def wire(); end
22
+ def wire=(str_); end
23
+ end
@@ -0,0 +1,27 @@
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 CreateTransferResponse
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+
16
+
17
+ def initialize; end
18
+
19
+ sig { params(other: T.untyped).returns(T::Boolean) }
20
+ def ==(other)
21
+ return false unless other.is_a? self.class
22
+ true
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CreateTransferResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateTransferResponse
11
+ end
@@ -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
- field :card_details, Crystalline::Nilable.new(Models::Components::CreateTransferSourceCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardDetails') } }
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
@@ -22,11 +22,13 @@ module Moov
22
22
  field :expiration, Models::Components::CardExpiration, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('expiration'), required: true } }
23
23
  # Unique identifier for the wallet funding the card.
24
24
  field :funding_wallet_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('fundingWalletID'), required: true } }
25
- # The `state` represents the operational status of an issued card. A card can only approve incoming authorizations if it is in an active state.
25
+ # The `state` represents the operational status of an issued card.
26
26
  #
27
- # - `active`: The card is operational and can approve authorizations.
28
- # - `frozen`: The card is temporarily suspended and cannot approve authorizations. A frozen card can be reactivated by setting its state back to `active`.
29
- # - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires.
27
+ # Authorizations can only be approved while the card is `active`:
28
+ #
29
+ # - `active`: The card is operational and authorizations can be approved.
30
+ # - `frozen`: The card is temporarily suspended and authorizations cannot be approved. Set the state back to `active` to reactivate it. A card can move between `frozen` and `active` as often as needed.
31
+ # - `closed`: The card is permanently deactivated. A card is closed by request or when it expires, and cannot be reopened.
30
32
  field :state, Models::Components::IssuedCardState, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('state'), required: true, 'decoder': ::Moov::Utils.open_enum_from_string(Models::Components::IssuedCardState, false) } }
31
33
  # Specifies the type of spend card to be issued. Presently supports virtual only, providing a digital number without a physical card.
32
34
  field :form_factor, Models::Components::IssuedCardFormFactor, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('formFactor'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::IssuedCardFormFactor, false) } }
@@ -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