diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 329b1ea3..a2761166 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index d8a60393..a48dc659 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to rubygems.org in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/lithic-com/lithic-python/actions/workflows/publish-gem.yml +# You can run this workflow by navigating to https://www.github.com/lithic-com/lithic-ruby/actions/workflows/publish-gem.yml name: Publish Gem on: workflow_dispatch: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a899ac74..2ce25fec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.31" + ".": "0.1.0-alpha.32" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 986c1168..94a52320 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 161 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-89dfdedd460a673d9addf6d763389f59895e986036296d99baf89366ba622034.yml -openapi_spec_hash: b6183fb775fc8bfa3d40ed7130b17976 -config_hash: fa3481d1d8505e4157f6cebe93211bd0 +configured_endpoints: 162 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c178720e9b6fe1ff3917d4d96652b4c91a0e7f0795b6858256d250d8a203d3ac.yml +openapi_spec_hash: 23a4716c6168e96f040ac8575582d075 +config_hash: 227ad54062905d4ae964b24cef0505b0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a086c15..22084c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.1.0-alpha.32 (2025-06-17) + +Full Changelog: [v0.1.0-alpha.31...v0.1.0-alpha.32](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.31...v0.1.0-alpha.32) + +### Features + +* **api:** add CLOSED account state option and UNVERIFIED verification method ([a8eb01e](https://github.com/lithic-com/lithic-ruby/commit/a8eb01e4a8511742953953e86245fa434b923d01)) +* **client:** adds endpoint to register an account number on a Financial Account ([82d726f](https://github.com/lithic-com/lithic-ruby/commit/82d726f88eb26013f71c7135ada25fbb9fd02cc4)) + + +### Chores + +* **ci:** enable for pull requests ([cf910d6](https://github.com/lithic-com/lithic-ruby/commit/cf910d68015385090f887f24ea27519a3ab12d75)) +* **ci:** link to correct github repo ([e7e327a](https://github.com/lithic-com/lithic-ruby/commit/e7e327ad30f205f20ad2b00bd0d3314836a42269)) + ## 0.1.0-alpha.31 (2025-06-04) Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.30...v0.1.0-alpha.31) diff --git a/Gemfile.lock b/Gemfile.lock index 951e4b98..eab7a658 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.1.0.pre.alpha.31) + lithic (0.1.0.pre.alpha.32) connection_pool GEM diff --git a/README.md b/README.md index 54ad6d91..ac3aed0b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.1.0.pre.alpha.31" +gem "lithic", "~> 0.1.0.pre.alpha.32" ``` diff --git a/lib/lithic.rb b/lib/lithic.rb index 5489f28a..de269fd9 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -211,6 +211,7 @@ require_relative "lithic/models/financial_account" require_relative "lithic/models/financial_account_create_params" require_relative "lithic/models/financial_account_list_params" +require_relative "lithic/models/financial_account_register_account_number_params" require_relative "lithic/models/financial_account_retrieve_params" require_relative "lithic/models/financial_accounts/balance_list_params" require_relative "lithic/models/financial_accounts/balance_list_response" diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index bd818130..0f3f0f2e 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -230,6 +230,8 @@ module Lithic FinancialAccountListParams = Lithic::Models::FinancialAccountListParams + FinancialAccountRegisterAccountNumberParams = Lithic::Models::FinancialAccountRegisterAccountNumberParams + FinancialAccountRetrieveParams = Lithic::Models::FinancialAccountRetrieveParams FinancialAccounts = Lithic::Models::FinancialAccounts diff --git a/lib/lithic/models/account.rb b/lib/lithic/models/account.rb index 2586494f..b997405f 100644 --- a/lib/lithic/models/account.rb +++ b/lib/lithic/models/account.rb @@ -35,11 +35,11 @@ class Account < Lithic::Internal::Type::BaseModel # - `PAUSED` - Account will not be able to transact or create new cards. It can be # set back to `ACTIVE`. # - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` - # accounts are also unable to be transitioned to `ACTIVE` or `PAUSED` states. - # `CLOSED` accounts result from failing to pass KYB/KYC or Lithic closing for - # risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was in - # error. + # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. + # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to + # failure to pass KYB/KYC or for risk/compliance reasons. Please contact + # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # by mistake. # # @return [Symbol, Lithic::Models::Account::State] required :state, enum: -> { Lithic::Account::State } @@ -132,11 +132,11 @@ class SpendLimit < Lithic::Internal::Type::BaseModel # - `PAUSED` - Account will not be able to transact or create new cards. It can be # set back to `ACTIVE`. # - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` - # accounts are also unable to be transitioned to `ACTIVE` or `PAUSED` states. - # `CLOSED` accounts result from failing to pass KYB/KYC or Lithic closing for - # risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was in - # error. + # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. + # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to + # failure to pass KYB/KYC or for risk/compliance reasons. Please contact + # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # by mistake. # # @see Lithic::Models::Account#state module State diff --git a/lib/lithic/models/account_update_params.rb b/lib/lithic/models/account_update_params.rb index 29ef1d2b..a26ce636 100644 --- a/lib/lithic/models/account_update_params.rb +++ b/lib/lithic/models/account_update_params.rb @@ -72,6 +72,7 @@ module State ACTIVE = :ACTIVE PAUSED = :PAUSED + CLOSED = :CLOSED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/velocity_limit_params.rb b/lib/lithic/models/auth_rules/velocity_limit_params.rb index d21a23cb..431e4651 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params.rb @@ -113,6 +113,7 @@ module Period # * `DAY`: Velocity over the current day since midnight Eastern Time. # * `WEEK`: Velocity over the current week since 00:00 / 12 AM on Monday in Eastern Time. # * `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of the month in Eastern Time. + # * `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in Eastern Time. variant enum: -> { Lithic::AuthRules::VelocityLimitParamsPeriodWindow } # @!method self.variants diff --git a/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb b/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb index a01edd53..dee36b52 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb @@ -10,12 +10,15 @@ module AuthRules # Eastern Time. # - `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of # the month in Eastern Time. + # - `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in + # Eastern Time. module VelocityLimitParamsPeriodWindow extend Lithic::Internal::Type::Enum DAY = :DAY WEEK = :WEEK MONTH = :MONTH + YEAR = :YEAR # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_account.rb b/lib/lithic/models/financial_account.rb index a2949faf..e6a41a9b 100644 --- a/lib/lithic/models/financial_account.rb +++ b/lib/lithic/models/financial_account.rb @@ -209,6 +209,7 @@ module Type CHARGED_OFF_PRINCIPAL = :CHARGED_OFF_PRINCIPAL SECURITY = :SECURITY PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES + COLLECTION = :COLLECTION # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_account_register_account_number_params.rb b/lib/lithic/models/financial_account_register_account_number_params.rb new file mode 100644 index 00000000..5fe406d0 --- /dev/null +++ b/lib/lithic/models/financial_account_register_account_number_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::FinancialAccounts#register_account_number + class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute account_number + # + # @return [String] + required :account_number, String + + # @!method initialize(account_number:, request_options: {}) + # @param account_number [String] + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/models/instance_financial_account_type.rb b/lib/lithic/models/instance_financial_account_type.rb index e826c6fe..49648d19 100644 --- a/lib/lithic/models/instance_financial_account_type.rb +++ b/lib/lithic/models/instance_financial_account_type.rb @@ -14,6 +14,7 @@ module InstanceFinancialAccountType CHARGED_OFF_PRINCIPAL = :CHARGED_OFF_PRINCIPAL SECURITY = :SECURITY PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES + COLLECTION = :COLLECTION # @!method self.values # @return [Array] diff --git a/lib/lithic/models/settlement_detail.rb b/lib/lithic/models/settlement_detail.rb index 0d3f1b92..ed652706 100644 --- a/lib/lithic/models/settlement_detail.rb +++ b/lib/lithic/models/settlement_detail.rb @@ -98,7 +98,9 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel required :report_date, String # @!attribute settlement_date - # Date of when money movement is triggered for the transaction. + # Date of when money movement is triggered for the transaction. One exception + # applies - for Mastercard dual message settlement, this is the settlement + # advisement date, which is distinct from the date of money movement. # # @return [String] required :settlement_date, String @@ -168,7 +170,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # # @param report_date [String] Date of when the report was first generated. # - # @param settlement_date [String] Date of when money movement is triggered for the transaction. + # @param settlement_date [String] Date of when money movement is triggered for the transaction. One exception appl # # @param transaction_token [String] Globally unique identifier denoting the associated Transaction object. # diff --git a/lib/lithic/models/transaction.rb b/lib/lithic/models/transaction.rb index 0851a1cb..ea311143 100644 --- a/lib/lithic/models/transaction.rb +++ b/lib/lithic/models/transaction.rb @@ -508,6 +508,7 @@ module AuthenticationResult module DecisionMadeBy extend Lithic::Internal::Type::Enum + CUSTOMER_RULES = :CUSTOMER_RULES CUSTOMER_ENDPOINT = :CUSTOMER_ENDPOINT LITHIC_DEFAULT = :LITHIC_DEFAULT LITHIC_RULES = :LITHIC_RULES diff --git a/lib/lithic/models/verification_method.rb b/lib/lithic/models/verification_method.rb index 255adcbb..9dfb99fc 100644 --- a/lib/lithic/models/verification_method.rb +++ b/lib/lithic/models/verification_method.rb @@ -10,6 +10,7 @@ module VerificationMethod PLAID = :PLAID PRENOTE = :PRENOTE EXTERNALLY_VERIFIED = :EXTERNALLY_VERIFIED + UNVERIFIED = :UNVERIFIED # @!method self.values # @return [Array] diff --git a/lib/lithic/resources/financial_accounts.rb b/lib/lithic/resources/financial_accounts.rb index 321c830e..646b84f4 100644 --- a/lib/lithic/resources/financial_accounts.rb +++ b/lib/lithic/resources/financial_accounts.rb @@ -119,6 +119,30 @@ def list(params = {}) ) end + # Register account number + # + # @overload register_account_number(financial_account_token, account_number:, request_options: {}) + # + # @param financial_account_token [String] Globally unique identifier for financial account. + # + # @param account_number [String] + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Lithic::Models::FinancialAccountRegisterAccountNumberParams + def register_account_number(financial_account_token, params) + parsed, options = Lithic::FinancialAccountRegisterAccountNumberParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/financial_accounts/%1$s/register_account_number", financial_account_token], + body: parsed, + model: NilClass, + options: options + ) + end + # Update financial account status # # @overload update_status(financial_account_token, status:, substatus:, request_options: {}) diff --git a/lib/lithic/resources/three_ds/authentication.rb b/lib/lithic/resources/three_ds/authentication.rb index 785cd0cd..c99d850f 100644 --- a/lib/lithic/resources/three_ds/authentication.rb +++ b/lib/lithic/resources/three_ds/authentication.rb @@ -30,7 +30,9 @@ def retrieve(three_ds_authentication_token, params = {}) # Simulates a 3DS authentication request from the payment network as if it came # from an ACS. If you're configured for 3DS Customer Decisioning, simulating # authentications requires your customer decisioning endpoint to be set up - # properly (respond with a valid JSON). + # properly (respond with a valid JSON). If the authentication decision is to + # challenge, ensure that the account holder associated with the card transaction + # has a valid phone number configured to receive the OTP code via SMS. # # @overload simulate(merchant:, pan:, transaction:, card_expiry_check: nil, request_options: {}) # diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index b572506b..977d7b1e 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.1.0.pre.alpha.31" + VERSION = "0.1.0.pre.alpha.32" end diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 58cc9108..0df83133 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -205,6 +205,9 @@ module Lithic FinancialAccountListParams = Lithic::Models::FinancialAccountListParams + FinancialAccountRegisterAccountNumberParams = + Lithic::Models::FinancialAccountRegisterAccountNumberParams + FinancialAccountRetrieveParams = Lithic::Models::FinancialAccountRetrieveParams diff --git a/rbi/lithic/models/account.rbi b/rbi/lithic/models/account.rbi index 1c98c7f5..a6ceb80f 100644 --- a/rbi/lithic/models/account.rbi +++ b/rbi/lithic/models/account.rbi @@ -33,11 +33,11 @@ module Lithic # - `PAUSED` - Account will not be able to transact or create new cards. It can be # set back to `ACTIVE`. # - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` - # accounts are also unable to be transitioned to `ACTIVE` or `PAUSED` states. - # `CLOSED` accounts result from failing to pass KYB/KYC or Lithic closing for - # risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was in - # error. + # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. + # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to + # failure to pass KYB/KYC or for risk/compliance reasons. Please contact + # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # by mistake. sig { returns(Lithic::Account::State::TaggedSymbol) } attr_accessor :state @@ -107,11 +107,11 @@ module Lithic # - `PAUSED` - Account will not be able to transact or create new cards. It can be # set back to `ACTIVE`. # - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` - # accounts are also unable to be transitioned to `ACTIVE` or `PAUSED` states. - # `CLOSED` accounts result from failing to pass KYB/KYC or Lithic closing for - # risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was in - # error. + # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. + # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to + # failure to pass KYB/KYC or for risk/compliance reasons. Please contact + # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # by mistake. state:, account_holder: nil, # List of identifiers for the Auth Rule(s) that are applied on the account. This @@ -195,11 +195,11 @@ module Lithic # - `PAUSED` - Account will not be able to transact or create new cards. It can be # set back to `ACTIVE`. # - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED` - # accounts are also unable to be transitioned to `ACTIVE` or `PAUSED` states. - # `CLOSED` accounts result from failing to pass KYB/KYC or Lithic closing for - # risk/compliance reasons. Please contact - # [support@lithic.com](mailto:support@lithic.com) if you believe this was in - # error. + # accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states. + # Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to + # failure to pass KYB/KYC or for risk/compliance reasons. Please contact + # [support@lithic.com](mailto:support@lithic.com) if you believe this was done + # by mistake. module State extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_update_params.rbi b/rbi/lithic/models/account_update_params.rbi index c6662b1c..e9454acd 100644 --- a/rbi/lithic/models/account_update_params.rbi +++ b/rbi/lithic/models/account_update_params.rbi @@ -129,6 +129,8 @@ module Lithic T.let(:ACTIVE, Lithic::AccountUpdateParams::State::TaggedSymbol) PAUSED = T.let(:PAUSED, Lithic::AccountUpdateParams::State::TaggedSymbol) + CLOSED = + T.let(:CLOSED, Lithic::AccountUpdateParams::State::TaggedSymbol) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi b/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi index e16b71dc..4e27313f 100644 --- a/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +++ b/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi @@ -10,6 +10,8 @@ module Lithic # Eastern Time. # - `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of # the month in Eastern Time. + # - `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in + # Eastern Time. module VelocityLimitParamsPeriodWindow extend Lithic::Internal::Type::Enum @@ -34,6 +36,11 @@ module Lithic :MONTH, Lithic::AuthRules::VelocityLimitParamsPeriodWindow::TaggedSymbol ) + YEAR = + T.let( + :YEAR, + Lithic::AuthRules::VelocityLimitParamsPeriodWindow::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_account.rbi b/rbi/lithic/models/financial_account.rbi index 2544fbff..0dd8b6d8 100644 --- a/rbi/lithic/models/financial_account.rbi +++ b/rbi/lithic/models/financial_account.rbi @@ -353,6 +353,8 @@ module Lithic :PROGRAM_RECEIVABLES, Lithic::FinancialAccount::Type::TaggedSymbol ) + COLLECTION = + T.let(:COLLECTION, Lithic::FinancialAccount::Type::TaggedSymbol) sig do override.returns( diff --git a/rbi/lithic/models/financial_account_register_account_number_params.rbi b/rbi/lithic/models/financial_account_register_account_number_params.rbi new file mode 100644 index 00000000..1e9b937b --- /dev/null +++ b/rbi/lithic/models/financial_account_register_account_number_params.rbi @@ -0,0 +1,38 @@ +# typed: strong + +module Lithic + module Models + class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::FinancialAccountRegisterAccountNumberParams, + Lithic::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :account_number + + sig do + params( + account_number: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(account_number:, request_options: {}) + end + + sig do + override.returns( + { account_number: String, request_options: Lithic::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/instance_financial_account_type.rbi b/rbi/lithic/models/instance_financial_account_type.rbi index 2e4bf878..99848757 100644 --- a/rbi/lithic/models/instance_financial_account_type.rbi +++ b/rbi/lithic/models/instance_financial_account_type.rbi @@ -38,6 +38,8 @@ module Lithic :PROGRAM_RECEIVABLES, Lithic::InstanceFinancialAccountType::TaggedSymbol ) + COLLECTION = + T.let(:COLLECTION, Lithic::InstanceFinancialAccountType::TaggedSymbol) sig do override.returns( diff --git a/rbi/lithic/models/settlement_detail.rbi b/rbi/lithic/models/settlement_detail.rbi index 26d5f320..f93f5e6b 100644 --- a/rbi/lithic/models/settlement_detail.rbi +++ b/rbi/lithic/models/settlement_detail.rbi @@ -79,7 +79,9 @@ module Lithic sig { returns(String) } attr_accessor :report_date - # Date of when money movement is triggered for the transaction. + # Date of when money movement is triggered for the transaction. One exception + # applies - for Mastercard dual message settlement, this is the settlement + # advisement date, which is distinct from the date of money movement. sig { returns(String) } attr_accessor :settlement_date @@ -168,7 +170,9 @@ module Lithic other_fees_gross_amount:, # Date of when the report was first generated. report_date:, - # Date of when money movement is triggered for the transaction. + # Date of when money movement is triggered for the transaction. One exception + # applies - for Mastercard dual message settlement, this is the settlement + # advisement date, which is distinct from the date of money movement. settlement_date:, # Globally unique identifier denoting the associated Transaction object. transaction_token:, diff --git a/rbi/lithic/models/transaction.rbi b/rbi/lithic/models/transaction.rbi index e88ef796..d11c8bd2 100644 --- a/rbi/lithic/models/transaction.rbi +++ b/rbi/lithic/models/transaction.rbi @@ -815,6 +815,11 @@ module Lithic end OrSymbol = T.type_alias { T.any(Symbol, String) } + CUSTOMER_RULES = + T.let( + :CUSTOMER_RULES, + Lithic::Transaction::CardholderAuthentication::DecisionMadeBy::TaggedSymbol + ) CUSTOMER_ENDPOINT = T.let( :CUSTOMER_ENDPOINT, diff --git a/rbi/lithic/models/verification_method.rbi b/rbi/lithic/models/verification_method.rbi index 50880e00..9e22afa0 100644 --- a/rbi/lithic/models/verification_method.rbi +++ b/rbi/lithic/models/verification_method.rbi @@ -15,6 +15,7 @@ module Lithic PRENOTE = T.let(:PRENOTE, Lithic::VerificationMethod::TaggedSymbol) EXTERNALLY_VERIFIED = T.let(:EXTERNALLY_VERIFIED, Lithic::VerificationMethod::TaggedSymbol) + UNVERIFIED = T.let(:UNVERIFIED, Lithic::VerificationMethod::TaggedSymbol) sig do override.returns(T::Array[Lithic::VerificationMethod::TaggedSymbol]) diff --git a/rbi/lithic/resources/financial_accounts.rbi b/rbi/lithic/resources/financial_accounts.rbi index d39eff62..8762c4a9 100644 --- a/rbi/lithic/resources/financial_accounts.rbi +++ b/rbi/lithic/resources/financial_accounts.rbi @@ -88,6 +88,22 @@ module Lithic ) end + # Register account number + sig do + params( + financial_account_token: String, + account_number: String, + request_options: Lithic::RequestOptions::OrHash + ).void + end + def register_account_number( + # Globally unique identifier for financial account. + financial_account_token, + account_number:, + request_options: {} + ) + end + # Update financial account status sig do params( diff --git a/rbi/lithic/resources/three_ds/authentication.rbi b/rbi/lithic/resources/three_ds/authentication.rbi index ad5e545a..103e54ac 100644 --- a/rbi/lithic/resources/three_ds/authentication.rbi +++ b/rbi/lithic/resources/three_ds/authentication.rbi @@ -21,7 +21,9 @@ module Lithic # Simulates a 3DS authentication request from the payment network as if it came # from an ACS. If you're configured for 3DS Customer Decisioning, simulating # authentications requires your customer decisioning endpoint to be set up - # properly (respond with a valid JSON). + # properly (respond with a valid JSON). If the authentication decision is to + # challenge, ensure that the account holder associated with the card transaction + # has a valid phone number configured to receive the OTP code via SMS. sig do params( merchant: diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 3afab8bc..2b620e50 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -189,6 +189,8 @@ module Lithic class FinancialAccountListParams = Lithic::Models::FinancialAccountListParams + class FinancialAccountRegisterAccountNumberParams = Lithic::Models::FinancialAccountRegisterAccountNumberParams + class FinancialAccountRetrieveParams = Lithic::Models::FinancialAccountRetrieveParams module FinancialAccounts = Lithic::Models::FinancialAccounts diff --git a/sig/lithic/models/account_update_params.rbs b/sig/lithic/models/account_update_params.rbs index 31a2b0a2..201e5b89 100644 --- a/sig/lithic/models/account_update_params.rbs +++ b/sig/lithic/models/account_update_params.rbs @@ -56,13 +56,14 @@ module Lithic request_options: Lithic::RequestOptions } - type state = :ACTIVE | :PAUSED + type state = :ACTIVE | :PAUSED | :CLOSED module State extend Lithic::Internal::Type::Enum ACTIVE: :ACTIVE PAUSED: :PAUSED + CLOSED: :CLOSED def self?.values: -> ::Array[Lithic::Models::AccountUpdateParams::state] end diff --git a/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs b/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs index 5f6e95a0..48203829 100644 --- a/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +++ b/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs @@ -1,7 +1,7 @@ module Lithic module Models module AuthRules - type velocity_limit_params_period_window = :DAY | :WEEK | :MONTH + type velocity_limit_params_period_window = :DAY | :WEEK | :MONTH | :YEAR module VelocityLimitParamsPeriodWindow extend Lithic::Internal::Type::Enum @@ -9,6 +9,7 @@ module Lithic DAY: :DAY WEEK: :WEEK MONTH: :MONTH + YEAR: :YEAR def self?.values: -> ::Array[Lithic::Models::AuthRules::velocity_limit_params_period_window] end diff --git a/sig/lithic/models/financial_account.rbs b/sig/lithic/models/financial_account.rbs index 97c3b2db..2cd6a3ed 100644 --- a/sig/lithic/models/financial_account.rbs +++ b/sig/lithic/models/financial_account.rbs @@ -165,6 +165,7 @@ module Lithic | :CHARGED_OFF_PRINCIPAL | :SECURITY | :PROGRAM_RECEIVABLES + | :COLLECTION module Type extend Lithic::Internal::Type::Enum @@ -177,6 +178,7 @@ module Lithic CHARGED_OFF_PRINCIPAL: :CHARGED_OFF_PRINCIPAL SECURITY: :SECURITY PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES + COLLECTION: :COLLECTION def self?.values: -> ::Array[Lithic::Models::FinancialAccount::type_] end diff --git a/sig/lithic/models/financial_account_register_account_number_params.rbs b/sig/lithic/models/financial_account_register_account_number_params.rbs new file mode 100644 index 00000000..d520fc44 --- /dev/null +++ b/sig/lithic/models/financial_account_register_account_number_params.rbs @@ -0,0 +1,23 @@ +module Lithic + module Models + type financial_account_register_account_number_params = + { account_number: String } & Lithic::Internal::Type::request_parameters + + class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor account_number: String + + def initialize: ( + account_number: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + account_number: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/models/instance_financial_account_type.rbs b/sig/lithic/models/instance_financial_account_type.rbs index 6aef3c8e..ad5683f4 100644 --- a/sig/lithic/models/instance_financial_account_type.rbs +++ b/sig/lithic/models/instance_financial_account_type.rbs @@ -9,6 +9,7 @@ module Lithic | :CHARGED_OFF_PRINCIPAL | :SECURITY | :PROGRAM_RECEIVABLES + | :COLLECTION module InstanceFinancialAccountType extend Lithic::Internal::Type::Enum @@ -21,6 +22,7 @@ module Lithic CHARGED_OFF_PRINCIPAL: :CHARGED_OFF_PRINCIPAL SECURITY: :SECURITY PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES + COLLECTION: :COLLECTION def self?.values: -> ::Array[Lithic::Models::instance_financial_account_type] end diff --git a/sig/lithic/models/transaction.rbs b/sig/lithic/models/transaction.rbs index 9ea51c6c..eb3281ff 100644 --- a/sig/lithic/models/transaction.rbs +++ b/sig/lithic/models/transaction.rbs @@ -342,7 +342,8 @@ module Lithic end type decision_made_by = - :CUSTOMER_ENDPOINT + :CUSTOMER_RULES + | :CUSTOMER_ENDPOINT | :LITHIC_DEFAULT | :LITHIC_RULES | :NETWORK @@ -351,6 +352,7 @@ module Lithic module DecisionMadeBy extend Lithic::Internal::Type::Enum + CUSTOMER_RULES: :CUSTOMER_RULES CUSTOMER_ENDPOINT: :CUSTOMER_ENDPOINT LITHIC_DEFAULT: :LITHIC_DEFAULT LITHIC_RULES: :LITHIC_RULES diff --git a/sig/lithic/models/verification_method.rbs b/sig/lithic/models/verification_method.rbs index 1d132e3b..0cf14894 100644 --- a/sig/lithic/models/verification_method.rbs +++ b/sig/lithic/models/verification_method.rbs @@ -1,7 +1,12 @@ module Lithic module Models type verification_method = - :MANUAL | :MICRO_DEPOSIT | :PLAID | :PRENOTE | :EXTERNALLY_VERIFIED + :MANUAL + | :MICRO_DEPOSIT + | :PLAID + | :PRENOTE + | :EXTERNALLY_VERIFIED + | :UNVERIFIED module VerificationMethod extend Lithic::Internal::Type::Enum @@ -11,6 +16,7 @@ module Lithic PLAID: :PLAID PRENOTE: :PRENOTE EXTERNALLY_VERIFIED: :EXTERNALLY_VERIFIED + UNVERIFIED: :UNVERIFIED def self?.values: -> ::Array[Lithic::Models::verification_method] end diff --git a/sig/lithic/resources/financial_accounts.rbs b/sig/lithic/resources/financial_accounts.rbs index 6021953c..3793346d 100644 --- a/sig/lithic/resources/financial_accounts.rbs +++ b/sig/lithic/resources/financial_accounts.rbs @@ -38,6 +38,12 @@ module Lithic ?request_options: Lithic::request_opts ) -> Lithic::Internal::SinglePage[Lithic::FinancialAccount] + def register_account_number: ( + String financial_account_token, + account_number: String, + ?request_options: Lithic::request_opts + ) -> nil + def update_status: ( String financial_account_token, status: Lithic::Models::FinancialAccountUpdateStatusParams::status, diff --git a/test/lithic/resources/financial_accounts_test.rb b/test/lithic/resources/financial_accounts_test.rb index 5b2c7d79..c1fe67b5 100644 --- a/test/lithic/resources/financial_accounts_test.rb +++ b/test/lithic/resources/financial_accounts_test.rb @@ -110,6 +110,18 @@ def test_list end end + def test_register_account_number_required_params + response = + @lithic.financial_accounts.register_account_number( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_number: "account_number" + ) + + assert_pattern do + response => nil + end + end + def test_update_status_required_params response = @lithic.financial_accounts.update_status(