moov_ruby 26.4.6 → 26.7.0.pre.dev.0

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moov/cards.rb +158 -0
  3. data/lib/moov/models/components/amountdecimalrange.rb +36 -0
  4. data/lib/moov/models/components/amountdecimalrange.rbi +15 -0
  5. data/lib/moov/models/components/amountdecimalrangeupdate.rb +36 -0
  6. data/lib/moov/models/components/amountdecimalrangeupdate.rbi +15 -0
  7. data/lib/moov/models/components/cardmetadata.rb +79 -0
  8. data/lib/moov/models/components/cardmetadata.rbi +35 -0
  9. data/lib/moov/models/components/cardmetadatarequest.rb +38 -0
  10. data/lib/moov/models/components/cardmetadatarequest.rbi +15 -0
  11. data/lib/moov/models/components/createdtransfer.rb +2 -6
  12. data/lib/moov/models/components/createdtransfer.rbi +0 -2
  13. data/lib/moov/models/components/createpaymentlink.rb +11 -11
  14. data/lib/moov/models/components/createpaymentlink.rbi +4 -4
  15. data/lib/moov/models/components/createpaymentlinkamountdetails.rb +32 -0
  16. data/lib/moov/models/components/createpaymentlinkamountdetails.rbi +13 -0
  17. data/lib/moov/models/components/createpaymentlinkamountdetailsvalidationerror.rb +32 -0
  18. data/lib/moov/models/components/createpaymentlinkamountdetailsvalidationerror.rbi +13 -0
  19. data/lib/moov/models/components/createtransfer.rb +2 -6
  20. data/lib/moov/models/components/createtransfer.rbi +0 -2
  21. data/lib/moov/models/components/createtransferamountdetails.rb +6 -2
  22. data/lib/moov/models/components/createtransferamountdetails.rbi +2 -0
  23. data/lib/moov/models/components/createtransferamountdetailsvalidationerror.rb +6 -2
  24. data/lib/moov/models/components/createtransferamountdetailsvalidationerror.rbi +2 -0
  25. data/lib/moov/models/components/paymentlink.rb +15 -15
  26. data/lib/moov/models/components/paymentlink.rbi +4 -4
  27. data/lib/moov/models/components/paymentlinkamountdetails.rb +32 -0
  28. data/lib/moov/models/components/paymentlinkamountdetails.rbi +13 -0
  29. data/lib/moov/models/components/paymentlinkpaymentdetails.rb +14 -2
  30. data/lib/moov/models/components/paymentlinkpaymentdetails.rbi +6 -0
  31. data/lib/moov/models/components/paymentlinkpaymentdetails_amounttype.rb +19 -0
  32. data/lib/moov/models/components/paymentlinkpaymentdetails_amounttype.rbi +11 -0
  33. data/lib/moov/models/components/paymentlinkpaymentdetailsupdate.rb +14 -2
  34. data/lib/moov/models/components/paymentlinkpaymentdetailsupdate.rbi +6 -0
  35. data/lib/moov/models/components/paymentlinkpaymentdetailsupdate_amounttype.rb +19 -0
  36. data/lib/moov/models/components/paymentlinkpaymentdetailsupdate_amounttype.rbi +11 -0
  37. data/lib/moov/models/components/transfer.rb +2 -6
  38. data/lib/moov/models/components/transfer.rbi +0 -2
  39. data/lib/moov/models/components/transferamountdetails.rb +6 -2
  40. data/lib/moov/models/components/transferamountdetails.rbi +2 -0
  41. data/lib/moov/models/components/transferdestination.rb +2 -8
  42. data/lib/moov/models/components/transferdestination.rbi +0 -2
  43. data/lib/moov/models/components/updatepaymentlink.rb +6 -6
  44. data/lib/moov/models/components/updatepaymentlink.rbi +2 -2
  45. data/lib/moov/models/components/updatepaymentlinkamountdetails.rb +32 -0
  46. data/lib/moov/models/components/updatepaymentlinkamountdetails.rbi +13 -0
  47. data/lib/moov/models/components/updatepaymentlinkamountdetailsvalidationerror.rb +32 -0
  48. data/lib/moov/models/components/updatepaymentlinkamountdetailsvalidationerror.rbi +13 -0
  49. data/lib/moov/models/components/webhookdatabankaccountdeleted.rb +2 -6
  50. data/lib/moov/models/components/webhookdatabankaccountdeleted.rbi +0 -2
  51. data/lib/moov/models/components.rb +11 -3
  52. data/lib/moov/models/errors/cardmetadatarequesterror.rb +44 -0
  53. data/lib/moov/models/errors/cardmetadatarequesterror.rbi +19 -0
  54. data/lib/moov/models/errors/createpaymentlinkerror.rb +6 -6
  55. data/lib/moov/models/errors/createpaymentlinkerror.rbi +2 -2
  56. data/lib/moov/models/errors/transfer_error.rb +2 -6
  57. data/lib/moov/models/errors/transfer_error.rbi +0 -2
  58. data/lib/moov/models/errors/transfervalidationerror.rb +2 -6
  59. data/lib/moov/models/errors/transfervalidationerror.rbi +0 -2
  60. data/lib/moov/models/errors/updatepaymentlinkerror.rb +6 -6
  61. data/lib/moov/models/errors/updatepaymentlinkerror.rbi +2 -2
  62. data/lib/moov/models/errors.rb +1 -0
  63. data/lib/moov/models/operations/getcardmetadata_response.rb +48 -0
  64. data/lib/moov/models/operations/getcardmetadata_response.rbi +21 -0
  65. data/lib/moov/models/operations.rb +1 -0
  66. data/lib/moov/sdkconfiguration.rb +3 -3
  67. metadata +29 -9
  68. data/lib/moov/models/components/rtpfailurecode.rb +0 -27
  69. data/lib/moov/models/components/rtpfailurecode.rbi +0 -11
  70. data/lib/moov/models/components/rtptransactiondetails.rb +0 -58
  71. data/lib/moov/models/components/rtptransactiondetails.rbi +0 -25
  72. data/lib/moov/models/components/rtptransactionstatus.rb +0 -21
  73. data/lib/moov/models/components/rtptransactionstatus.rbi +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1a719063bd2b237c17963cd2cf343037ba026e889db67138add2d4c460294fb
4
- data.tar.gz: e94bc4f53eceb6216d7a9d91aab3ac5606e175945faaa9e04e4171987b6b685b
3
+ metadata.gz: df138c1c80fb9cfc6a98d215e8ac3c8f5057a4afa79fcb0428d0e0df9212151d
4
+ data.tar.gz: cc146dc34e5d9d14b468dbe2ef8098685911d82d06aa8a75a087d1e0c3b9b332
5
5
  SHA512:
6
- metadata.gz: 748554c277ed80a3dde39e88f5a2d339407c45ea41d8c7549c3c273e1069b691bbc7e6ae5a89f21e9473c203fb9b0e8e15a62a20ef07e5d88f8011754ced3bdc
7
- data.tar.gz: 1de6fcc087cca0ebb8a36f0580ad8b754c544dbd10517b1dcb41f0a60bdb5e27751996b6bec8b060824612eb084bfc2f17cd793181dcb59a793c6a2ca2bd097b
6
+ metadata.gz: d4f94f4f8fa0813206bd66e23885d2334de8222819863a3efc34dbee90f2e3d1dc29607e29ae1cd7ea2255607655ad5d00b9a57a1cbd2cd30204d08f3912e772
7
+ data.tar.gz: c05db1ad16db61462be7a198224d8d2927b8e295380a1a4d2d3f087c72f6d220082a8e1672b49d357ac9182ee5932a72a3497f4910a7729588484e3dc0c3da1a
data/lib/moov/cards.rb CHANGED
@@ -787,5 +787,163 @@ module Moov
787
787
 
788
788
  end
789
789
  end
790
+
791
+
792
+ sig { params(request: Models::Components::CardMetadataRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetCardMetadataResponse) }
793
+ def get_metadata(request:, timeout_ms: nil, http_headers: nil)
794
+ # get_metadata - Look up metadata for a card without linking it to a Moov account.
795
+ #
796
+ # Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
797
+ #
798
+ # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
799
+ # you'll need to specify the `/card-metadata.read` scope.
800
+ url, params = @sdk_configuration.get_server_details
801
+ base_url = Utils.template_url(url, params)
802
+ url = "#{base_url}/card-metadata"
803
+ headers = {}
804
+ headers = T.cast(headers, T::Hash[String, String])
805
+ req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json)
806
+ headers['content-type'] = req_content_type
807
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
808
+
809
+ if form && !form.empty?
810
+ body = Utils.encode_form(form)
811
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
812
+ body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
813
+ else
814
+ body = data
815
+ end
816
+ headers['Accept'] = 'application/json'
817
+ headers['user-agent'] = @sdk_configuration.user_agent
818
+
819
+ security = @sdk_configuration.security_source&.call
820
+
821
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
822
+ timeout ||= @sdk_configuration.timeout
823
+
824
+
825
+ connection = @sdk_configuration.client
826
+
827
+ hook_ctx = SDKHooks::HookContext.new(
828
+ config: @sdk_configuration,
829
+ base_url: base_url,
830
+ oauth2_scopes: nil,
831
+ operation_id: 'getCardMetadata',
832
+ security_source: @sdk_configuration.security_source
833
+ )
834
+
835
+ error = T.let(nil, T.nilable(StandardError))
836
+ http_response = T.let(nil, T.nilable(Faraday::Response))
837
+
838
+
839
+ begin
840
+ http_response = T.must(connection).post(url) do |req|
841
+ req.body = body
842
+ req.headers.merge!(headers)
843
+ req.options.timeout = timeout unless timeout.nil?
844
+ Utils.configure_request_security(req, security)
845
+ http_headers&.each do |key, value|
846
+ req.headers[key.to_s] = value
847
+ end
848
+
849
+ @sdk_configuration.hooks.before_request(
850
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
851
+ hook_ctx: hook_ctx
852
+ ),
853
+ request: req
854
+ )
855
+ end
856
+ rescue StandardError => e
857
+ error = e
858
+ ensure
859
+ if http_response.nil? || Utils.error_status?(http_response.status)
860
+ http_response = @sdk_configuration.hooks.after_error(
861
+ error: error,
862
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
863
+ hook_ctx: hook_ctx
864
+ ),
865
+ response: http_response
866
+ )
867
+ else
868
+ http_response = @sdk_configuration.hooks.after_success(
869
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
870
+ hook_ctx: hook_ctx
871
+ ),
872
+ response: http_response
873
+ )
874
+ end
875
+
876
+ if http_response.nil?
877
+ raise error if !error.nil?
878
+ raise 'no response'
879
+ end
880
+ end
881
+
882
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
883
+ if Utils.match_status_code(http_response.status, ['200'])
884
+ if Utils.match_content_type(content_type, 'application/json')
885
+ http_response = @sdk_configuration.hooks.after_success(
886
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
887
+ hook_ctx: hook_ctx
888
+ ),
889
+ response: http_response
890
+ )
891
+ response_data = http_response.env.response_body
892
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::CardMetadata)
893
+ response = Models::Operations::GetCardMetadataResponse.new(
894
+ status_code: http_response.status,
895
+ content_type: content_type,
896
+ raw_response: http_response,
897
+ headers: http_response.headers,
898
+ card_metadata: T.unsafe(obj)
899
+ )
900
+
901
+ return response
902
+ else
903
+ 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'
904
+ end
905
+ elsif Utils.match_status_code(http_response.status, ['400', '409'])
906
+ if Utils.match_content_type(content_type, 'application/json')
907
+ http_response = @sdk_configuration.hooks.after_success(
908
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
909
+ hook_ctx: hook_ctx
910
+ ),
911
+ response: http_response
912
+ )
913
+ response_data = http_response.env.response_body
914
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
915
+ obj.raw_response = http_response
916
+ raise obj
917
+ else
918
+ 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'
919
+ end
920
+ elsif Utils.match_status_code(http_response.status, ['422'])
921
+ if Utils.match_content_type(content_type, 'application/json')
922
+ http_response = @sdk_configuration.hooks.after_success(
923
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
924
+ hook_ctx: hook_ctx
925
+ ),
926
+ response: http_response
927
+ )
928
+ response_data = http_response.env.response_body
929
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::CardMetadataRequestError)
930
+ obj.raw_response = http_response
931
+ raise obj
932
+ else
933
+ 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'
934
+ end
935
+ elsif Utils.match_status_code(http_response.status, ['401', '403', '404', '429'])
936
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
937
+ elsif Utils.match_status_code(http_response.status, ['500', '504'])
938
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
939
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
940
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
941
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
942
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
943
+ else
944
+ 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'
945
+
946
+ end
947
+ end
790
948
  end
791
949
  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 AmountDecimalRange
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # Minimum amount allowed in the range
16
+ field :minimum, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('minimum'), required: true } }
17
+ # Maximum amount allowed in the range
18
+ field :maximum, Models::Components::AmountDecimal, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('maximum'), required: true } }
19
+
20
+ sig { params(minimum: Models::Components::AmountDecimal, maximum: Models::Components::AmountDecimal).void }
21
+ def initialize(minimum:, maximum:)
22
+ @minimum = minimum
23
+ @maximum = maximum
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 @minimum == other.minimum
30
+ return false unless @maximum == other.maximum
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::AmountDecimalRange
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::AmountDecimalRange
11
+ def minimum(); end
12
+ def minimum=(str_); end
13
+ def maximum(); end
14
+ def maximum=(str_); end
15
+ 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 AmountDecimalRangeUpdate
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # Minimum amount allowed in the range
16
+ field :minimum, Crystalline::Nilable.new(Models::Components::AmountDecimalUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('minimum') } }
17
+ # Maximum amount allowed in the range
18
+ field :maximum, Crystalline::Nilable.new(Models::Components::AmountDecimalUpdate), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('maximum') } }
19
+
20
+ sig { params(minimum: T.nilable(Models::Components::AmountDecimalUpdate), maximum: T.nilable(Models::Components::AmountDecimalUpdate)).void }
21
+ def initialize(minimum: nil, maximum: nil)
22
+ @minimum = minimum
23
+ @maximum = maximum
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 @minimum == other.minimum
30
+ return false unless @maximum == other.maximum
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::AmountDecimalRangeUpdate
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::AmountDecimalRangeUpdate
11
+ def minimum(); end
12
+ def minimum=(str_); end
13
+ def maximum(); end
14
+ def maximum=(str_); end
15
+ end
@@ -0,0 +1,79 @@
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
+ # Metadata describing a card.
11
+ class CardMetadata
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # The first six to eight digits of the card number, which identifies the financial institution that issued the card.
16
+ field :bin, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('bin'), required: true } }
17
+ # The card brand.
18
+ field :brand, Models::Components::CardBrand, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('brand'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CardBrand, false) } }
19
+ # The type of the card.
20
+ field :card_type, Models::Components::CardType, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardType'), required: true, 'decoder': ::Moov::Utils.enum_from_string(Models::Components::CardType, false) } }
21
+ # The category or level of the card defined by the issuer.
22
+ # Examples include, but not limited to, "REWARDS", "TRADITIONAL REWARDS", "CLASSIC", and "CORPORATE PURCHASING".
23
+ field :card_category, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardCategory') } }
24
+ # If true, the card is for commercial use, or associated with a business.
25
+ # If false, the card is associated with a general consumer.
26
+ field :commercial, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('commercial') } }
27
+ # If true, the card issuing bank is regulated, and the scheme fees for debit transactions will be limited based on the Durbin Amendment.
28
+ # If false, the card issuing bank is not regulated, and the scheme fees will not be limited.
29
+ field :regulated, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('regulated') } }
30
+ # Financial institution that issued the card.
31
+ field :issuer, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuer') } }
32
+ # Country where the card was issued.
33
+ field :issuer_country, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuerCountry') } }
34
+ # Phone number of the issuer.
35
+ field :issuer_phone, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuerPhone') } }
36
+ # URL of the issuer.
37
+ field :issuer_url, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('issuerURL') } }
38
+ # Indicates if the card supports domestic pull-from-card transfer.
39
+ field :domestic_pull_from_card, Crystalline::Nilable.new(Models::Components::DomesticPullFromCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('domesticPullFromCard'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::DomesticPullFromCard, true) } }
40
+ # Indicates which level of domestic push-to-card transfer is supported by the card, if any.
41
+ field :domestic_push_to_card, Crystalline::Nilable.new(Models::Components::DomesticPushToCard), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('domesticPushToCard'), 'decoder': ::Moov::Utils.enum_from_string(Models::Components::DomesticPushToCard, true) } }
42
+
43
+ sig { params(bin: ::String, brand: Models::Components::CardBrand, card_type: Models::Components::CardType, card_category: T.nilable(::String), commercial: T.nilable(T::Boolean), regulated: T.nilable(T::Boolean), issuer: T.nilable(::String), issuer_country: T.nilable(::String), issuer_phone: T.nilable(::String), issuer_url: T.nilable(::String), domestic_pull_from_card: T.nilable(Models::Components::DomesticPullFromCard), domestic_push_to_card: T.nilable(Models::Components::DomesticPushToCard)).void }
44
+ def initialize(bin:, brand:, card_type:, card_category: nil, commercial: nil, regulated: nil, issuer: nil, issuer_country: nil, issuer_phone: nil, issuer_url: nil, domestic_pull_from_card: nil, domestic_push_to_card: nil)
45
+ @bin = bin
46
+ @brand = brand
47
+ @card_type = card_type
48
+ @card_category = card_category
49
+ @commercial = commercial
50
+ @regulated = regulated
51
+ @issuer = issuer
52
+ @issuer_country = issuer_country
53
+ @issuer_phone = issuer_phone
54
+ @issuer_url = issuer_url
55
+ @domestic_pull_from_card = domestic_pull_from_card
56
+ @domestic_push_to_card = domestic_push_to_card
57
+ end
58
+
59
+ sig { params(other: T.untyped).returns(T::Boolean) }
60
+ def ==(other)
61
+ return false unless other.is_a? self.class
62
+ return false unless @bin == other.bin
63
+ return false unless @brand == other.brand
64
+ return false unless @card_type == other.card_type
65
+ return false unless @card_category == other.card_category
66
+ return false unless @commercial == other.commercial
67
+ return false unless @regulated == other.regulated
68
+ return false unless @issuer == other.issuer
69
+ return false unless @issuer_country == other.issuer_country
70
+ return false unless @issuer_phone == other.issuer_phone
71
+ return false unless @issuer_url == other.issuer_url
72
+ return false unless @domestic_pull_from_card == other.domestic_pull_from_card
73
+ return false unless @domestic_push_to_card == other.domestic_push_to_card
74
+ true
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,35 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CardMetadata
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CardMetadata
11
+ def bin(); end
12
+ def bin=(str_); end
13
+ def brand(); end
14
+ def brand=(str_); end
15
+ def card_type(); end
16
+ def card_type=(str_); end
17
+ def card_category(); end
18
+ def card_category=(str_); end
19
+ def commercial(); end
20
+ def commercial=(str_); end
21
+ def regulated(); end
22
+ def regulated=(str_); end
23
+ def issuer(); end
24
+ def issuer=(str_); end
25
+ def issuer_country(); end
26
+ def issuer_country=(str_); end
27
+ def issuer_phone(); end
28
+ def issuer_phone=(str_); end
29
+ def issuer_url(); end
30
+ def issuer_url=(str_); end
31
+ def domestic_pull_from_card(); end
32
+ def domestic_pull_from_card=(str_); end
33
+ def domestic_push_to_card(); end
34
+ def domestic_push_to_card=(str_); end
35
+ end
@@ -0,0 +1,38 @@
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 CardMetadataRequest
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # Wraps a compact-serialized JSON Web Encryption (JWE) token used for secure transmission of sensitive data (e.g., PCI information) through intermediaries.
16
+ # This token is encrypted using the public key from /end-to-end-keys and wraps an AES key. For details and examples, refer to our
17
+ # [GitHub repository](https://github.com/moovfinancial/moov-go/blob/main/examples/e2ee/e2ee_test.go).
18
+ field :e2ee, Crystalline::Nilable.new(Models::Components::E2EEToken), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('e2ee') } }
19
+ # The full card number (PAN).
20
+ field :card_number, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('cardNumber') } }
21
+
22
+ sig { params(e2ee: T.nilable(Models::Components::E2EEToken), card_number: T.nilable(::String)).void }
23
+ def initialize(e2ee: nil, card_number: nil)
24
+ @e2ee = e2ee
25
+ @card_number = card_number
26
+ end
27
+
28
+ sig { params(other: T.untyped).returns(T::Boolean) }
29
+ def ==(other)
30
+ return false unless other.is_a? self.class
31
+ return false unless @e2ee == other.e2ee
32
+ return false unless @card_number == other.card_number
33
+ true
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,15 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Moov::Models::Components::CardMetadataRequest
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CardMetadataRequest
11
+ def e2ee(); end
12
+ def e2ee=(str_); end
13
+ def card_number(); end
14
+ def card_number=(str_); end
15
+ end
@@ -60,8 +60,6 @@ module Moov
60
60
  field :occurrence_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('occurrenceID') } }
61
61
 
62
62
  field :payment_link_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('paymentLinkCode') } }
63
- # Optional sales tax amount.
64
- field :sales_tax_amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('salesTaxAmount') } }
65
63
  # Optional alias from a foreign/external system which can be used to reference this resource.
66
64
  field :foreign_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('foreignID') } }
67
65
  # An optional collection of line items for a transfer.
@@ -70,8 +68,8 @@ module Moov
70
68
 
71
69
  field :amount_details, Crystalline::Nilable.new(Models::Components::TransferAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
72
70
 
73
- sig { params(transfer_id: ::String, created_on: ::DateTime, source: T.nilable(Models::Components::TransferSource), destination: T.nilable(Models::Components::TransferDestination), completed_on: T.nilable(::DateTime), status: T.nilable(Models::Components::TransferStatus), failure_reason: T.nilable(Models::Components::TransferFailureReason), amount: T.nilable(Models::Components::Amount), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), facilitator_fee: T.nilable(Models::Components::FacilitatorFee), moov_fee: T.nilable(::Integer), moov_fee_decimal: T.nilable(::String), moov_fee_details: T.nilable(Models::Components::MoovFeeDetails), group_id: T.nilable(::String), cancellations: T.nilable(T::Array[Models::Components::Cancellation]), refunded_amount: T.nilable(Models::Components::Amount), refunds: T.nilable(T::Array[Models::Components::CardAcquiringRefund]), disputed_amount: T.nilable(Models::Components::Amount), disputes: T.nilable(T::Array[Models::Components::CardAcquiringDispute]), sweep_id: T.nilable(::String), schedule_id: T.nilable(::String), occurrence_id: T.nilable(::String), payment_link_code: T.nilable(::String), sales_tax_amount: T.nilable(Models::Components::Amount), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::TransferLineItems), amount_details: T.nilable(Models::Components::TransferAmountDetails)).void }
74
- def initialize(transfer_id:, created_on:, source: nil, destination: nil, completed_on: nil, status: nil, failure_reason: nil, amount: nil, description: nil, metadata: nil, facilitator_fee: nil, moov_fee: nil, moov_fee_decimal: nil, moov_fee_details: nil, group_id: nil, cancellations: nil, refunded_amount: nil, refunds: nil, disputed_amount: nil, disputes: nil, sweep_id: nil, schedule_id: nil, occurrence_id: nil, payment_link_code: nil, sales_tax_amount: nil, foreign_id: nil, line_items: nil, amount_details: nil)
71
+ sig { params(transfer_id: ::String, created_on: ::DateTime, source: T.nilable(Models::Components::TransferSource), destination: T.nilable(Models::Components::TransferDestination), completed_on: T.nilable(::DateTime), status: T.nilable(Models::Components::TransferStatus), failure_reason: T.nilable(Models::Components::TransferFailureReason), amount: T.nilable(Models::Components::Amount), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::String]), facilitator_fee: T.nilable(Models::Components::FacilitatorFee), moov_fee: T.nilable(::Integer), moov_fee_decimal: T.nilable(::String), moov_fee_details: T.nilable(Models::Components::MoovFeeDetails), group_id: T.nilable(::String), cancellations: T.nilable(T::Array[Models::Components::Cancellation]), refunded_amount: T.nilable(Models::Components::Amount), refunds: T.nilable(T::Array[Models::Components::CardAcquiringRefund]), disputed_amount: T.nilable(Models::Components::Amount), disputes: T.nilable(T::Array[Models::Components::CardAcquiringDispute]), sweep_id: T.nilable(::String), schedule_id: T.nilable(::String), occurrence_id: T.nilable(::String), payment_link_code: T.nilable(::String), foreign_id: T.nilable(::String), line_items: T.nilable(Models::Components::TransferLineItems), amount_details: T.nilable(Models::Components::TransferAmountDetails)).void }
72
+ def initialize(transfer_id:, created_on:, source: nil, destination: nil, completed_on: nil, status: nil, failure_reason: nil, amount: nil, description: nil, metadata: nil, facilitator_fee: nil, moov_fee: nil, moov_fee_decimal: nil, moov_fee_details: nil, group_id: nil, cancellations: nil, refunded_amount: nil, refunds: nil, disputed_amount: nil, disputes: nil, sweep_id: nil, schedule_id: nil, occurrence_id: nil, payment_link_code: nil, foreign_id: nil, line_items: nil, amount_details: nil)
75
73
  @transfer_id = transfer_id
76
74
  @created_on = created_on
77
75
  @source = source
@@ -96,7 +94,6 @@ module Moov
96
94
  @schedule_id = schedule_id
97
95
  @occurrence_id = occurrence_id
98
96
  @payment_link_code = payment_link_code
99
- @sales_tax_amount = sales_tax_amount
100
97
  @foreign_id = foreign_id
101
98
  @line_items = line_items
102
99
  @amount_details = amount_details
@@ -129,7 +126,6 @@ module Moov
129
126
  return false unless @schedule_id == other.schedule_id
130
127
  return false unless @occurrence_id == other.occurrence_id
131
128
  return false unless @payment_link_code == other.payment_link_code
132
- return false unless @sales_tax_amount == other.sales_tax_amount
133
129
  return false unless @foreign_id == other.foreign_id
134
130
  return false unless @line_items == other.line_items
135
131
  return false unless @amount_details == other.amount_details
@@ -56,8 +56,6 @@ class Moov::Models::Components::CreatedTransfer
56
56
  def occurrence_id=(str_); end
57
57
  def payment_link_code(); end
58
58
  def payment_link_code=(str_); end
59
- def sales_tax_amount(); end
60
- def sales_tax_amount=(str_); end
61
59
  def foreign_id(); end
62
60
  def foreign_id=(str_); end
63
61
  def line_items(); end
@@ -21,17 +21,15 @@ module Moov
21
21
  field :partner_account_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('partnerAccountID'), required: true } }
22
22
  # The merchant's preferred payment method ID. Must be a wallet payment method.
23
23
  field :merchant_payment_method_id, ::String, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('merchantPaymentMethodID'), required: true } }
24
+ # Customizable display options for a payment link.
25
+ field :display, Models::Components::PaymentLinkDisplayOptions, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('display'), required: true } }
24
26
  # The fixed amount of the payment link.
25
27
  #
26
28
  # In API versions before `2026.07.00`, this was a required field.
27
29
  #
28
30
  # In API version `2026.07.00` and beyond, this field is required for `fixed` payment amount types and omitted
29
31
  # for `open` payment amount types.
30
- field :amount, Models::Components::Amount, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount'), required: true } }
31
- # Customizable display options for a payment link.
32
- field :display, Models::Components::PaymentLinkDisplayOptions, { 'format_json': { 'letter_case': ::Moov::Utils.field_name('display'), required: true } }
33
- # Optional sales tax amount.
34
- field :sales_tax_amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('salesTaxAmount') } }
32
+ field :amount, Crystalline::Nilable.new(Models::Components::Amount), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amount') } }
35
33
  # An optional limit on the number of times this payment link can be used.
36
34
  #
37
35
  # **For payouts, `maxUses` is always 1.**
@@ -48,19 +46,21 @@ module Moov
48
46
  # When line items are provided, their total plus tax must equal the payment link amount.
49
47
  field :line_items, Crystalline::Nilable.new(Models::Components::CreatePaymentLinkLineItems), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('lineItems') } }
50
48
 
51
- sig { params(partner_account_id: ::String, merchant_payment_method_id: ::String, amount: Models::Components::Amount, display: Models::Components::PaymentLinkDisplayOptions, sales_tax_amount: T.nilable(Models::Components::Amount), 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 }
52
- def initialize(partner_account_id:, merchant_payment_method_id:, amount:, display:, sales_tax_amount: nil, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: nil)
49
+ field :amount_details, Crystalline::Nilable.new(Models::Components::CreatePaymentLinkAmountDetails), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('amountDetails') } }
50
+
51
+ sig { params(partner_account_id: ::String, merchant_payment_method_id: ::String, display: Models::Components::PaymentLinkDisplayOptions, amount: T.nilable(Models::Components::Amount), 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), amount_details: T.nilable(Models::Components::CreatePaymentLinkAmountDetails)).void }
52
+ def initialize(partner_account_id:, merchant_payment_method_id:, display:, amount: nil, max_uses: nil, expires_on: nil, customer: nil, payment: nil, payout: nil, line_items: nil, amount_details: nil)
53
53
  @partner_account_id = partner_account_id
54
54
  @merchant_payment_method_id = merchant_payment_method_id
55
- @amount = amount
56
55
  @display = display
57
- @sales_tax_amount = sales_tax_amount
56
+ @amount = amount
58
57
  @max_uses = max_uses
59
58
  @expires_on = expires_on
60
59
  @customer = customer
61
60
  @payment = payment
62
61
  @payout = payout
63
62
  @line_items = line_items
63
+ @amount_details = amount_details
64
64
  end
65
65
 
66
66
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -68,15 +68,15 @@ module Moov
68
68
  return false unless other.is_a? self.class
69
69
  return false unless @partner_account_id == other.partner_account_id
70
70
  return false unless @merchant_payment_method_id == other.merchant_payment_method_id
71
- return false unless @amount == other.amount
72
71
  return false unless @display == other.display
73
- return false unless @sales_tax_amount == other.sales_tax_amount
72
+ return false unless @amount == other.amount
74
73
  return false unless @max_uses == other.max_uses
75
74
  return false unless @expires_on == other.expires_on
76
75
  return false unless @customer == other.customer
77
76
  return false unless @payment == other.payment
78
77
  return false unless @payout == other.payout
79
78
  return false unless @line_items == other.line_items
79
+ return false unless @amount_details == other.amount_details
80
80
  true
81
81
  end
82
82
  end
@@ -12,12 +12,10 @@ class Moov::Models::Components::CreatePaymentLink
12
12
  def partner_account_id=(str_); end
13
13
  def merchant_payment_method_id(); end
14
14
  def merchant_payment_method_id=(str_); end
15
- def amount(); end
16
- def amount=(str_); end
17
15
  def display(); end
18
16
  def display=(str_); end
19
- def sales_tax_amount(); end
20
- def sales_tax_amount=(str_); end
17
+ def amount(); end
18
+ def amount=(str_); end
21
19
  def max_uses(); end
22
20
  def max_uses=(str_); end
23
21
  def expires_on(); end
@@ -30,4 +28,6 @@ class Moov::Models::Components::CreatePaymentLink
30
28
  def payout=(str_); end
31
29
  def line_items(); end
32
30
  def line_items=(str_); end
31
+ def amount_details(); end
32
+ def amount_details=(str_); end
33
33
  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 CreatePaymentLinkAmountDetails
12
+ extend T::Sig
13
+ include Crystalline::MetadataFields
14
+
15
+ # The amount of tax applied to the payment link.
16
+ field :tax, Crystalline::Nilable.new(Models::Components::AmountDecimal), { 'format_json': { 'letter_case': ::Moov::Utils.field_name('tax') } }
17
+
18
+ sig { params(tax: T.nilable(Models::Components::AmountDecimal)).void }
19
+ def initialize(tax: nil)
20
+ @tax = tax
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 @tax == other.tax
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::CreatePaymentLinkAmountDetails
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Moov::Models::Components::CreatePaymentLinkAmountDetails
11
+ def tax(); end
12
+ def tax=(str_); end
13
+ end