moov_ruby 26.10.0.pre.dev.8 → 26.10.0.pre.dev.9

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 (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moov/card_issuing.rb +538 -0
  3. data/lib/moov/invoices.rb +180 -0
  4. data/lib/moov/issuing_transactions.rb +123 -0
  5. data/lib/moov/models/components/authorizationsimulationasyncresponse.rb +32 -0
  6. data/lib/moov/models/components/authorizationsimulationasyncresponse.rbi +13 -0
  7. data/lib/moov/models/components/capturestatus.rb +1 -0
  8. data/lib/moov/models/components/createauthorizationsimulation.rb +40 -0
  9. data/lib/moov/models/components/createauthorizationsimulation.rbi +17 -0
  10. data/lib/moov/models/components/{createcancellation.rb → createclearingsimulation.rb} +5 -7
  11. data/lib/moov/models/components/{createcancellation.rbi → createclearingsimulation.rbi} +2 -2
  12. data/lib/moov/models/components/createinvoice.rb +10 -2
  13. data/lib/moov/models/components/createinvoice.rbi +4 -0
  14. data/lib/moov/models/components/createinvoicenotification.rb +32 -0
  15. data/lib/moov/models/components/createinvoicenotification.rbi +13 -0
  16. data/lib/moov/models/components/createtransfer.rb +6 -2
  17. data/lib/moov/models/components/createtransfer.rbi +2 -0
  18. data/lib/moov/models/components/createtransferdestination.rb +2 -10
  19. data/lib/moov/models/components/createtransferdestination.rbi +0 -4
  20. data/lib/moov/models/components/createtransferrailoptions.rb +48 -0
  21. data/lib/moov/models/components/createtransferrailoptions.rbi +21 -0
  22. data/lib/moov/models/components/createtransferresponse.rb +27 -0
  23. data/lib/moov/models/components/createtransferresponse.rbi +11 -0
  24. data/lib/moov/models/components/createtransfersource.rb +2 -10
  25. data/lib/moov/models/components/createtransfersource.rbi +0 -4
  26. data/lib/moov/models/components/invoice.rb +6 -2
  27. data/lib/moov/models/components/invoice.rbi +2 -0
  28. data/lib/moov/models/components/invoicenotificationlimitedchannel.rb +36 -0
  29. data/lib/moov/models/components/invoicenotificationlimitedchannel.rbi +15 -0
  30. data/lib/moov/models/components/invoicepaymentoptions.rb +40 -0
  31. data/lib/moov/models/components/invoicepaymentoptions.rbi +17 -0
  32. data/lib/moov/models/components/invoicepaymentoptionserror.rb +40 -0
  33. data/lib/moov/models/components/invoicepaymentoptionserror.rbi +17 -0
  34. data/lib/moov/models/components/invoicepaymentoptionsupdate.rb +40 -0
  35. data/lib/moov/models/components/invoicepaymentoptionsupdate.rbi +17 -0
  36. data/lib/moov/models/components/notificationchannel.rb +18 -0
  37. data/lib/moov/models/components/notificationchannel.rbi +11 -0
  38. data/lib/moov/models/components/pushtocardoptions.rb +6 -2
  39. data/lib/moov/models/components/pushtocardoptions.rbi +2 -0
  40. data/lib/moov/models/components/simulationissuingmerchantdata.rb +56 -0
  41. data/lib/moov/models/components/simulationissuingmerchantdata.rbi +25 -0
  42. data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rb +56 -0
  43. data/lib/moov/models/components/simulationissuingmerchantdatavalidationerror.rbi +25 -0
  44. data/lib/moov/models/components/updateinvoice.rb +6 -2
  45. data/lib/moov/models/components/updateinvoice.rbi +2 -0
  46. data/lib/moov/models/components.rb +13 -1
  47. data/lib/moov/models/errors/authorizationsimulationvalidationerror.rb +44 -0
  48. data/lib/moov/models/errors/authorizationsimulationvalidationerror.rbi +19 -0
  49. data/lib/moov/models/errors/clearingsimulationvalidationerror.rb +36 -0
  50. data/lib/moov/models/errors/clearingsimulationvalidationerror.rbi +15 -0
  51. data/lib/moov/models/errors/createinvoiceerror.rb +10 -2
  52. data/lib/moov/models/errors/createinvoiceerror.rbi +4 -0
  53. data/lib/moov/models/errors/invoicenotificationerror.rb +36 -0
  54. data/lib/moov/models/errors/invoicenotificationerror.rbi +15 -0
  55. data/lib/moov/models/errors/invoicenotificationratelimitederror.rb +44 -0
  56. data/lib/moov/models/errors/invoicenotificationratelimitederror.rbi +19 -0
  57. data/lib/moov/models/errors/updateinvoiceerror.rb +6 -2
  58. data/lib/moov/models/errors/updateinvoiceerror.rbi +2 -0
  59. data/lib/moov/models/errors.rb +4 -0
  60. data/lib/moov/models/operations/createauthorizationsimulation_request.rb +36 -0
  61. data/lib/moov/models/operations/createauthorizationsimulation_request.rbi +15 -0
  62. data/lib/moov/models/operations/createauthorizationsimulation_response.rb +52 -0
  63. data/lib/moov/models/operations/createauthorizationsimulation_response.rbi +23 -0
  64. data/lib/moov/models/operations/createclearingsimulation_request.rb +40 -0
  65. data/lib/moov/models/operations/createclearingsimulation_request.rbi +17 -0
  66. data/lib/moov/models/operations/createclearingsimulation_response.rb +52 -0
  67. data/lib/moov/models/operations/createclearingsimulation_response.rbi +23 -0
  68. data/lib/moov/models/operations/createinvoicenotification_request.rb +40 -0
  69. data/lib/moov/models/operations/createinvoicenotification_request.rbi +17 -0
  70. data/lib/moov/models/operations/{createcancellation_response.rb → createinvoicenotification_response.rb} +3 -7
  71. data/lib/moov/models/operations/{createcancellation_response.rbi → createinvoicenotification_response.rbi} +2 -4
  72. data/lib/moov/models/operations/createreversalsimulation_request.rb +36 -0
  73. data/lib/moov/models/operations/createreversalsimulation_request.rbi +15 -0
  74. data/lib/moov/models/operations/createreversalsimulation_response.rb +52 -0
  75. data/lib/moov/models/operations/createreversalsimulation_response.rbi +23 -0
  76. data/lib/moov/models/operations/createtransfer_response.rb +5 -5
  77. data/lib/moov/models/operations/createtransfer_response.rbi +2 -2
  78. data/lib/moov/models/operations/getissuedcardactivity_request.rb +36 -0
  79. data/lib/moov/models/operations/getissuedcardactivity_request.rbi +15 -0
  80. data/lib/moov/models/operations/getissuedcardactivity_response.rb +48 -0
  81. data/lib/moov/models/operations/getissuedcardactivity_response.rbi +21 -0
  82. data/lib/moov/models/operations/initiaterefund_request.rb +1 -1
  83. data/lib/moov/models/operations.rb +10 -2
  84. data/lib/moov/sdkconfiguration.rb +3 -3
  85. data/lib/moov/transfers.rb +3 -156
  86. metadata +56 -8
  87. data/lib/moov/models/operations/createcancellation_request.rb +0 -40
  88. data/lib/moov/models/operations/createcancellation_request.rbi +0 -17
data/lib/moov/invoices.rb CHANGED
@@ -766,6 +766,186 @@ module Moov
766
766
  end
767
767
 
768
768
 
769
+ sig { params(create_invoice_notification: Models::Components::CreateInvoiceNotification, account_id: ::String, invoice_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::CreateInvoiceNotificationResponse) }
770
+ def create_invoice_notification(create_invoice_notification:, account_id:, invoice_id:, timeout_ms: nil, http_headers: nil)
771
+ # create_invoice_notification - Create a notification for an invoice, which resends the invoice email to the customer. The required
772
+ # `channels` body lists the channels to notify on; today only `email` is supported. Returns a 409
773
+ # if the invoice is not in `unpaid` or `overdue` status, or if the merchant or customer account has no
774
+ # email set.
775
+ #
776
+ # The request is all-or-nothing: if any requested channel is rate limited, nothing is sent. Each channel
777
+ # can be sent at most once every 24 hours, and not within 24 hours of the invoice being sent. A 429
778
+ # response lists the limited channels with `availableOn` and lists the `availableChannels` that can be
779
+ # sent in a new request.
780
+ #
781
+ # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
782
+ # you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
783
+ request = Models::Operations::CreateInvoiceNotificationRequest.new(
784
+ account_id: account_id,
785
+ invoice_id: invoice_id,
786
+ create_invoice_notification: create_invoice_notification
787
+ )
788
+ url, params = @sdk_configuration.get_server_details
789
+ base_url = Utils.template_url(url, params)
790
+ url = Utils.generate_url(
791
+ Models::Operations::CreateInvoiceNotificationRequest,
792
+ base_url,
793
+ '/accounts/{accountID}/invoices/{invoiceID}/notifications',
794
+ request
795
+ )
796
+ headers = {}
797
+ headers = T.cast(headers, T::Hash[String, String])
798
+ req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_invoice_notification, :json)
799
+ headers['content-type'] = req_content_type
800
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
801
+
802
+ if form && !form.empty?
803
+ body = Utils.encode_form(form)
804
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
805
+ body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
806
+ else
807
+ body = data
808
+ end
809
+ headers['Accept'] = 'application/json'
810
+ headers['user-agent'] = @sdk_configuration.user_agent
811
+
812
+ security = @sdk_configuration.security_source&.call
813
+
814
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
815
+ timeout ||= @sdk_configuration.timeout
816
+
817
+
818
+ connection = @sdk_configuration.client
819
+
820
+ hook_ctx = SDKHooks::HookContext.new(
821
+ config: @sdk_configuration,
822
+ base_url: base_url,
823
+ oauth2_scopes: nil,
824
+ operation_id: 'createInvoiceNotification',
825
+ security_source: @sdk_configuration.security_source
826
+ )
827
+
828
+ error = T.let(nil, T.nilable(StandardError))
829
+ http_response = T.let(nil, T.nilable(Faraday::Response))
830
+
831
+
832
+ begin
833
+ http_response = T.must(connection).post(url) do |req|
834
+ req.body = body
835
+ req.headers.merge!(headers)
836
+ req.options.timeout = timeout unless timeout.nil?
837
+ Utils.configure_request_security(req, security)
838
+ http_headers&.each do |key, value|
839
+ req.headers[key.to_s] = value
840
+ end
841
+
842
+ @sdk_configuration.hooks.before_request(
843
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
844
+ hook_ctx: hook_ctx
845
+ ),
846
+ request: req
847
+ )
848
+ end
849
+ rescue StandardError => e
850
+ error = e
851
+ ensure
852
+ if http_response.nil? || Utils.error_status?(http_response.status)
853
+ http_response = @sdk_configuration.hooks.after_error(
854
+ error: error,
855
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
856
+ hook_ctx: hook_ctx
857
+ ),
858
+ response: http_response
859
+ )
860
+ else
861
+ http_response = @sdk_configuration.hooks.after_success(
862
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
863
+ hook_ctx: hook_ctx
864
+ ),
865
+ response: http_response
866
+ )
867
+ end
868
+
869
+ if http_response.nil?
870
+ raise error if !error.nil?
871
+ raise 'no response'
872
+ end
873
+ end
874
+
875
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
876
+ if Utils.match_status_code(http_response.status, ['204'])
877
+ http_response = @sdk_configuration.hooks.after_success(
878
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
879
+ hook_ctx: hook_ctx
880
+ ),
881
+ response: http_response
882
+ )
883
+ return Models::Operations::CreateInvoiceNotificationResponse.new(
884
+ status_code: http_response.status,
885
+ content_type: content_type,
886
+ raw_response: http_response,
887
+ headers: {}
888
+ )
889
+ elsif Utils.match_status_code(http_response.status, ['401', '403', '404'])
890
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
891
+ elsif Utils.match_status_code(http_response.status, ['400', '409'])
892
+ if Utils.match_content_type(content_type, 'application/json')
893
+ http_response = @sdk_configuration.hooks.after_success(
894
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
895
+ hook_ctx: hook_ctx
896
+ ),
897
+ response: http_response
898
+ )
899
+ response_data = http_response.env.response_body
900
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
901
+ obj.raw_response = http_response
902
+ raise obj
903
+ else
904
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
905
+ end
906
+ elsif Utils.match_status_code(http_response.status, ['422'])
907
+ if Utils.match_content_type(content_type, 'application/json')
908
+ http_response = @sdk_configuration.hooks.after_success(
909
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
910
+ hook_ctx: hook_ctx
911
+ ),
912
+ response: http_response
913
+ )
914
+ response_data = http_response.env.response_body
915
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InvoiceNotificationError)
916
+ obj.raw_response = http_response
917
+ raise obj
918
+ else
919
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
920
+ end
921
+ elsif Utils.match_status_code(http_response.status, ['429'])
922
+ if Utils.match_content_type(content_type, 'application/json')
923
+ http_response = @sdk_configuration.hooks.after_success(
924
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
925
+ hook_ctx: hook_ctx
926
+ ),
927
+ response: http_response
928
+ )
929
+ response_data = http_response.env.response_body
930
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InvoiceNotificationRateLimitedError)
931
+ obj.raw_response = http_response
932
+ raise obj
933
+ else
934
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
935
+ end
936
+ elsif Utils.match_status_code(http_response.status, ['500', '504'])
937
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
938
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
939
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
940
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
941
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
942
+ else
943
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
944
+
945
+ end
946
+ end
947
+
948
+
769
949
  sig { params(create_invoice_payment: Models::Components::CreateInvoicePayment, account_id: ::String, invoice_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::CreateInvoicePaymentResponse) }
770
950
  def create_invoice_payment(create_invoice_payment:, account_id:, invoice_id:, timeout_ms: nil, http_headers: nil)
771
951
  # create_invoice_payment - Creates a payment resource to represent that an invoice was paid outside of the Moov platform.
@@ -164,6 +164,129 @@ module Moov
164
164
  end
165
165
 
166
166
 
167
+ sig { params(account_id: ::String, id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetIssuedCardActivityResponse) }
168
+ def get_activity(account_id:, id:, timeout_ms: nil, http_headers: nil)
169
+ # get_activity - Retrieve a single issued card activity associated with a Moov account.
170
+ #
171
+ # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
172
+ # you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
173
+ request = Models::Operations::GetIssuedCardActivityRequest.new(
174
+ account_id: account_id,
175
+ id: id
176
+ )
177
+ url, params = @sdk_configuration.get_server_details
178
+ base_url = Utils.template_url(url, params)
179
+ url = Utils.generate_url(
180
+ Models::Operations::GetIssuedCardActivityRequest,
181
+ base_url,
182
+ '/issuing/{accountID}/activity/{id}',
183
+ request
184
+ )
185
+ headers = {}
186
+ headers = T.cast(headers, T::Hash[String, String])
187
+ headers['Accept'] = 'application/json'
188
+ headers['user-agent'] = @sdk_configuration.user_agent
189
+
190
+ security = @sdk_configuration.security_source&.call
191
+
192
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
193
+ timeout ||= @sdk_configuration.timeout
194
+
195
+
196
+ connection = @sdk_configuration.client
197
+
198
+ hook_ctx = SDKHooks::HookContext.new(
199
+ config: @sdk_configuration,
200
+ base_url: base_url,
201
+ oauth2_scopes: nil,
202
+ operation_id: 'getIssuedCardActivity',
203
+ security_source: @sdk_configuration.security_source
204
+ )
205
+
206
+ error = T.let(nil, T.nilable(StandardError))
207
+ http_response = T.let(nil, T.nilable(Faraday::Response))
208
+
209
+
210
+ begin
211
+ http_response = T.must(connection).get(url) do |req|
212
+ req.headers.merge!(headers)
213
+ req.options.timeout = timeout unless timeout.nil?
214
+ Utils.configure_request_security(req, security)
215
+ http_headers&.each do |key, value|
216
+ req.headers[key.to_s] = value
217
+ end
218
+
219
+ @sdk_configuration.hooks.before_request(
220
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
221
+ hook_ctx: hook_ctx
222
+ ),
223
+ request: req
224
+ )
225
+ end
226
+ rescue StandardError => e
227
+ error = e
228
+ ensure
229
+ if http_response.nil? || Utils.error_status?(http_response.status)
230
+ http_response = @sdk_configuration.hooks.after_error(
231
+ error: error,
232
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
233
+ hook_ctx: hook_ctx
234
+ ),
235
+ response: http_response
236
+ )
237
+ else
238
+ http_response = @sdk_configuration.hooks.after_success(
239
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
240
+ hook_ctx: hook_ctx
241
+ ),
242
+ response: http_response
243
+ )
244
+ end
245
+
246
+ if http_response.nil?
247
+ raise error if !error.nil?
248
+ raise 'no response'
249
+ end
250
+ end
251
+
252
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
253
+ if Utils.match_status_code(http_response.status, ['200'])
254
+ if Utils.match_content_type(content_type, 'application/json')
255
+ http_response = @sdk_configuration.hooks.after_success(
256
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
257
+ hook_ctx: hook_ctx
258
+ ),
259
+ response: http_response
260
+ )
261
+ response_data = http_response.env.response_body
262
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::IssuedCardActivity)
263
+ response = Models::Operations::GetIssuedCardActivityResponse.new(
264
+ status_code: http_response.status,
265
+ content_type: content_type,
266
+ raw_response: http_response,
267
+ headers: http_response.headers,
268
+ issued_card_activity: T.unsafe(obj)
269
+ )
270
+
271
+ return response
272
+ else
273
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
274
+ end
275
+ elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
276
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
277
+ elsif Utils.match_status_code(http_response.status, ['500', '504'])
278
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
279
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
280
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
281
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
282
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
283
+ else
284
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
285
+
286
+ end
287
+ end
288
+
289
+
167
290
  sig { params(request: Models::Operations::ListIssuedCardAuthorizationsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListIssuedCardAuthorizationsResponse) }
168
291
  def list_authorizations(request:, timeout_ms: nil, http_headers: nil)
169
292
  # list_authorizations - List issued card authorizations associated with a Moov account.
@@ -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 AuthorizationSimulationAsyncResponse
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+
16
+ field :authorization_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('authorizationID'), required: true } }
17
+
18
+ sig { params(authorization_id: ::String).void }
19
+ def initialize(authorization_id:)
20
+ @authorization_id = authorization_id
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 @authorization_id == other.authorization_id
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::AuthorizationSimulationAsyncResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::AuthorizationSimulationAsyncResponse
11
+ def authorization_id(); end
12
+ def authorization_id=(str_); end
13
+ end
@@ -11,6 +11,7 @@ module Moov
11
11
  class CaptureStatus
12
12
  include ::Crystalline::Enum
13
13
  enums do
14
+ CREATED = new('created')
14
15
  PENDING = new('pending')
15
16
  COMPLETED = new('completed')
16
17
  FAILED = new('failed')
@@ -0,0 +1,40 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Moov
8
+ module Models
9
+ module Components
10
+
11
+ class CreateAuthorizationSimulation
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+
16
+ field :issued_card_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuedCardID'), required: true } }
17
+ # A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99.
18
+ field :amount, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
19
+
20
+ field :merchant_data, Crystalline::Nilable.new(Models::Components::SimulationIssuingMerchantData), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('merchantData') } }
21
+
22
+ sig { params(issued_card_id: ::String, amount: ::String, merchant_data: T.nilable(Models::Components::SimulationIssuingMerchantData)).void }
23
+ def initialize(issued_card_id:, amount:, merchant_data: nil)
24
+ @issued_card_id = issued_card_id
25
+ @amount = amount
26
+ @merchant_data = merchant_data
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 @issued_card_id == other.issued_card_id
33
+ return false unless @amount == other.amount
34
+ return false unless @merchant_data == other.merchant_data
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::CreateAuthorizationSimulation
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreateAuthorizationSimulation
11
+ def issued_card_id(); end
12
+ def issued_card_id=(str_); end
13
+ def amount(); end
14
+ def amount=(str_); end
15
+ def merchant_data(); end
16
+ def merchant_data=(str_); end
17
+ end
@@ -7,17 +7,15 @@
7
7
  module Moov
8
8
  module Models
9
9
  module Components
10
- # Cancellation request.
11
- class CreateCancellation
10
+
11
+ class CreateClearingSimulation
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
15
- # Amount to void. This field can only be set for an auth-capture `card-payment` transfer.
16
- # This cannot exceed `capturableAmount`.
17
- # Omit this field to void the entire `capturableAmount`.
18
- field :amount, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
15
+ # A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99.
16
+ field :amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
19
17
 
20
- sig { params(amount: T.nilable(Models::Components::AmountDecimal)).void }
18
+ sig { params(amount: T.nilable(::String)).void }
21
19
  def initialize(amount: nil)
22
20
  @amount = amount
23
21
  end
@@ -2,12 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
 
5
- class Moov::Models::Components::CreateCancellation
5
+ class Moov::Models::Components::CreateClearingSimulation
6
6
  extend ::Crystalline::MetadataFields::ClassMethods
7
7
  end
8
8
 
9
9
 
10
- class Moov::Models::Components::CreateCancellation
10
+ class Moov::Models::Components::CreateClearingSimulation
11
11
  def amount(); end
12
12
  def amount=(str_); end
13
13
  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
@@ -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,23 +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
-
22
- sig { params(payment_method_id: ::String, card_details: T.nilable(Models::Components::CreateTransferDestinationCard), ach_details: T.nilable(Models::Components::CreateTransferDestinationACH)).void }
23
- def initialize(payment_method_id:, card_details: nil, ach_details: nil)
18
+ sig { params(payment_method_id: ::String).void }
19
+ def initialize(payment_method_id:)
24
20
  @payment_method_id = payment_method_id
25
- @card_details = card_details
26
- @ach_details = ach_details
27
21
  end
28
22
 
29
23
  sig { params(other: T.untyped).returns(T::Boolean) }
30
24
  def ==(other)
31
25
  return false unless other.is_a? self.class
32
26
  return false unless @payment_method_id == other.payment_method_id
33
- return false unless @card_details == other.card_details
34
- return false unless @ach_details == other.ach_details
35
27
  true
36
28
  end
37
29
  end