From 4e4dfb78069500939027ed67d445d63160cd9e1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:54:35 +0000 Subject: [PATCH 01/19] feat(api): add limit_cash_amount and limit_cash_count to velocity limit params --- .stats.yml | 4 +-- .../auth_rules/velocity_limit_params.rb | 25 +++++++++++++++- .../auth_rules/velocity_limit_params.rbi | 30 +++++++++++++++++++ .../auth_rules/velocity_limit_params.rbs | 10 +++++++ 4 files changed, 66 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5715819..51c96b22 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-59c09c7355b21b663e001d2ee1086ebd0a70d9b5433823282bca296eedff9eb0.yml -openapi_spec_hash: d9c3b932c810809abc6e973d662ad376 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1d6c7b672aa49dfe0fe5175965307f63a0ed42c13697b2f9f3b9275f32331937.yml +openapi_spec_hash: 06e73960c7506484c589d718fa1ddad8 config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/auth_rules/velocity_limit_params.rb b/lib/lithic/models/auth_rules/velocity_limit_params.rb index fab01fca..27cb0d30 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params.rb @@ -29,6 +29,25 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Integer, nil] optional :limit_amount, Integer, nil?: true + # @!attribute limit_cash_amount + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + # + # @return [Integer, nil] + optional :limit_cash_amount, Integer, nil?: true + + # @!attribute limit_cash_count + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + # + # @return [Integer, nil] + optional :limit_cash_count, Integer, nil?: true + # @!attribute limit_count # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity @@ -39,7 +58,7 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Integer, nil] optional :limit_count, Integer, nil?: true - # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_count: nil) + # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_cash_amount: nil, limit_cash_count: nil, limit_count: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::VelocityLimitParams} for more details. # @@ -51,6 +70,10 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # # @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s # + # @param limit_cash_amount [Integer, nil] The maximum amount of cash spend velocity allowed in the period in minor units ( + # + # @param limit_cash_count [Integer, nil] The number of cash spend velocity impacting transactions may not exceed this lim + # # @param limit_count [Integer, nil] The number of spend velocity impacting transactions may not exceed this limit in # The scope the velocity is calculated for diff --git a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi index d050b654..c25e5ae5 100644 --- a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +++ b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi @@ -44,6 +44,21 @@ module Lithic sig { returns(T.nilable(Integer)) } attr_accessor :limit_amount + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit_cash_amount + + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + sig { returns(T.nilable(Integer)) } + attr_accessor :limit_cash_count + # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity # impacting transaction is a transaction that has been authorized, and optionally @@ -65,6 +80,8 @@ module Lithic scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, filters: Lithic::AuthRules::VelocityLimitFilters::OrHash, limit_amount: T.nilable(Integer), + limit_cash_amount: T.nilable(Integer), + limit_cash_count: T.nilable(Integer), limit_count: T.nilable(Integer) ).returns(T.attached_class) end @@ -78,6 +95,17 @@ module Lithic # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this # limit will be declined. limit_amount: nil, + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + limit_cash_amount: nil, + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + limit_cash_count: nil, # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity # impacting transaction is a transaction that has been authorized, and optionally @@ -101,6 +129,8 @@ module Lithic scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: T.nilable(Integer), + limit_cash_amount: T.nilable(Integer), + limit_cash_count: T.nilable(Integer), limit_count: T.nilable(Integer) } ) diff --git a/sig/lithic/models/auth_rules/velocity_limit_params.rbs b/sig/lithic/models/auth_rules/velocity_limit_params.rbs index cd93489d..ce06d04f 100644 --- a/sig/lithic/models/auth_rules/velocity_limit_params.rbs +++ b/sig/lithic/models/auth_rules/velocity_limit_params.rbs @@ -7,6 +7,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, + limit_cash_amount: Integer?, + limit_cash_count: Integer?, limit_count: Integer? } @@ -23,6 +25,10 @@ module Lithic attr_accessor limit_amount: Integer? + attr_accessor limit_cash_amount: Integer? + + attr_accessor limit_cash_count: Integer? + attr_accessor limit_count: Integer? def initialize: ( @@ -30,6 +36,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, ?filters: Lithic::AuthRules::VelocityLimitFilters, ?limit_amount: Integer?, + ?limit_cash_amount: Integer?, + ?limit_cash_count: Integer?, ?limit_count: Integer? ) -> void @@ -38,6 +46,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, + limit_cash_amount: Integer?, + limit_cash_count: Integer?, limit_count: Integer? } From c46e82cc5bf4560c31adc1ebd6e991b55a1c3f2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 14:24:48 +0000 Subject: [PATCH 02/19] feat(api): add blockchain_addresses field to FinancialAccount model --- .stats.yml | 4 ++-- lib/lithic/models/financial_account.rb | 14 +++++++++++++- rbi/lithic/models/financial_account.rbi | 10 ++++++++++ sig/lithic/models/financial_account.rbs | 5 +++++ test/lithic/resources/financial_accounts_test.rb | 5 +++++ 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 51c96b22..12c884de 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1d6c7b672aa49dfe0fe5175965307f63a0ed42c13697b2f9f3b9275f32331937.yml -openapi_spec_hash: 06e73960c7506484c589d718fa1ddad8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-81febc26f7987ef8f74f2038dddd4799a1e77b2c64d2fe36c2c9f2eb5079476b.yml +openapi_spec_hash: 91e4b19977ca68b988862e967be57d26 config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/financial_account.rb b/lib/lithic/models/financial_account.rb index 2cb731e3..2dc28bf5 100644 --- a/lib/lithic/models/financial_account.rb +++ b/lib/lithic/models/financial_account.rb @@ -69,12 +69,22 @@ class FinancialAccount < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :account_number, String, nil?: true + # @!attribute blockchain_addresses + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the blockchain network that each address belongs to + # + # @return [Hash{Symbol=>String}, nil] + optional :blockchain_addresses, Lithic::Internal::Type::HashOf[String], nil?: true + # @!attribute routing_number # # @return [String, nil] optional :routing_number, String, nil?: true - # @!method initialize(token:, account_token:, created:, credit_configuration:, is_for_benefit_of:, nickname:, status:, substatus:, type:, updated:, user_defined_status:, account_number: nil, routing_number: nil) + # @!method initialize(token:, account_token:, created:, credit_configuration:, is_for_benefit_of:, nickname:, status:, substatus:, type:, updated:, user_defined_status:, account_number: nil, blockchain_addresses: nil, routing_number: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::FinancialAccount} for more details. + # # @param token [String] Globally unique identifier for the account # # @param account_token [String, nil] @@ -99,6 +109,8 @@ class FinancialAccount < Lithic::Internal::Type::BaseModel # # @param account_number [String, nil] # + # @param blockchain_addresses [Hash{Symbol=>String}, nil] Provisioned blockchain deposit addresses for this financial account, keyed by th + # # @param routing_number [String, nil] # @see Lithic::Models::FinancialAccount#credit_configuration diff --git a/rbi/lithic/models/financial_account.rbi b/rbi/lithic/models/financial_account.rbi index c80f0ef0..ba66ebf0 100644 --- a/rbi/lithic/models/financial_account.rbi +++ b/rbi/lithic/models/financial_account.rbi @@ -59,6 +59,11 @@ module Lithic sig { returns(T.nilable(String)) } attr_accessor :account_number + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the blockchain network that each address belongs to + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :blockchain_addresses + sig { returns(T.nilable(String)) } attr_accessor :routing_number @@ -77,6 +82,7 @@ module Lithic updated: Time, user_defined_status: T.nilable(String), account_number: T.nilable(String), + blockchain_addresses: T.nilable(T::Hash[Symbol, String]), routing_number: T.nilable(String) ).returns(T.attached_class) end @@ -98,6 +104,9 @@ module Lithic # User-defined status for the financial account user_defined_status:, account_number: nil, + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the blockchain network that each address belongs to + blockchain_addresses: nil, routing_number: nil ) end @@ -119,6 +128,7 @@ module Lithic updated: Time, user_defined_status: T.nilable(String), account_number: T.nilable(String), + blockchain_addresses: T.nilable(T::Hash[Symbol, String]), routing_number: T.nilable(String) } ) diff --git a/sig/lithic/models/financial_account.rbs b/sig/lithic/models/financial_account.rbs index 60fed134..9cb396d8 100644 --- a/sig/lithic/models/financial_account.rbs +++ b/sig/lithic/models/financial_account.rbs @@ -14,6 +14,7 @@ module Lithic updated: Time, user_defined_status: String?, account_number: String?, + blockchain_addresses: ::Hash[Symbol, String]?, routing_number: String? } @@ -42,6 +43,8 @@ module Lithic attr_accessor account_number: String? + attr_accessor blockchain_addresses: ::Hash[Symbol, String]? + attr_accessor routing_number: String? def initialize: ( @@ -57,6 +60,7 @@ module Lithic updated: Time, user_defined_status: String?, ?account_number: String?, + ?blockchain_addresses: ::Hash[Symbol, String]?, ?routing_number: String? ) -> void @@ -73,6 +77,7 @@ module Lithic updated: Time, user_defined_status: String?, account_number: String?, + blockchain_addresses: ::Hash[Symbol, String]?, routing_number: String? } diff --git a/test/lithic/resources/financial_accounts_test.rb b/test/lithic/resources/financial_accounts_test.rb index 862cf2e7..585a4580 100644 --- a/test/lithic/resources/financial_accounts_test.rb +++ b/test/lithic/resources/financial_accounts_test.rb @@ -24,6 +24,7 @@ def test_create_required_params updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -50,6 +51,7 @@ def test_retrieve updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -76,6 +78,7 @@ def test_update updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -109,6 +112,7 @@ def test_list updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -152,6 +156,7 @@ def test_update_status_required_params updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end From b520213ceec3af853f96b5ca9e8ef32a34169a0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:52:31 +0000 Subject: [PATCH 03/19] docs(api): update cvv field documentation in Card and tokenization --- .stats.yml | 4 ++-- lib/lithic/models/card.rb | 4 ++-- lib/lithic/models/tokenization_simulate_params.rb | 4 ++-- lib/lithic/resources/tokenizations.rb | 2 +- rbi/lithic/models/card.rbi | 4 ++-- rbi/lithic/models/tokenization_simulate_params.rbi | 4 ++-- rbi/lithic/resources/tokenizations.rbi | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 12c884de..fa0f5509 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-81febc26f7987ef8f74f2038dddd4799a1e77b2c64d2fe36c2c9f2eb5079476b.yml -openapi_spec_hash: 91e4b19977ca68b988862e967be57d26 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c150a226e74fdd73925fcba89261022e91a6d4f57dbb305a54063499641427ae.yml +openapi_spec_hash: 1df81bae378c3cbf265b0fb4cefa2969 config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/card.rb b/lib/lithic/models/card.rb index cf117a9b..84bc3062 100644 --- a/lib/lithic/models/card.rb +++ b/lib/lithic/models/card.rb @@ -5,7 +5,7 @@ module Models # @see Lithic::Resources::Cards#create class Card < Lithic::Models::NonPCICard # @!attribute cvv - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs # # @return [String, nil] optional :cvv, String @@ -24,7 +24,7 @@ class Card < Lithic::Models::NonPCICard # # Card details with potentially PCI sensitive information for Enterprise customers # - # @param cvv [String] Three digit cvv printed on the back of the card. + # @param cvv [String] Three or four digit CVV printed on the card. Amex cards use four digit CVVs # # @param pan [String] Primary Account Number (PAN) (i.e. the card number). Customers must be PCI compl end diff --git a/lib/lithic/models/tokenization_simulate_params.rb b/lib/lithic/models/tokenization_simulate_params.rb index ef9106f9..a8a79c02 100644 --- a/lib/lithic/models/tokenization_simulate_params.rb +++ b/lib/lithic/models/tokenization_simulate_params.rb @@ -8,7 +8,7 @@ class TokenizationSimulateParams < Lithic::Internal::Type::BaseModel include Lithic::Internal::Type::RequestParameters # @!attribute cvv - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @return [String] required :cvv, String @@ -63,7 +63,7 @@ class TokenizationSimulateParams < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::TokenizationSimulateParams} for more details. # - # @param cvv [String] The three digit cvv for the card. + # @param cvv [String] The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @param expiration_date [String] The expiration date of the card in 'MM/YY' format. # diff --git a/lib/lithic/resources/tokenizations.rb b/lib/lithic/resources/tokenizations.rb index 5ab741d8..7052a142 100644 --- a/lib/lithic/resources/tokenizations.rb +++ b/lib/lithic/resources/tokenizations.rb @@ -190,7 +190,7 @@ def resend_activation_code(tokenization_token, params = {}) # # @overload simulate(cvv:, expiration_date:, pan:, tokenization_source:, account_score: nil, device_score: nil, entity: nil, wallet_recommended_decision: nil, request_options: {}) # - # @param cvv [String] The three digit cvv for the card. + # @param cvv [String] The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @param expiration_date [String] The expiration date of the card in 'MM/YY' format. # diff --git a/rbi/lithic/models/card.rbi b/rbi/lithic/models/card.rbi index 61acefb0..8717c308 100644 --- a/rbi/lithic/models/card.rbi +++ b/rbi/lithic/models/card.rbi @@ -5,7 +5,7 @@ module Lithic class Card < Lithic::Models::NonPCICard OrHash = T.type_alias { T.any(Lithic::Card, Lithic::Internal::AnyHash) } - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs sig { returns(T.nilable(String)) } attr_reader :cvv @@ -24,7 +24,7 @@ module Lithic # Card details with potentially PCI sensitive information for Enterprise customers sig { params(cvv: String, pan: String).returns(T.attached_class) } def self.new( - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs cvv: nil, # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI # compliant to have PAN returned as a field in production. Please contact diff --git a/rbi/lithic/models/tokenization_simulate_params.rbi b/rbi/lithic/models/tokenization_simulate_params.rbi index b56b7e96..7f3f0179 100644 --- a/rbi/lithic/models/tokenization_simulate_params.rbi +++ b/rbi/lithic/models/tokenization_simulate_params.rbi @@ -11,7 +11,7 @@ module Lithic T.any(Lithic::TokenizationSimulateParams, Lithic::Internal::AnyHash) end - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. sig { returns(String) } attr_accessor :cvv @@ -89,7 +89,7 @@ module Lithic ).returns(T.attached_class) end def self.new( - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. cvv:, # The expiration date of the card in 'MM/YY' format. expiration_date:, diff --git a/rbi/lithic/resources/tokenizations.rbi b/rbi/lithic/resources/tokenizations.rbi index 12d04ff9..79a48c69 100644 --- a/rbi/lithic/resources/tokenizations.rbi +++ b/rbi/lithic/resources/tokenizations.rbi @@ -167,7 +167,7 @@ module Lithic ).returns(Lithic::Tokenization) end def simulate( - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. cvv:, # The expiration date of the card in 'MM/YY' format. expiration_date:, From 2f1fbca332e111e3624d834a774db3f7d979f4a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 23:24:43 +0000 Subject: [PATCH 04/19] feat(api): add stablecoin event types to payment/financial_event/statement_line_items --- .stats.yml | 4 +- lib/lithic/models/financial_account.rb | 3 +- .../statements/statement_line_items.rb | 3 + lib/lithic/models/financial_event.rb | 3 + lib/lithic/models/payment.rb | 31 ++++++++-- rbi/lithic/models/financial_account.rbi | 6 +- .../statements/statement_line_items.rbi | 15 +++++ rbi/lithic/models/financial_event.rbi | 12 ++++ rbi/lithic/models/payment.rbi | 56 ++++++++++++++++--- .../statements/statement_line_items.rbs | 6 ++ sig/lithic/models/financial_event.rbs | 6 ++ sig/lithic/models/payment.rbs | 6 ++ 12 files changed, 133 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index fa0f5509..7149eb0d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c150a226e74fdd73925fcba89261022e91a6d4f57dbb305a54063499641427ae.yml -openapi_spec_hash: 1df81bae378c3cbf265b0fb4cefa2969 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-4ea61aa22fa852629c506efa84f633535d32a7133bdf3ae2d09040d2fb6caeb2.yml +openapi_spec_hash: 76c21b84082530356fe45eed27e84cfe config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/financial_account.rb b/lib/lithic/models/financial_account.rb index 2dc28bf5..2db52b0d 100644 --- a/lib/lithic/models/financial_account.rb +++ b/lib/lithic/models/financial_account.rb @@ -71,7 +71,8 @@ class FinancialAccount < Lithic::Internal::Type::BaseModel # @!attribute blockchain_addresses # Provisioned blockchain deposit addresses for this financial account, keyed by - # the blockchain network that each address belongs to + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) # # @return [Hash{Symbol=>String}, nil] optional :blockchain_addresses, Lithic::Internal::Type::HashOf[String], nil?: true diff --git a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb index 3041c2ff..5023e2b2 100644 --- a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +++ b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb @@ -272,8 +272,11 @@ module EventType MONTHLY_REVERSAL = :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_event.rb b/lib/lithic/models/financial_event.rb index 2dadb051..1e111999 100644 --- a/lib/lithic/models/financial_event.rb +++ b/lib/lithic/models/financial_event.rb @@ -159,8 +159,11 @@ module Type MONTHLY_REVERSAL = :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index 99d200f1..04a1be97 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -327,8 +327,16 @@ class Event < Lithic::Internal::Type::BaseModel # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. # # @return [Symbol, Lithic::Models::Payment::Event::Type] required :type, enum: -> { Lithic::Payment::Event::Type } @@ -343,7 +351,9 @@ class Event < Lithic::Internal::Type::BaseModel # @!attribute external_id # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. # # @return [String, nil] optional :external_id, String, nil?: true @@ -443,8 +453,16 @@ module Result # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. # # @see Lithic::Models::Payment::Event#type module Type @@ -473,8 +491,11 @@ module Type WIRE_RETURN_OUTBOUND_SETTLED = :WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED = :WIRE_RETURN_OUTBOUND_REJECTED STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] diff --git a/rbi/lithic/models/financial_account.rbi b/rbi/lithic/models/financial_account.rbi index ba66ebf0..421ac2ac 100644 --- a/rbi/lithic/models/financial_account.rbi +++ b/rbi/lithic/models/financial_account.rbi @@ -60,7 +60,8 @@ module Lithic attr_accessor :account_number # Provisioned blockchain deposit addresses for this financial account, keyed by - # the blockchain network that each address belongs to + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) sig { returns(T.nilable(T::Hash[Symbol, String])) } attr_accessor :blockchain_addresses @@ -105,7 +106,8 @@ module Lithic user_defined_status:, account_number: nil, # Provisioned blockchain deposit addresses for this financial account, keyed by - # the blockchain network that each address belongs to + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) blockchain_addresses: nil, routing_number: nil ) diff --git a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi index 6a526d5a..d170987e 100644 --- a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +++ b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi @@ -822,16 +822,31 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_SENT = + T.let( + :STABLECOIN_SENT, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) STABLECOIN_SETTLED = T.let( :STABLECOIN_SETTLED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_event.rbi b/rbi/lithic/models/financial_event.rbi index 3b74a113..7de815e5 100644 --- a/rbi/lithic/models/financial_event.rbi +++ b/rbi/lithic/models/financial_event.rbi @@ -474,13 +474,25 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::FinancialEvent::Type::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::FinancialEvent::Type::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::FinancialEvent::Type::TaggedSymbol ) + STABLECOIN_SENT = + T.let(:STABLECOIN_SENT, Lithic::FinancialEvent::Type::TaggedSymbol) STABLECOIN_SETTLED = T.let(:STABLECOIN_SETTLED, Lithic::FinancialEvent::Type::TaggedSymbol) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::FinancialEvent::Type::TaggedSymbol + ) sig do override.returns(T::Array[Lithic::FinancialEvent::Type::TaggedSymbol]) diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 85121151..60b0629b 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -387,8 +387,16 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. sig { returns(Lithic::Payment::Event::Type::TaggedSymbol) } attr_accessor :type @@ -412,7 +420,9 @@ module Lithic # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. sig { returns(T.nilable(String)) } attr_accessor :external_id @@ -501,14 +511,24 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. type:, # More detailed reasons for the event detailed_results: nil, # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. external_id: nil ) end @@ -610,8 +630,16 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. module Type extend Lithic::Internal::Type::Enum @@ -734,16 +762,28 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::Payment::Event::Type::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_SENT = + T.let(:STABLECOIN_SENT, Lithic::Payment::Event::Type::TaggedSymbol) STABLECOIN_SETTLED = T.let( :STABLECOIN_SETTLED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::Payment::Event::Type::TaggedSymbol + ) sig do override.returns( diff --git a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs index 68bfec54..fb3bac8e 100644 --- a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +++ b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs @@ -257,8 +257,11 @@ module Lithic | :MONTHLY_REVERSAL | :ACCOUNT_TO_ACCOUNT | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module EventType extend Lithic::Internal::Type::Enum @@ -354,8 +357,11 @@ module Lithic MONTHLY_REVERSAL: :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::event_type] end diff --git a/sig/lithic/models/financial_event.rbs b/sig/lithic/models/financial_event.rbs index 325179cc..a5f3e9ca 100644 --- a/sig/lithic/models/financial_event.rbs +++ b/sig/lithic/models/financial_event.rbs @@ -153,8 +153,11 @@ module Lithic | :MONTHLY_REVERSAL | :ACCOUNT_TO_ACCOUNT | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module Type extend Lithic::Internal::Type::Enum @@ -250,8 +253,11 @@ module Lithic MONTHLY_REVERSAL: :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::FinancialEvent::type_] end diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index a5f55aa8..973f325c 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -287,8 +287,11 @@ module Lithic | :WIRE_RETURN_OUTBOUND_SETTLED | :WIRE_RETURN_OUTBOUND_REJECTED | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module Type extend Lithic::Internal::Type::Enum @@ -316,8 +319,11 @@ module Lithic WIRE_RETURN_OUTBOUND_SETTLED: :WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED: :WIRE_RETURN_OUTBOUND_REJECTED STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::Payment::Event::type_] end From 15206930f871b13afd3852083c6bf778a83e6eb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 08:31:06 +0000 Subject: [PATCH 05/19] feat(api): add PROGRAM scope to auth rules, FINANCIAL_ACCOUNT/PROGRAM to case_entity --- .stats.yml | 4 +-- .../auth_rules/ach_payment_update_action.rb | 1 + .../card_transaction_update_action.rb | 1 + .../auth_rules/v2_list_results_response.rb | 2 ++ .../transaction_monitoring/case_entity.rb | 17 +++++++--- .../case_list_params.rb | 6 ++-- .../resources/transaction_monitoring/cases.rb | 2 +- .../auth_rules/ach_payment_update_action.rbi | 5 +++ .../card_transaction_update_action.rbi | 5 +++ .../auth_rules/v2_list_results_response.rbi | 10 ++++++ .../transaction_monitoring/case_entity.rbi | 32 ++++++++++++++++--- .../case_list_params.rbi | 8 +++-- .../transaction_monitoring/cases.rbi | 4 ++- .../auth_rules/ach_payment_update_action.rbs | 3 +- .../card_transaction_update_action.rbs | 3 +- .../auth_rules/v2_list_results_response.rbs | 6 ++-- .../transaction_monitoring/case_entity.rbs | 12 ++++--- 17 files changed, 95 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7149eb0d..a5ccef8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-4ea61aa22fa852629c506efa84f633535d32a7133bdf3ae2d09040d2fb6caeb2.yml -openapi_spec_hash: 76c21b84082530356fe45eed27e84cfe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c0289201680f9b61dd0d9887f88dfb7d0f6bc99d2d04fb93a2350d3ce96a3591.yml +openapi_spec_hash: dd5295389b7ef07182cc6ad20310a05b config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/auth_rules/ach_payment_update_action.rb b/lib/lithic/models/auth_rules/ach_payment_update_action.rb index 1a8e7528..2d99f5e1 100644 --- a/lib/lithic/models/auth_rules/ach_payment_update_action.rb +++ b/lib/lithic/models/auth_rules/ach_payment_update_action.rb @@ -82,6 +82,7 @@ module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/card_transaction_update_action.rb b/lib/lithic/models/auth_rules/card_transaction_update_action.rb index 774eaa3d..419ff35a 100644 --- a/lib/lithic/models/auth_rules/card_transaction_update_action.rb +++ b/lib/lithic/models/auth_rules/card_transaction_update_action.rb @@ -83,6 +83,7 @@ module Scope CARD = :CARD ACCOUNT = :ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb index 7c4bf805..f5721d2f 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_response.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -1059,6 +1059,7 @@ module Scope CARD = :CARD ACCOUNT = :ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] @@ -1269,6 +1270,7 @@ module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/transaction_monitoring/case_entity.rb b/lib/lithic/models/transaction_monitoring/case_entity.rb index c81e36f6..97589445 100644 --- a/lib/lithic/models/transaction_monitoring/case_entity.rb +++ b/lib/lithic/models/transaction_monitoring/case_entity.rb @@ -5,16 +5,21 @@ module Models module TransactionMonitoring class CaseEntity < Lithic::Internal::Type::BaseModel # @!attribute entity_token - # Globally unique identifier for the associated entity + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity # - # @return [String] - required :entity_token, String + # @return [String, nil] + required :entity_token, String, nil?: true # @!attribute entity_type # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program # # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] required :entity_type, enum: -> { Lithic::TransactionMonitoring::CaseEntity::EntityType } @@ -25,7 +30,7 @@ class CaseEntity < Lithic::Internal::Type::BaseModel # # The entity a case is associated with # - # @param entity_token [String] Globally unique identifier for the associated entity + # @param entity_token [String, nil] Globally unique identifier for the associated entity: the card token for `CARD`, # # @param entity_type [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] The type of entity a case is associated with: @@ -33,6 +38,8 @@ class CaseEntity < Lithic::Internal::Type::BaseModel # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program # # @see Lithic::Models::TransactionMonitoring::CaseEntity#entity_type module EntityType @@ -40,6 +47,8 @@ module EntityType CARD = :CARD ACCOUNT = :ACCOUNT + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/transaction_monitoring/case_list_params.rb b/lib/lithic/models/transaction_monitoring/case_list_params.rb index 95045da2..f28f309e 100644 --- a/lib/lithic/models/transaction_monitoring/case_list_params.rb +++ b/lib/lithic/models/transaction_monitoring/case_list_params.rb @@ -49,7 +49,9 @@ class CaseListParams < Lithic::Internal::Type::BaseModel optional :ending_before, String # @!attribute entity_token - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. # # @return [String, nil] optional :entity_token, String @@ -113,7 +115,7 @@ class CaseListParams < Lithic::Internal::Type::BaseModel # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param entity_token [String] Only return cases associated with the provided entity. + # @param entity_token [String] Only return cases associated with the provided entity. Accepts a card, account, # # @param page_size [Integer] Page size (for pagination). # diff --git a/lib/lithic/resources/transaction_monitoring/cases.rb b/lib/lithic/resources/transaction_monitoring/cases.rb index 3aabab5c..1b5c4960 100644 --- a/lib/lithic/resources/transaction_monitoring/cases.rb +++ b/lib/lithic/resources/transaction_monitoring/cases.rb @@ -92,7 +92,7 @@ def update(case_token, params = {}) # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param entity_token [String] Only return cases associated with the provided entity. + # @param entity_token [String] Only return cases associated with the provided entity. Accepts a card, account, # # @param page_size [Integer] Page size (for pagination). # diff --git a/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi index acb88ec5..f1a212d9 100644 --- a/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi +++ b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi @@ -181,6 +181,11 @@ module Lithic :FINANCIAL_ACCOUNT, Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi index 9801b902..53104e00 100644 --- a/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +++ b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi @@ -186,6 +186,11 @@ module Lithic :ACCOUNT, Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi index 801431f6..e8df13df 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -2594,6 +2594,11 @@ module Lithic :ACCOUNT, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( @@ -3003,6 +3008,11 @@ module Lithic :FINANCIAL_ACCOUNT, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/transaction_monitoring/case_entity.rbi b/rbi/lithic/models/transaction_monitoring/case_entity.rbi index 0c6f5690..c04f09a2 100644 --- a/rbi/lithic/models/transaction_monitoring/case_entity.rbi +++ b/rbi/lithic/models/transaction_monitoring/case_entity.rbi @@ -12,14 +12,19 @@ module Lithic ) end - # Globally unique identifier for the associated entity - sig { returns(String) } + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity + sig { returns(T.nilable(String)) } attr_accessor :entity_token # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program sig do returns( Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol @@ -30,18 +35,23 @@ module Lithic # The entity a case is associated with sig do params( - entity_token: String, + entity_token: T.nilable(String), entity_type: Lithic::TransactionMonitoring::CaseEntity::EntityType::OrSymbol ).returns(T.attached_class) end def self.new( - # Globally unique identifier for the associated entity + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity entity_token:, # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program entity_type: ) end @@ -49,7 +59,7 @@ module Lithic sig do override.returns( { - entity_token: String, + entity_token: T.nilable(String), entity_type: Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol } @@ -62,6 +72,8 @@ module Lithic # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program module EntityType extend Lithic::Internal::Type::Enum @@ -84,6 +96,16 @@ module Lithic :ACCOUNT, Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol ) + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/transaction_monitoring/case_list_params.rbi b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi index d917f0d9..0d5c2fac 100644 --- a/rbi/lithic/models/transaction_monitoring/case_list_params.rbi +++ b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi @@ -61,7 +61,9 @@ module Lithic sig { params(ending_before: String).void } attr_writer :ending_before - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. sig { returns(T.nilable(String)) } attr_reader :entity_token @@ -170,7 +172,9 @@ module Lithic # A cursor representing an item's token before which a page of results should end. # Used to retrieve the previous page of results before this item. ending_before: nil, - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. entity_token: nil, # Page size (for pagination). page_size: nil, diff --git a/rbi/lithic/resources/transaction_monitoring/cases.rbi b/rbi/lithic/resources/transaction_monitoring/cases.rbi index 830b7f50..ed0487f8 100644 --- a/rbi/lithic/resources/transaction_monitoring/cases.rbi +++ b/rbi/lithic/resources/transaction_monitoring/cases.rbi @@ -120,7 +120,9 @@ module Lithic # A cursor representing an item's token before which a page of results should end. # Used to retrieve the previous page of results before this item. ending_before: nil, - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. entity_token: nil, # Page size (for pagination). page_size: nil, diff --git a/sig/lithic/models/auth_rules/ach_payment_update_action.rbs b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs index 6eb6d71c..5e6079e3 100644 --- a/sig/lithic/models/auth_rules/ach_payment_update_action.rbs +++ b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs @@ -71,12 +71,13 @@ module Lithic type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ } - type scope = :FINANCIAL_ACCOUNT + type scope = :FINANCIAL_ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope] end diff --git a/sig/lithic/models/auth_rules/card_transaction_update_action.rbs b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs index 70f2af02..2224c556 100644 --- a/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +++ b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs @@ -71,13 +71,14 @@ module Lithic type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ } - type scope = :CARD | :ACCOUNT + type scope = :CARD | :ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope] end diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs index c6cee1d6..dd15bb09 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_response.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -1078,13 +1078,14 @@ module Lithic explanation: String } - type scope = :CARD | :ACCOUNT + type scope = :CARD | :ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope] end @@ -1255,12 +1256,13 @@ module Lithic explanation: String } - type scope = :FINANCIAL_ACCOUNT + type scope = :FINANCIAL_ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope] end diff --git a/sig/lithic/models/transaction_monitoring/case_entity.rbs b/sig/lithic/models/transaction_monitoring/case_entity.rbs index 5e13dc88..2fdb0473 100644 --- a/sig/lithic/models/transaction_monitoring/case_entity.rbs +++ b/sig/lithic/models/transaction_monitoring/case_entity.rbs @@ -3,32 +3,34 @@ module Lithic module TransactionMonitoring type case_entity = { - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type } class CaseEntity < Lithic::Internal::Type::BaseModel - attr_accessor entity_token: String + attr_accessor entity_token: String? attr_accessor entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type def initialize: ( - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type ) -> void def to_hash: -> { - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type } - type entity_type = :CARD | :ACCOUNT + type entity_type = :CARD | :ACCOUNT | :FINANCIAL_ACCOUNT | :PROGRAM module EntityType extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::CaseEntity::entity_type] end From 5151e5d6276054b59f41d32af07efae6badabcbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:02:59 +0000 Subject: [PATCH 06/19] feat(api): add STABLECOIN enum value to payment type --- .stats.yml | 4 ++-- lib/lithic/models/payment.rb | 1 + rbi/lithic/models/payment.rbi | 1 + sig/lithic/models/payment.rbs | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5ccef8d..4f5b5f06 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c0289201680f9b61dd0d9887f88dfb7d0f6bc99d2d04fb93a2350d3ce96a3591.yml -openapi_spec_hash: dd5295389b7ef07182cc6ad20310a05b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9c9038d362c6a423011de6cfe5bf4a93ca2ea6e6991327583c4dcc47ceb8d7e3.yml +openapi_spec_hash: c2acf17ac5eb3d9e11f86c57a0af3cb3 config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index 04a1be97..a5007163 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -796,6 +796,7 @@ module Type WIRE_OUTBOUND_PAYMENT = :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST + STABLECOIN = :STABLECOIN # @!method self.values # @return [Array] diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 60b0629b..a5ba66e0 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -1310,6 +1310,7 @@ module Lithic :WIRE_INBOUND_DRAWDOWN_REQUEST, Lithic::Payment::Type::TaggedSymbol ) + STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Type::TaggedSymbol) sig { override.returns(T::Array[Lithic::Payment::Type::TaggedSymbol]) } def self.values diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index 973f325c..416ccc2d 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -578,6 +578,7 @@ module Lithic | :WIRE_OUTBOUND_PAYMENT | :WIRE_OUTBOUND_ADMIN | :WIRE_INBOUND_DRAWDOWN_REQUEST + | :STABLECOIN module Type extend Lithic::Internal::Type::Enum @@ -591,6 +592,7 @@ module Lithic WIRE_OUTBOUND_PAYMENT: :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN: :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST: :WIRE_INBOUND_DRAWDOWN_REQUEST + STABLECOIN: :STABLECOIN def self?.values: -> ::Array[Lithic::Models::Payment::type_] end From 07799e84d4c7e32e0f4b623e17960c14753802ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:32:37 +0000 Subject: [PATCH 07/19] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f5b5f06..e428cbd8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9c9038d362c6a423011de6cfe5bf4a93ca2ea6e6991327583c4dcc47ceb8d7e3.yml -openapi_spec_hash: c2acf17ac5eb3d9e11f86c57a0af3cb3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-fded34f73c5a63b9a5796a375e1dd8864051c14a1bd0123c8084554ffb2889bb.yml +openapi_spec_hash: 4b64ebb958ea2ef8e7e20f564a5f30ed config_hash: 337a99d8cc30006358b7bc2531401669 From 80e026ae4b67579db63140dcaa70c44409b47b83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 14:10:22 +0000 Subject: [PATCH 08/19] feat(api): add stablecoin payment method type to payments --- .stats.yml | 4 +-- lib/lithic/models/payment.rb | 33 +++++++++++++++++++++--- rbi/lithic/models/payment.rbi | 48 +++++++++++++++++++++++++++++++++-- sig/lithic/models/payment.rbs | 17 ++++++++++++- 4 files changed, 94 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index e428cbd8..db7728c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-fded34f73c5a63b9a5796a375e1dd8864051c14a1bd0123c8084554ffb2889bb.yml -openapi_spec_hash: 4b64ebb958ea2ef8e7e20f564a5f30ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0a244b9dc934ff683c683f6b8fc053d923ffd40fcd32516e2fc79f36b7f61395.yml +openapi_spec_hash: c0c04c03b24b8baecd070e9faf7dccbd config_hash: 337a99d8cc30006358b7bc2531401669 diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index a5007163..4f16ee32 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -61,7 +61,7 @@ class Payment < Lithic::Internal::Type::BaseModel # @!attribute method_attributes # Method-specific attributes # - # @return [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes] + # @return [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes] required :method_attributes, union: -> { Lithic::Payment::MethodAttributes } # @!attribute pending_amount @@ -164,7 +164,7 @@ class Payment < Lithic::Internal::Type::BaseModel # # @param method_ [Symbol, Lithic::Models::Payment::Method] Transfer method # - # @param method_attributes [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes] Method-specific attributes + # @param method_attributes [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes] Method-specific attributes # # @param pending_amount [Integer] Pending amount in cents # @@ -526,6 +526,7 @@ module Method ACH_NEXT_DAY = :ACH_NEXT_DAY ACH_SAME_DAY = :ACH_SAME_DAY WIRE = :WIRE + STABLECOIN = :STABLECOIN # @!method self.values # @return [Array] @@ -541,6 +542,8 @@ module MethodAttributes variant -> { Lithic::Payment::MethodAttributes::WireMethodAttributes } + variant -> { Lithic::Payment::MethodAttributes::StablecoinMethodAttributes } + class ACHMethodAttributes < Lithic::Internal::Type::BaseModel # @!attribute sec_code # SEC code for ACH transaction @@ -713,8 +716,32 @@ module WireNetwork end end + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + # @!attribute chain + # Blockchain the stablecoin transfer settled on + # + # @return [String] + required :chain, String + + # @!attribute transaction_hash + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + # + # @return [String, nil] + optional :transaction_hash, String, nil?: true + + # @!method initialize(chain:, transaction_hash: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes} for more + # details. + # + # @param chain [String] Blockchain the stablecoin transfer settled on + # + # @param transaction_hash [String, nil] On-chain transaction hash of the transfer. Null until the transfer has settled o + end + # @!method self.variants - # @return [Array(Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes)] + # @return [Array(Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes)] end # @see Lithic::Models::Payment#related_account_tokens diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index a5ba66e0..b9b6b83c 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -129,7 +129,8 @@ module Lithic method_attributes: T.any( Lithic::Payment::MethodAttributes::ACHMethodAttributes::OrHash, - Lithic::Payment::MethodAttributes::WireMethodAttributes::OrHash + Lithic::Payment::MethodAttributes::WireMethodAttributes::OrHash, + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes::OrHash ), pending_amount: Integer, related_account_tokens: @@ -861,6 +862,7 @@ module Lithic ACH_SAME_DAY = T.let(:ACH_SAME_DAY, Lithic::Payment::Method::TaggedSymbol) WIRE = T.let(:WIRE, Lithic::Payment::Method::TaggedSymbol) + STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Method::TaggedSymbol) sig do override.returns(T::Array[Lithic::Payment::Method::TaggedSymbol]) @@ -877,7 +879,8 @@ module Lithic T.type_alias do T.any( Lithic::Payment::MethodAttributes::ACHMethodAttributes, - Lithic::Payment::MethodAttributes::WireMethodAttributes + Lithic::Payment::MethodAttributes::WireMethodAttributes, + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes ) end @@ -1174,6 +1177,47 @@ module Lithic end end + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes, + Lithic::Internal::AnyHash + ) + end + + # Blockchain the stablecoin transfer settled on + sig { returns(String) } + attr_accessor :chain + + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + sig { returns(T.nilable(String)) } + attr_accessor :transaction_hash + + sig do + params(chain: String, transaction_hash: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # Blockchain the stablecoin transfer settled on + chain:, + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + transaction_hash: nil + ) + end + + sig do + override.returns( + { chain: String, transaction_hash: T.nilable(String) } + ) + end + def to_hash + end + end + sig do override.returns( T::Array[Lithic::Payment::MethodAttributes::Variants] diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index 416ccc2d..f5dfedaf 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -352,7 +352,7 @@ module Lithic end end - type method_ = :ACH_NEXT_DAY | :ACH_SAME_DAY | :WIRE + type method_ = :ACH_NEXT_DAY | :ACH_SAME_DAY | :WIRE | :STABLECOIN module Method extend Lithic::Internal::Type::Enum @@ -360,6 +360,7 @@ module Lithic ACH_NEXT_DAY: :ACH_NEXT_DAY ACH_SAME_DAY: :ACH_SAME_DAY WIRE: :WIRE + STABLECOIN: :STABLECOIN def self?.values: -> ::Array[Lithic::Models::Payment::method_] end @@ -367,6 +368,7 @@ module Lithic type method_attributes = Lithic::Payment::MethodAttributes::ACHMethodAttributes | Lithic::Payment::MethodAttributes::WireMethodAttributes + | Lithic::Payment::MethodAttributes::StablecoinMethodAttributes module MethodAttributes extend Lithic::Internal::Type::Union @@ -507,6 +509,19 @@ module Lithic end end + type stablecoin_method_attributes = + { chain: String, transaction_hash: String? } + + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + attr_accessor chain: String + + attr_accessor transaction_hash: String? + + def initialize: (chain: String, ?transaction_hash: String?) -> void + + def to_hash: -> { chain: String, transaction_hash: String? } + end + def self?.variants: -> ::Array[Lithic::Models::Payment::method_attributes] end From 437d5226c1c6b1dfd8faaa70787e8b2ea533f14a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 20:51:39 +0000 Subject: [PATCH 09/19] feat(api): add blockchain_recipients resource --- .stats.yml | 8 +- lib/lithic.rb | 3 + lib/lithic/client.rb | 4 + lib/lithic/models.rb | 4 + lib/lithic/models/blockchain_recipient.rb | 147 +++++++++++++ .../blockchain_recipient_create_params.rb | 74 +++++++ lib/lithic/resources/blockchain_recipients.rb | 57 +++++ rbi/lithic/client.rbi | 3 + rbi/lithic/models.rbi | 5 + rbi/lithic/models/blockchain_recipient.rbi | 207 ++++++++++++++++++ .../blockchain_recipient_create_params.rbi | 102 +++++++++ .../resources/blockchain_recipients.rbi | 51 +++++ sig/lithic/client.rbs | 2 + sig/lithic/models.rbs | 4 + sig/lithic/models/blockchain_recipient.rbs | 106 +++++++++ .../blockchain_recipient_create_params.rbs | 60 +++++ .../resources/blockchain_recipients.rbs | 18 ++ .../resources/blockchain_recipients_test.rb | 38 ++++ 18 files changed, 889 insertions(+), 4 deletions(-) create mode 100644 lib/lithic/models/blockchain_recipient.rb create mode 100644 lib/lithic/models/blockchain_recipient_create_params.rb create mode 100644 lib/lithic/resources/blockchain_recipients.rb create mode 100644 rbi/lithic/models/blockchain_recipient.rbi create mode 100644 rbi/lithic/models/blockchain_recipient_create_params.rbi create mode 100644 rbi/lithic/resources/blockchain_recipients.rbi create mode 100644 sig/lithic/models/blockchain_recipient.rbs create mode 100644 sig/lithic/models/blockchain_recipient_create_params.rbs create mode 100644 sig/lithic/resources/blockchain_recipients.rbs create mode 100644 test/lithic/resources/blockchain_recipients_test.rb diff --git a/.stats.yml b/.stats.yml index db7728c7..2f38062b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0a244b9dc934ff683c683f6b8fc053d923ffd40fcd32516e2fc79f36b7f61395.yml -openapi_spec_hash: c0c04c03b24b8baecd070e9faf7dccbd -config_hash: 337a99d8cc30006358b7bc2531401669 +configured_endpoints: 215 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c20cf1ee200fdf3f08472f48b563bab3dcad9452cd92b88b7f7fe079c9316745.yml +openapi_spec_hash: 51e1cb45ee5d65dd02635946d53ef94f +config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic.rb b/lib/lithic.rb index 5a390511..79f7a288 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -167,6 +167,8 @@ require_relative "lithic/models/balance" require_relative "lithic/models/balance_list_params" require_relative "lithic/models/balance_updated_webhook_event" +require_relative "lithic/models/blockchain_recipient" +require_relative "lithic/models/blockchain_recipient_create_params" require_relative "lithic/models/book_transfer_create_params" require_relative "lithic/models/book_transfer_list_params" require_relative "lithic/models/book_transfer_retrieve_params" @@ -523,6 +525,7 @@ require_relative "lithic/resources/auth_rules/v2/backtests" require_relative "lithic/resources/auth_stream_enrollment" require_relative "lithic/resources/balances" +require_relative "lithic/resources/blockchain_recipients" require_relative "lithic/resources/book_transfers" require_relative "lithic/resources/card_authorizations" require_relative "lithic/resources/card_bulk_orders" diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index a6e1ea35..4aa7b80b 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -83,6 +83,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [Lithic::Resources::ExternalBankAccounts] attr_reader :external_bank_accounts + # @return [Lithic::Resources::BlockchainRecipients] + attr_reader :blockchain_recipients + # @return [Lithic::Resources::Payments] attr_reader :payments @@ -240,6 +243,7 @@ def initialize( @transactions = Lithic::Resources::Transactions.new(client: self) @responder_endpoints = Lithic::Resources::ResponderEndpoints.new(client: self) @external_bank_accounts = Lithic::Resources::ExternalBankAccounts.new(client: self) + @blockchain_recipients = Lithic::Resources::BlockchainRecipients.new(client: self) @payments = Lithic::Resources::Payments.new(client: self) @three_ds = Lithic::Resources::ThreeDS.new(client: self) @reports = Lithic::Resources::Reports.new(client: self) diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 5f573ad8..e942c266 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -112,6 +112,10 @@ module Lithic BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + BlockchainRecipient = Lithic::Models::BlockchainRecipient + + BlockchainRecipientCreateParams = Lithic::Models::BlockchainRecipientCreateParams + BookTransferCreateParams = Lithic::Models::BookTransferCreateParams BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/lib/lithic/models/blockchain_recipient.rb b/lib/lithic/models/blockchain_recipient.rb new file mode 100644 index 00000000..be3aae98 --- /dev/null +++ b/lib/lithic/models/blockchain_recipient.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::BlockchainRecipients#create + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + # @!attribute token + # A globally unique identifier for this blockchain recipient + # + # @return [String] + required :token, String + + # @!attribute account_token + # The financial account the blockchain recipient belongs to + # + # @return [String] + required :account_token, String + + # @!attribute address_tag + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + # + # @return [String, nil] + required :address_tag, String, nil?: true + + # @!attribute chain + # The blockchain network that the address belongs to + # + # @return [String] + required :chain, String + + # @!attribute created + # An ISO 8601 string representing when this blockchain recipient was created + # + # @return [Time] + required :created, Time + + # @!attribute external_id + # The identifier the recipient is registered under with the payment provider + # + # @return [String, nil] + required :external_id, String, nil?: true + + # @!attribute name + # The nickname for this blockchain recipient + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute owner + # Legal name of the business or individual who owns the blockchain address + # + # @return [String] + required :owner, String + + # @!attribute owner_type + # Owner Type + # + # @return [Symbol, Lithic::Models::OwnerType] + required :owner_type, enum: -> { Lithic::OwnerType } + + # @!attribute program_id + # Globally unique identifier for the program the blockchain recipient is + # associated with + # + # @return [String] + required :program_id, String + + # @!attribute state + # Account State + # + # @return [Symbol, Lithic::Models::BlockchainRecipient::State] + required :state, enum: -> { Lithic::BlockchainRecipient::State } + + # @!attribute updated + # An ISO 8601 string representing when this blockchain recipient was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute verification_state + # Verification State + # + # @return [Symbol, Lithic::Models::BlockchainRecipient::VerificationState] + required :verification_state, enum: -> { Lithic::BlockchainRecipient::VerificationState } + + # @!method initialize(token:, account_token:, address_tag:, chain:, created:, external_id:, name:, owner:, owner_type:, program_id:, state:, updated:, verification_state:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipient} for more details. + # + # @param token [String] A globally unique identifier for this blockchain recipient + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address_tag [String, nil] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param created [Time] An ISO 8601 string representing when this blockchain recipient was created + # + # @param external_id [String, nil] The identifier the recipient is registered under with the payment provider + # + # @param name [String, nil] The nickname for this blockchain recipient + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param program_id [String] Globally unique identifier for the program the blockchain recipient is associate + # + # @param state [Symbol, Lithic::Models::BlockchainRecipient::State] Account State + # + # @param updated [Time] An ISO 8601 string representing when this blockchain recipient was last updated + # + # @param verification_state [Symbol, Lithic::Models::BlockchainRecipient::VerificationState] Verification State + + # Account State + # + # @see Lithic::Models::BlockchainRecipient#state + module State + extend Lithic::Internal::Type::Enum + + ENABLED = :ENABLED + CLOSED = :CLOSED + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + + # Verification State + # + # @see Lithic::Models::BlockchainRecipient#verification_state + module VerificationState + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + ENABLED = :ENABLED + FAILED_VERIFICATION = :FAILED_VERIFICATION + INSUFFICIENT_FUNDS = :INSUFFICIENT_FUNDS + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/blockchain_recipient_create_params.rb b/lib/lithic/models/blockchain_recipient_create_params.rb new file mode 100644 index 00000000..95fe5e98 --- /dev/null +++ b/lib/lithic/models/blockchain_recipient_create_params.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::BlockchainRecipients#create + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute account_token + # The financial account the blockchain recipient belongs to + # + # @return [String] + required :account_token, String + + # @!attribute address + # The blockchain address funds will be withdrawn to + # + # @return [String] + required :address, String + + # @!attribute chain + # The blockchain network that the address belongs to + # + # @return [String] + required :chain, String + + # @!attribute owner + # Legal name of the business or individual who owns the blockchain address + # + # @return [String] + required :owner, String + + # @!attribute owner_type + # Owner Type + # + # @return [Symbol, Lithic::Models::OwnerType] + required :owner_type, enum: -> { Lithic::OwnerType } + + # @!attribute address_tag + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + # + # @return [String, nil] + optional :address_tag, String + + # @!attribute name + # The nickname for this blockchain recipient + # + # @return [String, nil] + optional :name, String + + # @!method initialize(account_token:, address:, chain:, owner:, owner_type:, address_tag: nil, name: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipientCreateParams} for more details. + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address [String] The blockchain address funds will be withdrawn to + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param address_tag [String] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param name [String] The nickname for this blockchain recipient + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/resources/blockchain_recipients.rb b/lib/lithic/resources/blockchain_recipients.rb new file mode 100644 index 00000000..e44883c4 --- /dev/null +++ b/lib/lithic/resources/blockchain_recipients.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class BlockchainRecipients + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipientCreateParams} for more details. + # + # Register a blockchain address as a withdrawal destination for a financial + # account + # + # The recipient is created with a `PENDING` verification state and cannot receive + # a payout until screening of the address completes. Registering an address that + # is already registered to the same financial account returns the existing + # recipient and its current verification state, rather than creating a second one + # + # @overload create(account_token:, address:, chain:, owner:, owner_type:, address_tag: nil, name: nil, request_options: {}) + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address [String] The blockchain address funds will be withdrawn to + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param address_tag [String] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param name [String] The nickname for this blockchain recipient + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::BlockchainRecipient] + # + # @see Lithic::Models::BlockchainRecipientCreateParams + def create(params) + parsed, options = Lithic::BlockchainRecipientCreateParams.dump_request(params) + @client.request( + method: :post, + path: "v1/blockchain_recipients", + body: parsed, + model: Lithic::BlockchainRecipient, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/rbi/lithic/client.rbi b/rbi/lithic/client.rbi index 3ec35230..39761f9b 100644 --- a/rbi/lithic/client.rbi +++ b/rbi/lithic/client.rbi @@ -82,6 +82,9 @@ module Lithic sig { returns(Lithic::Resources::ExternalBankAccounts) } attr_reader :external_bank_accounts + sig { returns(Lithic::Resources::BlockchainRecipients) } + attr_reader :blockchain_recipients + sig { returns(Lithic::Resources::Payments) } attr_reader :payments diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 7a10292c..80bceebc 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -87,6 +87,11 @@ module Lithic BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + BlockchainRecipient = Lithic::Models::BlockchainRecipient + + BlockchainRecipientCreateParams = + Lithic::Models::BlockchainRecipientCreateParams + BookTransferCreateParams = Lithic::Models::BookTransferCreateParams BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/rbi/lithic/models/blockchain_recipient.rbi b/rbi/lithic/models/blockchain_recipient.rbi new file mode 100644 index 00000000..222c4da3 --- /dev/null +++ b/rbi/lithic/models/blockchain_recipient.rbi @@ -0,0 +1,207 @@ +# typed: strong + +module Lithic + module Models + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::BlockchainRecipient, Lithic::Internal::AnyHash) + end + + # A globally unique identifier for this blockchain recipient + sig { returns(String) } + attr_accessor :token + + # The financial account the blockchain recipient belongs to + sig { returns(String) } + attr_accessor :account_token + + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + sig { returns(T.nilable(String)) } + attr_accessor :address_tag + + # The blockchain network that the address belongs to + sig { returns(String) } + attr_accessor :chain + + # An ISO 8601 string representing when this blockchain recipient was created + sig { returns(Time) } + attr_accessor :created + + # The identifier the recipient is registered under with the payment provider + sig { returns(T.nilable(String)) } + attr_accessor :external_id + + # The nickname for this blockchain recipient + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Legal name of the business or individual who owns the blockchain address + sig { returns(String) } + attr_accessor :owner + + # Owner Type + sig { returns(Lithic::OwnerType::TaggedSymbol) } + attr_accessor :owner_type + + # Globally unique identifier for the program the blockchain recipient is + # associated with + sig { returns(String) } + attr_accessor :program_id + + # Account State + sig { returns(Lithic::BlockchainRecipient::State::TaggedSymbol) } + attr_accessor :state + + # An ISO 8601 string representing when this blockchain recipient was last updated + sig { returns(Time) } + attr_accessor :updated + + # Verification State + sig do + returns(Lithic::BlockchainRecipient::VerificationState::TaggedSymbol) + end + attr_accessor :verification_state + + sig do + params( + token: String, + account_token: String, + address_tag: T.nilable(String), + chain: String, + created: Time, + external_id: T.nilable(String), + name: T.nilable(String), + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + program_id: String, + state: Lithic::BlockchainRecipient::State::OrSymbol, + updated: Time, + verification_state: + Lithic::BlockchainRecipient::VerificationState::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # A globally unique identifier for this blockchain recipient + token:, + # The financial account the blockchain recipient belongs to + account_token:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag:, + # The blockchain network that the address belongs to + chain:, + # An ISO 8601 string representing when this blockchain recipient was created + created:, + # The identifier the recipient is registered under with the payment provider + external_id:, + # The nickname for this blockchain recipient + name:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # Globally unique identifier for the program the blockchain recipient is + # associated with + program_id:, + # Account State + state:, + # An ISO 8601 string representing when this blockchain recipient was last updated + updated:, + # Verification State + verification_state: + ) + end + + sig do + override.returns( + { + token: String, + account_token: String, + address_tag: T.nilable(String), + chain: String, + created: Time, + external_id: T.nilable(String), + name: T.nilable(String), + owner: String, + owner_type: Lithic::OwnerType::TaggedSymbol, + program_id: String, + state: Lithic::BlockchainRecipient::State::TaggedSymbol, + updated: Time, + verification_state: + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + } + ) + end + def to_hash + end + + # Account State + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::BlockchainRecipient::State) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLED = + T.let(:ENABLED, Lithic::BlockchainRecipient::State::TaggedSymbol) + CLOSED = + T.let(:CLOSED, Lithic::BlockchainRecipient::State::TaggedSymbol) + PAUSED = + T.let(:PAUSED, Lithic::BlockchainRecipient::State::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::BlockchainRecipient::State::TaggedSymbol] + ) + end + def self.values + end + end + + # Verification State + module VerificationState + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::BlockchainRecipient::VerificationState) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + ENABLED = + T.let( + :ENABLED, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + FAILED_VERIFICATION = + T.let( + :FAILED_VERIFICATION, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + INSUFFICIENT_FUNDS = + T.let( + :INSUFFICIENT_FUNDS, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/blockchain_recipient_create_params.rbi b/rbi/lithic/models/blockchain_recipient_create_params.rbi new file mode 100644 index 00000000..f7465e8e --- /dev/null +++ b/rbi/lithic/models/blockchain_recipient_create_params.rbi @@ -0,0 +1,102 @@ +# typed: strong + +module Lithic + module Models + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::BlockchainRecipientCreateParams, + Lithic::Internal::AnyHash + ) + end + + # The financial account the blockchain recipient belongs to + sig { returns(String) } + attr_accessor :account_token + + # The blockchain address funds will be withdrawn to + sig { returns(String) } + attr_accessor :address + + # The blockchain network that the address belongs to + sig { returns(String) } + attr_accessor :chain + + # Legal name of the business or individual who owns the blockchain address + sig { returns(String) } + attr_accessor :owner + + # Owner Type + sig { returns(Lithic::OwnerType::OrSymbol) } + attr_accessor :owner_type + + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + sig { returns(T.nilable(String)) } + attr_reader :address_tag + + sig { params(address_tag: String).void } + attr_writer :address_tag + + # The nickname for this blockchain recipient + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The financial account the blockchain recipient belongs to + account_token:, + # The blockchain address funds will be withdrawn to + address:, + # The blockchain network that the address belongs to + chain:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag: nil, + # The nickname for this blockchain recipient + name: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/resources/blockchain_recipients.rbi b/rbi/lithic/resources/blockchain_recipients.rbi new file mode 100644 index 00000000..5a4926c4 --- /dev/null +++ b/rbi/lithic/resources/blockchain_recipients.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module Lithic + module Resources + class BlockchainRecipients + # Register a blockchain address as a withdrawal destination for a financial + # account + # + # The recipient is created with a `PENDING` verification state and cannot receive + # a payout until screening of the address completes. Registering an address that + # is already registered to the same financial account returns the existing + # recipient and its current verification state, rather than creating a second one + sig do + params( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::BlockchainRecipient) + end + def create( + # The financial account the blockchain recipient belongs to + account_token:, + # The blockchain address funds will be withdrawn to + address:, + # The blockchain network that the address belongs to + chain:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag: nil, + # The nickname for this blockchain recipient + name: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/sig/lithic/client.rbs b/sig/lithic/client.rbs index c419da07..8b06370e 100644 --- a/sig/lithic/client.rbs +++ b/sig/lithic/client.rbs @@ -55,6 +55,8 @@ module Lithic attr_reader external_bank_accounts: Lithic::Resources::ExternalBankAccounts + attr_reader blockchain_recipients: Lithic::Resources::BlockchainRecipients + attr_reader payments: Lithic::Resources::Payments attr_reader three_ds: Lithic::Resources::ThreeDS diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 8e2a2904..78828ae8 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -71,6 +71,10 @@ module Lithic class BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + class BlockchainRecipient = Lithic::Models::BlockchainRecipient + + class BlockchainRecipientCreateParams = Lithic::Models::BlockchainRecipientCreateParams + class BookTransferCreateParams = Lithic::Models::BookTransferCreateParams class BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/sig/lithic/models/blockchain_recipient.rbs b/sig/lithic/models/blockchain_recipient.rbs new file mode 100644 index 00000000..6192929a --- /dev/null +++ b/sig/lithic/models/blockchain_recipient.rbs @@ -0,0 +1,106 @@ +module Lithic + module Models + type blockchain_recipient = + { + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + } + + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor account_token: String + + attr_accessor address_tag: String? + + attr_accessor chain: String + + attr_accessor created: Time + + attr_accessor external_id: String? + + attr_accessor name: String? + + attr_accessor owner: String + + attr_accessor owner_type: Lithic::Models::owner_type + + attr_accessor program_id: String + + attr_accessor state: Lithic::Models::BlockchainRecipient::state + + attr_accessor updated: Time + + attr_accessor verification_state: Lithic::Models::BlockchainRecipient::verification_state + + def initialize: ( + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + ) -> void + + def to_hash: -> { + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + } + + type state = :ENABLED | :CLOSED | :PAUSED + + module State + extend Lithic::Internal::Type::Enum + + ENABLED: :ENABLED + CLOSED: :CLOSED + PAUSED: :PAUSED + + def self?.values: -> ::Array[Lithic::Models::BlockchainRecipient::state] + end + + type verification_state = + :PENDING | :ENABLED | :FAILED_VERIFICATION | :INSUFFICIENT_FUNDS + + module VerificationState + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + ENABLED: :ENABLED + FAILED_VERIFICATION: :FAILED_VERIFICATION + INSUFFICIENT_FUNDS: :INSUFFICIENT_FUNDS + + def self?.values: -> ::Array[Lithic::Models::BlockchainRecipient::verification_state] + end + end + end +end diff --git a/sig/lithic/models/blockchain_recipient_create_params.rbs b/sig/lithic/models/blockchain_recipient_create_params.rbs new file mode 100644 index 00000000..ccc10b06 --- /dev/null +++ b/sig/lithic/models/blockchain_recipient_create_params.rbs @@ -0,0 +1,60 @@ +module Lithic + module Models + type blockchain_recipient_create_params = + { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + address_tag: String, + name: String + } + & Lithic::Internal::Type::request_parameters + + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor account_token: String + + attr_accessor address: String + + attr_accessor chain: String + + attr_accessor owner: String + + attr_accessor owner_type: Lithic::Models::owner_type + + attr_reader address_tag: String? + + def address_tag=: (String) -> String + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + ?address_tag: String, + ?name: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/resources/blockchain_recipients.rbs b/sig/lithic/resources/blockchain_recipients.rbs new file mode 100644 index 00000000..e14f8c77 --- /dev/null +++ b/sig/lithic/resources/blockchain_recipients.rbs @@ -0,0 +1,18 @@ +module Lithic + module Resources + class BlockchainRecipients + def create: ( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + ?address_tag: String, + ?name: String, + ?request_options: Lithic::request_opts + ) -> Lithic::BlockchainRecipient + + def initialize: (client: Lithic::Client) -> void + end + end +end diff --git a/test/lithic/resources/blockchain_recipients_test.rb b/test/lithic/resources/blockchain_recipients_test.rb new file mode 100644 index 00000000..bad4ec8c --- /dev/null +++ b/test/lithic/resources/blockchain_recipients_test.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Lithic::Test::Resources::BlockchainRecipientsTest < Lithic::Test::ResourceTest + def test_create_required_params + response = + @lithic.blockchain_recipients.create( + account_token: "dabadb3b-700c-41e3-8801-d5dfc84ebea0", + address: "0x45bfcf1a6289a0b77b4d3f7d12005a05949fd8c3", + chain: "ETHEREUM", + owner: "John Doe", + owner_type: :INDIVIDUAL + ) + + assert_pattern do + response => Lithic::BlockchainRecipient + end + + assert_pattern do + response => { + token: String, + account_token: String, + address_tag: String | nil, + chain: String, + created: Time, + external_id: String | nil, + name: String | nil, + owner: String, + owner_type: Lithic::OwnerType, + program_id: String, + state: Lithic::BlockchainRecipient::State, + updated: Time, + verification_state: Lithic::BlockchainRecipient::VerificationState + } + end + end +end From 6ecbe702c2e3d1cd3e5623cecf46e4bc02fb3b41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 18:42:00 +0000 Subject: [PATCH 10/19] feat(api): add STABLECOIN method, make method_attributes nullable in Payment --- .stats.yml | 4 ++-- lib/lithic/models/payment.rb | 10 +++++++++- rbi/lithic/models/payment.rbi | 8 ++++++++ sig/lithic/models/payment.rbs | 5 +++++ test/lithic/resources/account_activity_test.rb | 2 ++ test/lithic/resources/payments_test.rb | 3 +++ 6 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2f38062b..4cf673c2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c20cf1ee200fdf3f08472f48b563bab3dcad9452cd92b88b7f7fe079c9316745.yml -openapi_spec_hash: 51e1cb45ee5d65dd02635946d53ef94f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-ba08fed613d6854a75abf98f01d4178cb8bee759c7e095b2441733f4f928d12c.yml +openapi_spec_hash: 342b408b7ab6cfe1b27e5b1582aead28 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index 4f16ee32..ce118684 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -106,6 +106,12 @@ class Payment < Lithic::Internal::Type::BaseModel # @return [Time] required :updated, Time + # @!attribute blockchain_recipient_token + # Token of the blockchain recipient the payout is sent to + # + # @return [String, nil] + optional :blockchain_recipient_token, String, nil?: true + # @!attribute currency # Currency of the transaction in ISO 4217 format # @@ -142,7 +148,7 @@ class Payment < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :user_defined_id, String, nil?: true - # @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, currency: nil, expected_release_date: nil, external_bank_account_token: nil, tags: nil, type: nil, user_defined_id: nil, family: :PAYMENT) + # @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, blockchain_recipient_token: nil, currency: nil, expected_release_date: nil, external_bank_account_token: nil, tags: nil, type: nil, user_defined_id: nil, family: :PAYMENT) # Some parameter documentations has been truncated, see {Lithic::Models::Payment} # for more details. # @@ -180,6 +186,8 @@ class Payment < Lithic::Internal::Type::BaseModel # # @param updated [Time] ISO 8601 timestamp of when the transaction was last updated # + # @param blockchain_recipient_token [String, nil] Token of the blockchain recipient the payout is sent to + # # @param currency [String] Currency of the transaction in ISO 4217 format # # @param expected_release_date [Date, nil] Expected release date for the transaction diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index b9b6b83c..de9e9396 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -82,6 +82,10 @@ module Lithic sig { returns(Time) } attr_accessor :updated + # Token of the blockchain recipient the payout is sent to + sig { returns(T.nilable(String)) } + attr_accessor :blockchain_recipient_token + # Currency of the transaction in ISO 4217 format sig { returns(T.nilable(String)) } attr_reader :currency @@ -140,6 +144,7 @@ module Lithic source: Lithic::Payment::Source::OrSymbol, status: Lithic::Payment::Status::OrSymbol, updated: Time, + blockchain_recipient_token: T.nilable(String), currency: String, expected_release_date: T.nilable(Date), external_bank_account_token: T.nilable(String), @@ -182,6 +187,8 @@ module Lithic status:, # ISO 8601 timestamp of when the transaction was last updated updated:, + # Token of the blockchain recipient the payout is sent to + blockchain_recipient_token: nil, # Currency of the transaction in ISO 4217 format currency: nil, # Expected release date for the transaction @@ -220,6 +227,7 @@ module Lithic source: Lithic::Payment::Source::TaggedSymbol, status: Lithic::Payment::Status::TaggedSymbol, updated: Time, + blockchain_recipient_token: T.nilable(String), currency: String, expected_release_date: T.nilable(Date), external_bank_account_token: T.nilable(String), diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index f5dfedaf..9729d5fd 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -19,6 +19,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + blockchain_recipient_token: String?, currency: String, expected_release_date: Date?, external_bank_account_token: String?, @@ -62,6 +63,8 @@ module Lithic attr_accessor updated: Time + attr_accessor blockchain_recipient_token: String? + attr_reader currency: String? def currency=: (String) -> String @@ -99,6 +102,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + ?blockchain_recipient_token: String?, ?currency: String, ?expected_release_date: Date?, ?external_bank_account_token: String?, @@ -126,6 +130,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + blockchain_recipient_token: String?, currency: String, expected_release_date: Date?, external_bank_account_token: String?, diff --git a/test/lithic/resources/account_activity_test.rb b/test/lithic/resources/account_activity_test.rb index 43d29a9e..48595731 100644 --- a/test/lithic/resources/account_activity_test.rb +++ b/test/lithic/resources/account_activity_test.rb @@ -82,6 +82,7 @@ def test_list source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -213,6 +214,7 @@ def test_retrieve_transaction source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, diff --git a/test/lithic/resources/payments_test.rb b/test/lithic/resources/payments_test.rb index 156f1d5a..98a39f25 100644 --- a/test/lithic/resources/payments_test.rb +++ b/test/lithic/resources/payments_test.rb @@ -45,6 +45,7 @@ def test_retrieve source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -88,6 +89,7 @@ def test_list source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -137,6 +139,7 @@ def test_return__required_params source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, From d32fe12d9edaa339a12b61333e542f24c67f3c2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 13:51:52 +0000 Subject: [PATCH 11/19] feat(api): add claim_token field/param and WRITE_OFF_REVERSED to disputes v2 --- .stats.yml | 4 ++-- lib/lithic/models/dispute_v2.rb | 12 +++++++++++- lib/lithic/models/disputes_v2_list_params.rb | 11 ++++++++++- lib/lithic/resources/disputes_v2.rb | 4 +++- rbi/lithic/models/dispute_v2.rbi | 15 +++++++++++++++ rbi/lithic/models/disputes_v2_list_params.rbi | 13 +++++++++++++ rbi/lithic/resources/disputes_v2.rbi | 4 ++++ sig/lithic/models/dispute_v2.rbs | 7 +++++++ sig/lithic/models/disputes_v2_list_params.rbs | 7 +++++++ sig/lithic/resources/disputes_v2.rbs | 1 + test/lithic/resources/disputes_v2_test.rb | 2 ++ 11 files changed, 75 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4cf673c2..fa1ea91c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-ba08fed613d6854a75abf98f01d4178cb8bee759c7e095b2441733f4f928d12c.yml -openapi_spec_hash: 342b408b7ab6cfe1b27e5b1582aead28 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-113e179e6007c80abd835ff26bfdce4dd24beee5174678687431cb672ce06be8.yml +openapi_spec_hash: 0f42308e15d062d48e3d4857c39ac749 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/dispute_v2.rb b/lib/lithic/models/dispute_v2.rb index 33775e17..92ed7d19 100644 --- a/lib/lithic/models/dispute_v2.rb +++ b/lib/lithic/models/dispute_v2.rb @@ -28,6 +28,13 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # @return [String, nil] required :case_id, String, nil?: true + # @!attribute claim_token + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + # + # @return [String, nil] + required :claim_token, String, nil?: true + # @!attribute created # When the dispute was created. # @@ -88,7 +95,7 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # @return [Time] required :updated, Time - # @!method initialize(token:, account_token:, card_token:, case_id:, created:, currency:, disposition:, events:, liability_allocation:, merchant:, network:, status:, transaction_series:, updated:) + # @!method initialize(token:, account_token:, card_token:, case_id:, claim_token:, created:, currency:, disposition:, events:, liability_allocation:, merchant:, network:, status:, transaction_series:, updated:) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputeV2} for more details. # @@ -102,6 +109,8 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # # @param case_id [String, nil] Identifier assigned by the network for this dispute. # + # @param claim_token [String, nil] Token for the claim this dispute was filed under, in UUID format. Null for dispu + # # @param created [Time] When the dispute was created. # # @param currency [String] Three-letter ISO 4217 currency code. @@ -401,6 +410,7 @@ module Action PROVISIONAL_CREDIT_GRANTED = :PROVISIONAL_CREDIT_GRANTED PROVISIONAL_CREDIT_REVERSED = :PROVISIONAL_CREDIT_REVERSED WRITTEN_OFF = :WRITTEN_OFF + WRITE_OFF_REVERSED = :WRITE_OFF_REVERSED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/disputes_v2_list_params.rb b/lib/lithic/models/disputes_v2_list_params.rb index 04be824a..71c38ed2 100644 --- a/lib/lithic/models/disputes_v2_list_params.rb +++ b/lib/lithic/models/disputes_v2_list_params.rb @@ -25,6 +25,13 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :card_token, String + # @!attribute claim_token + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + # + # @return [String, nil] + optional :claim_token, String + # @!attribute disputed_transaction_token # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. @@ -58,7 +65,7 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :starting_after, String - # @!method initialize(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # @!method initialize(account_token: nil, begin_: nil, card_token: nil, claim_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputesV2ListParams} for more details. # @@ -68,6 +75,8 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # # @param card_token [String] Filter by card token. # + # @param claim_token [String] Filter by the token of the claim the dispute was filed under. Returns the disput + # # @param disputed_transaction_token [String] Filter by the token of the transaction being disputed. Corresponds with transact # # @param end_ [Time] RFC 3339 timestamp for filtering by created date, inclusive. diff --git a/lib/lithic/resources/disputes_v2.rb b/lib/lithic/resources/disputes_v2.rb index d92b14cb..49086abb 100644 --- a/lib/lithic/resources/disputes_v2.rb +++ b/lib/lithic/resources/disputes_v2.rb @@ -28,7 +28,7 @@ def retrieve(dispute_token, params = {}) # # Returns a paginated list of disputes. # - # @overload list(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # @overload list(account_token: nil, begin_: nil, card_token: nil, claim_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) # # @param account_token [String] Filter by account token. # @@ -36,6 +36,8 @@ def retrieve(dispute_token, params = {}) # # @param card_token [String] Filter by card token. # + # @param claim_token [String] Filter by the token of the claim the dispute was filed under. Returns the disput + # # @param disputed_transaction_token [String] Filter by the token of the transaction being disputed. Corresponds with transact # # @param end_ [Time] RFC 3339 timestamp for filtering by created date, inclusive. diff --git a/rbi/lithic/models/dispute_v2.rbi b/rbi/lithic/models/dispute_v2.rbi index f7a8f41b..510e74d2 100644 --- a/rbi/lithic/models/dispute_v2.rbi +++ b/rbi/lithic/models/dispute_v2.rbi @@ -22,6 +22,11 @@ module Lithic sig { returns(T.nilable(String)) } attr_accessor :case_id + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + sig { returns(T.nilable(String)) } + attr_accessor :claim_token + # When the dispute was created. sig { returns(Time) } attr_accessor :created @@ -87,6 +92,7 @@ module Lithic account_token: String, card_token: String, case_id: T.nilable(String), + claim_token: T.nilable(String), created: Time, currency: String, disposition: T.nilable(Lithic::DisputeV2::Disposition::OrSymbol), @@ -109,6 +115,9 @@ module Lithic card_token:, # Identifier assigned by the network for this dispute. case_id:, + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + claim_token:, # When the dispute was created. created:, # Three-letter ISO 4217 currency code. @@ -139,6 +148,7 @@ module Lithic account_token: String, card_token: String, case_id: T.nilable(String), + claim_token: T.nilable(String), created: Time, currency: String, disposition: @@ -722,6 +732,11 @@ module Lithic :WRITTEN_OFF, Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol ) + WRITE_OFF_REVERSED = + T.let( + :WRITE_OFF_REVERSED, + Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/disputes_v2_list_params.rbi b/rbi/lithic/models/disputes_v2_list_params.rbi index 4dd93783..569cd40e 100644 --- a/rbi/lithic/models/disputes_v2_list_params.rbi +++ b/rbi/lithic/models/disputes_v2_list_params.rbi @@ -32,6 +32,14 @@ module Lithic sig { params(card_token: String).void } attr_writer :card_token + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + sig { returns(T.nilable(String)) } + attr_reader :claim_token + + sig { params(claim_token: String).void } + attr_writer :claim_token + # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. sig { returns(T.nilable(String)) } @@ -75,6 +83,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -90,6 +99,9 @@ module Lithic begin_: nil, # Filter by card token. card_token: nil, + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + claim_token: nil, # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. disputed_transaction_token: nil, @@ -113,6 +125,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, diff --git a/rbi/lithic/resources/disputes_v2.rbi b/rbi/lithic/resources/disputes_v2.rbi index 23b97002..425134e9 100644 --- a/rbi/lithic/resources/disputes_v2.rbi +++ b/rbi/lithic/resources/disputes_v2.rbi @@ -23,6 +23,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -38,6 +39,9 @@ module Lithic begin_: nil, # Filter by card token. card_token: nil, + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + claim_token: nil, # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. disputed_transaction_token: nil, diff --git a/sig/lithic/models/dispute_v2.rbs b/sig/lithic/models/dispute_v2.rbs index 836a7b7b..5b32411e 100644 --- a/sig/lithic/models/dispute_v2.rbs +++ b/sig/lithic/models/dispute_v2.rbs @@ -6,6 +6,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -27,6 +28,8 @@ module Lithic attr_accessor case_id: String? + attr_accessor claim_token: String? + attr_accessor created: Time attr_accessor currency: String @@ -52,6 +55,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -69,6 +73,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -310,6 +315,7 @@ module Lithic :PROVISIONAL_CREDIT_GRANTED | :PROVISIONAL_CREDIT_REVERSED | :WRITTEN_OFF + | :WRITE_OFF_REVERSED module Action extend Lithic::Internal::Type::Enum @@ -317,6 +323,7 @@ module Lithic PROVISIONAL_CREDIT_GRANTED: :PROVISIONAL_CREDIT_GRANTED PROVISIONAL_CREDIT_REVERSED: :PROVISIONAL_CREDIT_REVERSED WRITTEN_OFF: :WRITTEN_OFF + WRITE_OFF_REVERSED: :WRITE_OFF_REVERSED def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action] end diff --git a/sig/lithic/models/disputes_v2_list_params.rbs b/sig/lithic/models/disputes_v2_list_params.rbs index 9e1444a9..8193442d 100644 --- a/sig/lithic/models/disputes_v2_list_params.rbs +++ b/sig/lithic/models/disputes_v2_list_params.rbs @@ -5,6 +5,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -29,6 +30,10 @@ module Lithic def card_token=: (String) -> String + attr_reader claim_token: String? + + def claim_token=: (String) -> String + attr_reader disputed_transaction_token: String? def disputed_transaction_token=: (String) -> String @@ -53,6 +58,7 @@ module Lithic ?account_token: String, ?begin_: Time, ?card_token: String, + ?claim_token: String, ?disputed_transaction_token: String, ?end_: Time, ?ending_before: String, @@ -65,6 +71,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, diff --git a/sig/lithic/resources/disputes_v2.rbs b/sig/lithic/resources/disputes_v2.rbs index 0c961b1c..82019c70 100644 --- a/sig/lithic/resources/disputes_v2.rbs +++ b/sig/lithic/resources/disputes_v2.rbs @@ -10,6 +10,7 @@ module Lithic ?account_token: String, ?begin_: Time, ?card_token: String, + ?claim_token: String, ?disputed_transaction_token: String, ?end_: Time, ?ending_before: String, diff --git a/test/lithic/resources/disputes_v2_test.rb b/test/lithic/resources/disputes_v2_test.rb index 5a795435..ef57e09f 100644 --- a/test/lithic/resources/disputes_v2_test.rb +++ b/test/lithic/resources/disputes_v2_test.rb @@ -16,6 +16,7 @@ def test_retrieve account_token: String, card_token: String, case_id: String | nil, + claim_token: String | nil, created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, @@ -50,6 +51,7 @@ def test_list account_token: String, card_token: String, case_id: String | nil, + claim_token: String | nil, created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, From 0fbeb86633809668c1bd304a40b2f23860b232be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:22:42 +0000 Subject: [PATCH 12/19] chore(internal): allow the mock server port to be set with STAINLESS_MOCK_PORT --- scripts/mock | 11 +++++++++-- scripts/test | 12 +++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/mock b/scripts/mock index bcf3b392..ae902d29 100755 --- a/scripts/mock +++ b/scripts/mock @@ -4,6 +4,11 @@ set -e cd "$(dirname "$0")/.." +if [ "$1" == "--install" ]; then + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + exit 0 +fi + if [[ -n "$1" && "$1" != '--'* ]]; then URL="$1" shift @@ -20,11 +25,13 @@ fi echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec +MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}" + if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock -p "$MOCK_PORT" "$URL" &> .prism.log & # Wait for server to come online (max 30s) echo -n "Waiting for server" @@ -48,5 +55,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock -p "$MOCK_PORT" "$URL" fi diff --git a/scripts/test b/scripts/test index e0dc1374..647dcb20 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,10 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color +MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}" + function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 + curl --silent "http://localhost:$MOCK_PORT" >/dev/null 2>&1 } kill_server_on_port() { @@ -27,7 +29,7 @@ function is_overriding_api_base_url() { if ! is_overriding_api_base_url && ! prism_is_running ; then # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT + trap 'kill_server_on_port "$MOCK_PORT"' EXIT # Start the dev server ./scripts/mock --daemon @@ -43,7 +45,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock -p $MOCK_PORT path/to/your.openapi.yml${NC}" echo exit 1 @@ -52,5 +54,9 @@ else echo fi +if [ -n "${STAINLESS_MOCK_PORT:-}" ] && ! is_overriding_api_base_url ; then + export TEST_API_BASE_URL="http://127.0.0.1:$MOCK_PORT" +fi + echo "==> Running tests" bundle exec rake test "$@" From e5cd94f58dbafc40ab1f2e25182b4b559d2ed258 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:14:56 +0000 Subject: [PATCH 13/19] docs(api): update client_device_id and client_wallet_account_id descriptions in card provision --- .stats.yml | 4 +-- lib/lithic/models/card_provision_params.rb | 18 +++++++------ lib/lithic/resources/cards.rb | 4 +-- rbi/lithic/models/card_provision_params.rbi | 28 ++++++++++++--------- rbi/lithic/resources/cards.rbi | 14 ++++++----- 5 files changed, 38 insertions(+), 30 deletions(-) diff --git a/.stats.yml b/.stats.yml index fa1ea91c..5318de14 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-113e179e6007c80abd835ff26bfdce4dd24beee5174678687431cb672ce06be8.yml -openapi_spec_hash: 0f42308e15d062d48e3d4857c39ac749 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-540c088e3f3c062a6169bbd7631ad456c7bc65afc7044ae8ffb879d0694140db.yml +openapi_spec_hash: 6474e2ca67af0c9b57338d2468b96d99 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/card_provision_params.rb b/lib/lithic/models/card_provision_params.rb index e50c318b..563e81f7 100644 --- a/lib/lithic/models/card_provision_params.rb +++ b/lib/lithic/models/card_provision_params.rb @@ -22,17 +22,19 @@ class CardProvisionParams < Lithic::Internal::Type::BaseModel optional :certificate, String # @!attribute client_device_id - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Stable device identification set by the wallet - # provider. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable + # device identification set by the wallet provider. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. # # @return [String, nil] optional :client_device_id, String # @!attribute client_wallet_account_id - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Consumer ID that identifies the wallet account - # holder entity. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer + # ID that identifies the wallet account holder entity. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. # # @return [String, nil] optional :client_wallet_account_id, String @@ -67,9 +69,9 @@ class CardProvisionParams < Lithic::Internal::Type::BaseModel # # @param certificate [String] Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activa # - # @param client_device_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the car + # @param client_device_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable dev # - # @param client_wallet_account_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the car + # @param client_wallet_account_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer I # # @param digital_wallet [Symbol, Lithic::Models::CardProvisionParams::DigitalWallet] Name of digital wallet provider. # diff --git a/lib/lithic/resources/cards.rb b/lib/lithic/resources/cards.rb index fc8d23bd..74a38d4b 100644 --- a/lib/lithic/resources/cards.rb +++ b/lib/lithic/resources/cards.rb @@ -301,9 +301,9 @@ def embed(params) # # @param certificate [String] Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activa # - # @param client_device_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the car + # @param client_device_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable dev # - # @param client_wallet_account_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the car + # @param client_wallet_account_id [String] Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer I # # @param digital_wallet [Symbol, Lithic::Models::CardProvisionParams::DigitalWallet] Name of digital wallet provider. # diff --git a/rbi/lithic/models/card_provision_params.rbi b/rbi/lithic/models/card_provision_params.rbi index b941391a..a7a5faa3 100644 --- a/rbi/lithic/models/card_provision_params.rbi +++ b/rbi/lithic/models/card_provision_params.rbi @@ -24,18 +24,20 @@ module Lithic sig { params(certificate: String).void } attr_writer :certificate - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Stable device identification set by the wallet - # provider. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable + # device identification set by the wallet provider. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. sig { returns(T.nilable(String)) } attr_reader :client_device_id sig { params(client_device_id: String).void } attr_writer :client_device_id - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Consumer ID that identifies the wallet account - # holder entity. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer + # ID that identifies the wallet account holder entity. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. sig { returns(T.nilable(String)) } attr_reader :client_wallet_account_id @@ -92,13 +94,15 @@ module Lithic # encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers # omitted. Provided by the device's wallet. certificate: nil, - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Stable device identification set by the wallet - # provider. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable + # device identification set by the wallet provider. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. client_device_id: nil, - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Consumer ID that identifies the wallet account - # holder entity. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer + # ID that identifies the wallet account holder entity. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. client_wallet_account_id: nil, # Name of digital wallet provider. digital_wallet: nil, diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 55c6f212..218cce9d 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -465,13 +465,15 @@ module Lithic # encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers # omitted. Provided by the device's wallet. certificate: nil, - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Stable device identification set by the wallet - # provider. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable + # device identification set by the wallet provider. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. client_device_id: nil, - # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the - # card is on the Visa network. Consumer ID that identifies the wallet account - # holder entity. + # Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer + # ID that identifies the wallet account holder entity. Required for both wallets + # regardless of network, though the value is only used for cards on the Visa + # network and is ignored on Amex and Mastercard. client_wallet_account_id: nil, # Name of digital wallet provider. digital_wallet: nil, From 087861b820756e52b92ff69b5d7929109e27ba59 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:57:25 +0000 Subject: [PATCH 14/19] feat(api): add stablecoin_inbound/stablecoin_outbound to payment type enum --- .stats.yml | 4 ++-- lib/lithic/models/payment.rb | 2 ++ rbi/lithic/models/payment.rbi | 4 ++++ sig/lithic/models/payment.rbs | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5318de14..c01d91fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-540c088e3f3c062a6169bbd7631ad456c7bc65afc7044ae8ffb879d0694140db.yml -openapi_spec_hash: 6474e2ca67af0c9b57338d2468b96d99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-b20cf727edee61c384a1af2f32327f018c8dbad4419854c3e9c82bb64c68f027.yml +openapi_spec_hash: d8ced2c36092a19d6360ee71b4ef7b4f config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index ce118684..b6cb5265 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -832,6 +832,8 @@ module Type WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST STABLECOIN = :STABLECOIN + STABLECOIN_INBOUND = :STABLECOIN_INBOUND + STABLECOIN_OUTBOUND = :STABLECOIN_OUTBOUND # @!method self.values # @return [Array] diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index de9e9396..8588bddc 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -1363,6 +1363,10 @@ module Lithic Lithic::Payment::Type::TaggedSymbol ) STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Type::TaggedSymbol) + STABLECOIN_INBOUND = + T.let(:STABLECOIN_INBOUND, Lithic::Payment::Type::TaggedSymbol) + STABLECOIN_OUTBOUND = + T.let(:STABLECOIN_OUTBOUND, Lithic::Payment::Type::TaggedSymbol) sig { override.returns(T::Array[Lithic::Payment::Type::TaggedSymbol]) } def self.values diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index 9729d5fd..493ea86a 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -599,6 +599,8 @@ module Lithic | :WIRE_OUTBOUND_ADMIN | :WIRE_INBOUND_DRAWDOWN_REQUEST | :STABLECOIN + | :STABLECOIN_INBOUND + | :STABLECOIN_OUTBOUND module Type extend Lithic::Internal::Type::Enum @@ -613,6 +615,8 @@ module Lithic WIRE_OUTBOUND_ADMIN: :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST: :WIRE_INBOUND_DRAWDOWN_REQUEST STABLECOIN: :STABLECOIN + STABLECOIN_INBOUND: :STABLECOIN_INBOUND + STABLECOIN_OUTBOUND: :STABLECOIN_OUTBOUND def self?.values: -> ::Array[Lithic::Models::Payment::type_] end From 41e80f87c3b3a3167f97c4657acd71cf28bc3074 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:34:24 +0000 Subject: [PATCH 15/19] feat: Remove stablecoin transfer type --- .stats.yml | 4 ++-- lib/lithic/models/payment.rb | 1 - rbi/lithic/models/payment.rbi | 1 - sig/lithic/models/payment.rbs | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c01d91fa..18942f8f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-b20cf727edee61c384a1af2f32327f018c8dbad4419854c3e9c82bb64c68f027.yml -openapi_spec_hash: d8ced2c36092a19d6360ee71b4ef7b4f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9982e90b01fa1f7581d9d0338073fa22131f7452ff0776f75cef5d8921257c16.yml +openapi_spec_hash: d8eefb059eb59b5be821131d3a625957 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index b6cb5265..94af119b 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -831,7 +831,6 @@ module Type WIRE_OUTBOUND_PAYMENT = :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST - STABLECOIN = :STABLECOIN STABLECOIN_INBOUND = :STABLECOIN_INBOUND STABLECOIN_OUTBOUND = :STABLECOIN_OUTBOUND diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 8588bddc..696b7eb9 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -1362,7 +1362,6 @@ module Lithic :WIRE_INBOUND_DRAWDOWN_REQUEST, Lithic::Payment::Type::TaggedSymbol ) - STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Type::TaggedSymbol) STABLECOIN_INBOUND = T.let(:STABLECOIN_INBOUND, Lithic::Payment::Type::TaggedSymbol) STABLECOIN_OUTBOUND = diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index 493ea86a..e4b70200 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -598,7 +598,6 @@ module Lithic | :WIRE_OUTBOUND_PAYMENT | :WIRE_OUTBOUND_ADMIN | :WIRE_INBOUND_DRAWDOWN_REQUEST - | :STABLECOIN | :STABLECOIN_INBOUND | :STABLECOIN_OUTBOUND @@ -614,7 +613,6 @@ module Lithic WIRE_OUTBOUND_PAYMENT: :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN: :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST: :WIRE_INBOUND_DRAWDOWN_REQUEST - STABLECOIN: :STABLECOIN STABLECOIN_INBOUND: :STABLECOIN_INBOUND STABLECOIN_OUTBOUND: :STABLECOIN_OUTBOUND From aeedd0ab75d527323dc8a748af1ea86a95f52ac5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2026 17:38:48 +0000 Subject: [PATCH 16/19] fix(types): rename event data variants, remove type discriminator in dispute_v2 --- .stats.yml | 4 +- lib/lithic/models/dispute_v2.rb | 296 ++++++++------ rbi/lithic/models/dispute_v2.rbi | 453 +++++++++++++--------- sig/lithic/models/dispute_v2.rbs | 239 +++++++----- test/lithic/resources/disputes_v2_test.rb | 4 +- 5 files changed, 580 insertions(+), 416 deletions(-) diff --git a/.stats.yml b/.stats.yml index 18942f8f..bf4a80ab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9982e90b01fa1f7581d9d0338073fa22131f7452ff0776f75cef5d8921257c16.yml -openapi_spec_hash: d8eefb059eb59b5be821131d3a625957 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-70848844b69f7905307f9986b5630160aee26497cdbaf9257839a088ae7ca00b.yml +openapi_spec_hash: a5d37fbb60eba858c8bd2ebe982936e1 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/dispute_v2.rb b/lib/lithic/models/dispute_v2.rb index 92ed7d19..80f05cd6 100644 --- a/lib/lithic/models/dispute_v2.rb +++ b/lib/lithic/models/dispute_v2.rb @@ -56,8 +56,8 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # @!attribute events # Chronological list of events that have occurred in the dispute lifecycle # - # @return [Array] - required :events, -> { Lithic::Internal::Type::ArrayOf[Lithic::DisputeV2::Event] } + # @return [Array] + required :events, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::DisputeV2::Event] } # @!attribute liability_allocation # Current breakdown of how liability is allocated for the disputed amount @@ -117,7 +117,7 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # # @param disposition [Symbol, Lithic::Models::DisputeV2::Disposition, nil] Dispute resolution outcome # - # @param events [Array] Chronological list of events that have occurred in the dispute lifecycle + # @param events [Array] Chronological list of events that have occurred in the dispute lifecycle # # @param liability_allocation [Lithic::Models::DisputeV2::LiabilityAllocation] Current breakdown of how liability is allocated for the disputed amount # @@ -147,65 +147,65 @@ module Disposition # @return [Array] end - class Event < Lithic::Internal::Type::BaseModel - # @!attribute token - # Unique identifier for the event, in UUID format - # - # @return [String] - required :token, String - - # @!attribute created - # When the event occurred - # - # @return [Time] - required :created, Time - - # @!attribute data - # Details specific to the event type - # - # @return [Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability] - required :data, union: -> { Lithic::DisputeV2::Event::Data } - - # @!attribute type - # Type of event - # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Type] - required :type, enum: -> { Lithic::DisputeV2::Event::Type } - - # @!method initialize(token:, created:, data:, type:) - # Event that occurred in the dispute lifecycle - # - # @param token [String] Unique identifier for the event, in UUID format - # - # @param created [Time] When the event occurred - # - # @param data [Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability] Details specific to the event type - # - # @param type [Symbol, Lithic::Models::DisputeV2::Event::Type] Type of event - - # Details specific to the event type - # - # @see Lithic::Models::DisputeV2::Event#data - module Data - extend Lithic::Internal::Type::Union - - discriminator :type - - # Details specific to workflow events - variant :WORKFLOW, -> { Lithic::DisputeV2::Event::Data::Workflow } - - # Details specific to financial events - variant :FINANCIAL, -> { Lithic::DisputeV2::Event::Data::Financial } - - # Details specific to cardholder liability events - variant :CARDHOLDER_LIABILITY, -> { Lithic::DisputeV2::Event::Data::CardholderLiability } - - class Workflow < Lithic::Internal::Type::BaseModel + # Event that occurred in the dispute lifecycle. The `type` field identifies the + # event variant and determines the shape of `data` + module Event + extend Lithic::Internal::Type::Union + + discriminator :type + + # Event tracking the dispute's case management workflow + variant :WORKFLOW, -> { Lithic::DisputeV2::Event::Workflow } + + # Event tracking a funds movement between issuer and acquirer + variant :FINANCIAL, -> { Lithic::DisputeV2::Event::Financial } + + # Event tracking a change in cardholder liability + variant :CARDHOLDER_LIABILITY, -> { Lithic::DisputeV2::Event::CardholderLiability } + + class Workflow < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the event, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the event occurred + # + # @return [Time] + required :created, Time + + # @!attribute data + # Details specific to workflow events + # + # @return [Lithic::Models::DisputeV2::Event::Workflow::Data] + required :data, -> { Lithic::DisputeV2::Event::Workflow::Data } + + # @!attribute type + # Type of event. Always `WORKFLOW` + # + # @return [Symbol, :WORKFLOW] + required :type, const: :WORKFLOW + + # @!method initialize(token:, created:, data:, type: :WORKFLOW) + # Event tracking the dispute's case management workflow + # + # @param token [String] Unique identifier for the event, in UUID format + # + # @param created [Time] When the event occurred + # + # @param data [Lithic::Models::DisputeV2::Event::Workflow::Data] Details specific to workflow events + # + # @param type [Symbol, :WORKFLOW] Type of event. Always `WORKFLOW` + + # @see Lithic::Models::DisputeV2::Event::Workflow#data + class Data < Lithic::Internal::Type::BaseModel # @!attribute action # Action taken in this stage # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Action] - required :action, enum: -> { Lithic::DisputeV2::Event::Data::Workflow::Action } + # @return [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Action] + required :action, enum: -> { Lithic::DisputeV2::Event::Workflow::Data::Action } # @!attribute amount # Amount in minor units @@ -216,10 +216,10 @@ class Workflow < Lithic::Internal::Type::BaseModel # @!attribute disposition # Dispute resolution outcome # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Disposition, nil] + # @return [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Disposition, nil] required :disposition, enum: -> { - Lithic::DisputeV2::Event::Data::Workflow::Disposition + Lithic::DisputeV2::Event::Workflow::Data::Disposition }, nil?: true @@ -232,33 +232,25 @@ class Workflow < Lithic::Internal::Type::BaseModel # @!attribute stage # Current stage of the dispute workflow # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Stage] - required :stage, enum: -> { Lithic::DisputeV2::Event::Data::Workflow::Stage } - - # @!attribute type - # Event type discriminator - # - # @return [Symbol, :WORKFLOW] - required :type, const: :WORKFLOW + # @return [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Stage] + required :stage, enum: -> { Lithic::DisputeV2::Event::Workflow::Data::Stage } - # @!method initialize(action:, amount:, disposition:, reason:, stage:, type: :WORKFLOW) + # @!method initialize(action:, amount:, disposition:, reason:, stage:) # Details specific to workflow events # - # @param action [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Action] Action taken in this stage + # @param action [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Action] Action taken in this stage # # @param amount [Integer, nil] Amount in minor units # - # @param disposition [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Disposition, nil] Dispute resolution outcome + # @param disposition [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Disposition, nil] Dispute resolution outcome # # @param reason [String, nil] Reason for the action # - # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Data::Workflow::Stage] Current stage of the dispute workflow - # - # @param type [Symbol, :WORKFLOW] Event type discriminator + # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Workflow::Data::Stage] Current stage of the dispute workflow # Action taken in this stage # - # @see Lithic::Models::DisputeV2::Event::Data::Workflow#action + # @see Lithic::Models::DisputeV2::Event::Workflow::Data#action module Action extend Lithic::Internal::Type::Enum @@ -272,7 +264,7 @@ module Action # Dispute resolution outcome # - # @see Lithic::Models::DisputeV2::Event::Data::Workflow#disposition + # @see Lithic::Models::DisputeV2::Event::Workflow::Data#disposition module Disposition extend Lithic::Internal::Type::Enum @@ -288,7 +280,7 @@ module Disposition # Current stage of the dispute workflow # - # @see Lithic::Models::DisputeV2::Event::Data::Workflow#stage + # @see Lithic::Models::DisputeV2::Event::Workflow::Data#stage module Stage extend Lithic::Internal::Type::Enum @@ -298,8 +290,46 @@ module Stage # @return [Array] end end + end - class Financial < Lithic::Internal::Type::BaseModel + class Financial < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the event, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the event occurred + # + # @return [Time] + required :created, Time + + # @!attribute data + # Details specific to financial events + # + # @return [Lithic::Models::DisputeV2::Event::Financial::Data] + required :data, -> { Lithic::DisputeV2::Event::Financial::Data } + + # @!attribute type + # Type of event. Always `FINANCIAL` + # + # @return [Symbol, :FINANCIAL] + required :type, const: :FINANCIAL + + # @!method initialize(token:, created:, data:, type: :FINANCIAL) + # Event tracking a funds movement between issuer and acquirer + # + # @param token [String] Unique identifier for the event, in UUID format + # + # @param created [Time] When the event occurred + # + # @param data [Lithic::Models::DisputeV2::Event::Financial::Data] Details specific to financial events + # + # @param type [Symbol, :FINANCIAL] Type of event. Always `FINANCIAL` + + # @see Lithic::Models::DisputeV2::Event::Financial#data + class Data < Lithic::Internal::Type::BaseModel # @!attribute amount # Amount in minor units # @@ -309,35 +339,27 @@ class Financial < Lithic::Internal::Type::BaseModel # @!attribute polarity # Direction of funds flow # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Polarity] - required :polarity, enum: -> { Lithic::DisputeV2::Event::Data::Financial::Polarity } + # @return [Symbol, Lithic::Models::DisputeV2::Event::Financial::Data::Polarity] + required :polarity, enum: -> { Lithic::DisputeV2::Event::Financial::Data::Polarity } # @!attribute stage # Stage at which the financial event occurred # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Stage] - required :stage, enum: -> { Lithic::DisputeV2::Event::Data::Financial::Stage } + # @return [Symbol, Lithic::Models::DisputeV2::Event::Financial::Data::Stage] + required :stage, enum: -> { Lithic::DisputeV2::Event::Financial::Data::Stage } - # @!attribute type - # Event type discriminator - # - # @return [Symbol, :FINANCIAL] - required :type, const: :FINANCIAL - - # @!method initialize(amount:, polarity:, stage:, type: :FINANCIAL) + # @!method initialize(amount:, polarity:, stage:) # Details specific to financial events # # @param amount [Integer] Amount in minor units # - # @param polarity [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Polarity] Direction of funds flow - # - # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Data::Financial::Stage] Stage at which the financial event occurred + # @param polarity [Symbol, Lithic::Models::DisputeV2::Event::Financial::Data::Polarity] Direction of funds flow # - # @param type [Symbol, :FINANCIAL] Event type discriminator + # @param stage [Symbol, Lithic::Models::DisputeV2::Event::Financial::Data::Stage] Stage at which the financial event occurred # Direction of funds flow # - # @see Lithic::Models::DisputeV2::Event::Data::Financial#polarity + # @see Lithic::Models::DisputeV2::Event::Financial::Data#polarity module Polarity extend Lithic::Internal::Type::Enum @@ -350,7 +372,7 @@ module Polarity # Stage at which the financial event occurred # - # @see Lithic::Models::DisputeV2::Event::Data::Financial#stage + # @see Lithic::Models::DisputeV2::Event::Financial::Data#stage module Stage extend Lithic::Internal::Type::Enum @@ -364,13 +386,51 @@ module Stage # @return [Array] end end + end - class CardholderLiability < Lithic::Internal::Type::BaseModel + class CardholderLiability < Lithic::Internal::Type::BaseModel + # @!attribute token + # Unique identifier for the event, in UUID format + # + # @return [String] + required :token, String + + # @!attribute created + # When the event occurred + # + # @return [Time] + required :created, Time + + # @!attribute data + # Details specific to cardholder liability events + # + # @return [Lithic::Models::DisputeV2::Event::CardholderLiability::Data] + required :data, -> { Lithic::DisputeV2::Event::CardholderLiability::Data } + + # @!attribute type + # Type of event. Always `CARDHOLDER_LIABILITY` + # + # @return [Symbol, :CARDHOLDER_LIABILITY] + required :type, const: :CARDHOLDER_LIABILITY + + # @!method initialize(token:, created:, data:, type: :CARDHOLDER_LIABILITY) + # Event tracking a change in cardholder liability + # + # @param token [String] Unique identifier for the event, in UUID format + # + # @param created [Time] When the event occurred + # + # @param data [Lithic::Models::DisputeV2::Event::CardholderLiability::Data] Details specific to cardholder liability events + # + # @param type [Symbol, :CARDHOLDER_LIABILITY] Type of event. Always `CARDHOLDER_LIABILITY` + + # @see Lithic::Models::DisputeV2::Event::CardholderLiability#data + class Data < Lithic::Internal::Type::BaseModel # @!attribute action # Action taken regarding cardholder liability # - # @return [Symbol, Lithic::Models::DisputeV2::Event::Data::CardholderLiability::Action] - required :action, enum: -> { Lithic::DisputeV2::Event::Data::CardholderLiability::Action } + # @return [Symbol, Lithic::Models::DisputeV2::Event::CardholderLiability::Data::Action] + required :action, enum: -> { Lithic::DisputeV2::Event::CardholderLiability::Data::Action } # @!attribute amount # Amount in minor units @@ -381,29 +441,21 @@ class CardholderLiability < Lithic::Internal::Type::BaseModel # @!attribute reason # Reason for the action # - # @return [String] - required :reason, String - - # @!attribute type - # Event type discriminator - # - # @return [Symbol, :CARDHOLDER_LIABILITY] - required :type, const: :CARDHOLDER_LIABILITY + # @return [String, nil] + required :reason, String, nil?: true - # @!method initialize(action:, amount:, reason:, type: :CARDHOLDER_LIABILITY) + # @!method initialize(action:, amount:, reason:) # Details specific to cardholder liability events # - # @param action [Symbol, Lithic::Models::DisputeV2::Event::Data::CardholderLiability::Action] Action taken regarding cardholder liability + # @param action [Symbol, Lithic::Models::DisputeV2::Event::CardholderLiability::Data::Action] Action taken regarding cardholder liability # # @param amount [Integer] Amount in minor units # - # @param reason [String] Reason for the action - # - # @param type [Symbol, :CARDHOLDER_LIABILITY] Event type discriminator + # @param reason [String, nil] Reason for the action # Action taken regarding cardholder liability # - # @see Lithic::Models::DisputeV2::Event::Data::CardholderLiability#action + # @see Lithic::Models::DisputeV2::Event::CardholderLiability::Data#action module Action extend Lithic::Internal::Type::Enum @@ -416,24 +468,10 @@ module Action # @return [Array] end end - - # @!method self.variants - # @return [Array(Lithic::Models::DisputeV2::Event::Data::Workflow, Lithic::Models::DisputeV2::Event::Data::Financial, Lithic::Models::DisputeV2::Event::Data::CardholderLiability)] end - # Type of event - # - # @see Lithic::Models::DisputeV2::Event#type - module Type - extend Lithic::Internal::Type::Enum - - WORKFLOW = :WORKFLOW - FINANCIAL = :FINANCIAL - CARDHOLDER_LIABILITY = :CARDHOLDER_LIABILITY - - # @!method self.values - # @return [Array] - end + # @!method self.variants + # @return [Array(Lithic::Models::DisputeV2::Event::Workflow, Lithic::Models::DisputeV2::Event::Financial, Lithic::Models::DisputeV2::Event::CardholderLiability)] end # @see Lithic::Models::DisputeV2#liability_allocation diff --git a/rbi/lithic/models/dispute_v2.rbi b/rbi/lithic/models/dispute_v2.rbi index 510e74d2..e41a3a50 100644 --- a/rbi/lithic/models/dispute_v2.rbi +++ b/rbi/lithic/models/dispute_v2.rbi @@ -40,7 +40,7 @@ module Lithic attr_accessor :disposition # Chronological list of events that have occurred in the dispute lifecycle - sig { returns(T::Array[Lithic::DisputeV2::Event]) } + sig { returns(T::Array[Lithic::DisputeV2::Event::Variants]) } attr_accessor :events # Current breakdown of how liability is allocated for the disputed amount @@ -96,7 +96,14 @@ module Lithic created: Time, currency: String, disposition: T.nilable(Lithic::DisputeV2::Disposition::OrSymbol), - events: T::Array[Lithic::DisputeV2::Event::OrHash], + events: + T::Array[ + T.any( + Lithic::DisputeV2::Event::Workflow::OrHash, + Lithic::DisputeV2::Event::Financial::OrHash, + Lithic::DisputeV2::Event::CardholderLiability::OrHash + ) + ], liability_allocation: Lithic::DisputeV2::LiabilityAllocation::OrHash, merchant: Lithic::Merchant::OrHash, network: Lithic::DisputeV2::Network::OrSymbol, @@ -153,7 +160,7 @@ module Lithic currency: String, disposition: T.nilable(Lithic::DisputeV2::Disposition::TaggedSymbol), - events: T::Array[Lithic::DisputeV2::Event], + events: T::Array[Lithic::DisputeV2::Event::Variants], liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::DisputeV2::Network::TaggedSymbol, @@ -191,85 +198,89 @@ module Lithic end end - class Event < Lithic::Internal::Type::BaseModel - OrHash = + # Event that occurred in the dispute lifecycle. The `type` field identifies the + # event variant and determines the shape of `data` + module Event + extend Lithic::Internal::Type::Union + + Variants = T.type_alias do - T.any(Lithic::DisputeV2::Event, Lithic::Internal::AnyHash) + T.any( + Lithic::DisputeV2::Event::Workflow, + Lithic::DisputeV2::Event::Financial, + Lithic::DisputeV2::Event::CardholderLiability + ) end - # Unique identifier for the event, in UUID format - sig { returns(String) } - attr_accessor :token + class Workflow < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::DisputeV2::Event::Workflow, + Lithic::Internal::AnyHash + ) + end - # When the event occurred - sig { returns(Time) } - attr_accessor :created + # Unique identifier for the event, in UUID format + sig { returns(String) } + attr_accessor :token - # Details specific to the event type - sig { returns(Lithic::DisputeV2::Event::Data::Variants) } - attr_accessor :data + # When the event occurred + sig { returns(Time) } + attr_accessor :created - # Type of event - sig { returns(Lithic::DisputeV2::Event::Type::TaggedSymbol) } - attr_accessor :type + # Details specific to workflow events + sig { returns(Lithic::DisputeV2::Event::Workflow::Data) } + attr_reader :data - # Event that occurred in the dispute lifecycle - sig do - params( - token: String, - created: Time, - data: - T.any( - Lithic::DisputeV2::Event::Data::Workflow::OrHash, - Lithic::DisputeV2::Event::Data::Financial::OrHash, - Lithic::DisputeV2::Event::Data::CardholderLiability::OrHash - ), - type: Lithic::DisputeV2::Event::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # Unique identifier for the event, in UUID format - token:, - # When the event occurred - created:, - # Details specific to the event type - data:, - # Type of event - type: - ) - end + sig do + params(data: Lithic::DisputeV2::Event::Workflow::Data::OrHash).void + end + attr_writer :data - sig do - override.returns( - { + # Type of event. Always `WORKFLOW` + sig { returns(Symbol) } + attr_accessor :type + + # Event tracking the dispute's case management workflow + sig do + params( token: String, created: Time, - data: Lithic::DisputeV2::Event::Data::Variants, - type: Lithic::DisputeV2::Event::Type::TaggedSymbol - } + data: Lithic::DisputeV2::Event::Workflow::Data::OrHash, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the event, in UUID format + token:, + # When the event occurred + created:, + # Details specific to workflow events + data:, + # Type of event. Always `WORKFLOW` + type: :WORKFLOW ) - end - def to_hash - end - - # Details specific to the event type - module Data - extend Lithic::Internal::Type::Union + end - Variants = - T.type_alias do - T.any( - Lithic::DisputeV2::Event::Data::Workflow, - Lithic::DisputeV2::Event::Data::Financial, - Lithic::DisputeV2::Event::Data::CardholderLiability - ) - end + sig do + override.returns( + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Workflow::Data, + type: Symbol + } + ) + end + def to_hash + end - class Workflow < Lithic::Internal::Type::BaseModel + class Data < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::DisputeV2::Event::Data::Workflow, + Lithic::DisputeV2::Event::Workflow::Data, Lithic::Internal::AnyHash ) end @@ -277,7 +288,7 @@ module Lithic # Action taken in this stage sig do returns( - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol ) end attr_accessor :action @@ -290,7 +301,7 @@ module Lithic sig do returns( T.nilable( - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) ) end @@ -303,29 +314,23 @@ module Lithic # Current stage of the dispute workflow sig do returns( - Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol ) end attr_accessor :stage - # Event type discriminator - sig { returns(Symbol) } - attr_accessor :type - # Details specific to workflow events sig do params( action: - Lithic::DisputeV2::Event::Data::Workflow::Action::OrSymbol, + Lithic::DisputeV2::Event::Workflow::Data::Action::OrSymbol, amount: T.nilable(Integer), disposition: T.nilable( - Lithic::DisputeV2::Event::Data::Workflow::Disposition::OrSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::OrSymbol ), reason: T.nilable(String), - stage: - Lithic::DisputeV2::Event::Data::Workflow::Stage::OrSymbol, - type: Symbol + stage: Lithic::DisputeV2::Event::Workflow::Data::Stage::OrSymbol ).returns(T.attached_class) end def self.new( @@ -338,9 +343,7 @@ module Lithic # Reason for the action reason:, # Current stage of the dispute workflow - stage:, - # Event type discriminator - type: :WORKFLOW + stage: ) end @@ -348,16 +351,15 @@ module Lithic override.returns( { action: - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol, + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol, amount: T.nilable(Integer), disposition: T.nilable( - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ), reason: T.nilable(String), stage: - Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol, - type: Symbol + Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol } ) end @@ -372,7 +374,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::DisputeV2::Event::Data::Workflow::Action + Lithic::DisputeV2::Event::Workflow::Data::Action ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -380,23 +382,23 @@ module Lithic OPENED = T.let( :OPENED, - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol ) CLOSED = T.let( :CLOSED, - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol ) REOPENED = T.let( :REOPENED, - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::Workflow::Action::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Action::TaggedSymbol ] ) end @@ -412,7 +414,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::DisputeV2::Event::Data::Workflow::Disposition + Lithic::DisputeV2::Event::Workflow::Data::Disposition ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -420,33 +422,33 @@ module Lithic WON = T.let( :WON, - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) LOST = T.let( :LOST, - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) PARTIALLY_WON = T.let( :PARTIALLY_WON, - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) WITHDRAWN = T.let( :WITHDRAWN, - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) DENIED = T.let( :DENIED, - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::Workflow::Disposition::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Disposition::TaggedSymbol ] ) end @@ -460,20 +462,20 @@ module Lithic TaggedSymbol = T.type_alias do - T.all(Symbol, Lithic::DisputeV2::Event::Data::Workflow::Stage) + T.all(Symbol, Lithic::DisputeV2::Event::Workflow::Data::Stage) end OrSymbol = T.type_alias { T.any(Symbol, String) } CLAIM = T.let( :CLAIM, - Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::Workflow::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Workflow::Data::Stage::TaggedSymbol ] ) end @@ -481,12 +483,77 @@ module Lithic end end end + end + + class Financial < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::DisputeV2::Event::Financial, + Lithic::Internal::AnyHash + ) + end + + # Unique identifier for the event, in UUID format + sig { returns(String) } + attr_accessor :token + + # When the event occurred + sig { returns(Time) } + attr_accessor :created + + # Details specific to financial events + sig { returns(Lithic::DisputeV2::Event::Financial::Data) } + attr_reader :data + + sig do + params(data: Lithic::DisputeV2::Event::Financial::Data::OrHash).void + end + attr_writer :data + + # Type of event. Always `FINANCIAL` + sig { returns(Symbol) } + attr_accessor :type + + # Event tracking a funds movement between issuer and acquirer + sig do + params( + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Financial::Data::OrHash, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the event, in UUID format + token:, + # When the event occurred + created:, + # Details specific to financial events + data:, + # Type of event. Always `FINANCIAL` + type: :FINANCIAL + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Financial::Data, + type: Symbol + } + ) + end + def to_hash + end - class Financial < Lithic::Internal::Type::BaseModel + class Data < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::DisputeV2::Event::Data::Financial, + Lithic::DisputeV2::Event::Financial::Data, Lithic::Internal::AnyHash ) end @@ -498,7 +565,7 @@ module Lithic # Direction of funds flow sig do returns( - Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol ) end attr_accessor :polarity @@ -506,24 +573,19 @@ module Lithic # Stage at which the financial event occurred sig do returns( - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) end attr_accessor :stage - # Event type discriminator - sig { returns(Symbol) } - attr_accessor :type - # Details specific to financial events sig do params( amount: Integer, polarity: - Lithic::DisputeV2::Event::Data::Financial::Polarity::OrSymbol, + Lithic::DisputeV2::Event::Financial::Data::Polarity::OrSymbol, stage: - Lithic::DisputeV2::Event::Data::Financial::Stage::OrSymbol, - type: Symbol + Lithic::DisputeV2::Event::Financial::Data::Stage::OrSymbol ).returns(T.attached_class) end def self.new( @@ -532,9 +594,7 @@ module Lithic # Direction of funds flow polarity:, # Stage at which the financial event occurred - stage:, - # Event type discriminator - type: :FINANCIAL + stage: ) end @@ -543,10 +603,9 @@ module Lithic { amount: Integer, polarity: - Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol, + Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol, stage: - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol, - type: Symbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol } ) end @@ -561,7 +620,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::DisputeV2::Event::Data::Financial::Polarity + Lithic::DisputeV2::Event::Financial::Data::Polarity ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -569,18 +628,18 @@ module Lithic CREDIT = T.let( :CREDIT, - Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol ) DEBIT = T.let( :DEBIT, - Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::Financial::Polarity::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Polarity::TaggedSymbol ] ) end @@ -596,7 +655,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::DisputeV2::Event::Data::Financial::Stage + Lithic::DisputeV2::Event::Financial::Data::Stage ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -604,33 +663,33 @@ module Lithic CHARGEBACK = T.let( :CHARGEBACK, - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) REPRESENTMENT = T.let( :REPRESENTMENT, - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) PREARBITRATION = T.let( :PREARBITRATION, - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) ARBITRATION = T.let( :ARBITRATION, - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) COLLABORATION = T.let( :COLLABORATION, - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::Financial::Stage::TaggedSymbol + Lithic::DisputeV2::Event::Financial::Data::Stage::TaggedSymbol ] ) end @@ -638,12 +697,79 @@ module Lithic end end end + end + + class CardholderLiability < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::DisputeV2::Event::CardholderLiability, + Lithic::Internal::AnyHash + ) + end + + # Unique identifier for the event, in UUID format + sig { returns(String) } + attr_accessor :token + + # When the event occurred + sig { returns(Time) } + attr_accessor :created + + # Details specific to cardholder liability events + sig { returns(Lithic::DisputeV2::Event::CardholderLiability::Data) } + attr_reader :data + + sig do + params( + data: Lithic::DisputeV2::Event::CardholderLiability::Data::OrHash + ).void + end + attr_writer :data + + # Type of event. Always `CARDHOLDER_LIABILITY` + sig { returns(Symbol) } + attr_accessor :type + + # Event tracking a change in cardholder liability + sig do + params( + token: String, + created: Time, + data: Lithic::DisputeV2::Event::CardholderLiability::Data::OrHash, + type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the event, in UUID format + token:, + # When the event occurred + created:, + # Details specific to cardholder liability events + data:, + # Type of event. Always `CARDHOLDER_LIABILITY` + type: :CARDHOLDER_LIABILITY + ) + end + + sig do + override.returns( + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::CardholderLiability::Data, + type: Symbol + } + ) + end + def to_hash + end - class CardholderLiability < Lithic::Internal::Type::BaseModel + class Data < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Lithic::DisputeV2::Event::Data::CardholderLiability, + Lithic::DisputeV2::Event::CardholderLiability::Data, Lithic::Internal::AnyHash ) end @@ -651,7 +777,7 @@ module Lithic # Action taken regarding cardholder liability sig do returns( - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ) end attr_accessor :action @@ -661,21 +787,16 @@ module Lithic attr_accessor :amount # Reason for the action - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_accessor :reason - # Event type discriminator - sig { returns(Symbol) } - attr_accessor :type - # Details specific to cardholder liability events sig do params( action: - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::OrSymbol, + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::OrSymbol, amount: Integer, - reason: String, - type: Symbol + reason: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -684,9 +805,7 @@ module Lithic # Amount in minor units amount:, # Reason for the action - reason:, - # Event type discriminator - type: :CARDHOLDER_LIABILITY + reason: ) end @@ -694,10 +813,9 @@ module Lithic override.returns( { action: - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol, + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol, amount: Integer, - reason: String, - type: Symbol + reason: T.nilable(String) } ) end @@ -712,7 +830,7 @@ module Lithic T.type_alias do T.all( Symbol, - Lithic::DisputeV2::Event::Data::CardholderLiability::Action + Lithic::DisputeV2::Event::CardholderLiability::Data::Action ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -720,28 +838,28 @@ module Lithic PROVISIONAL_CREDIT_GRANTED = T.let( :PROVISIONAL_CREDIT_GRANTED, - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ) PROVISIONAL_CREDIT_REVERSED = T.let( :PROVISIONAL_CREDIT_REVERSED, - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ) WRITTEN_OFF = T.let( :WRITTEN_OFF, - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ) WRITE_OFF_REVERSED = T.let( :WRITE_OFF_REVERSED, - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ) sig do override.returns( T::Array[ - Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + Lithic::DisputeV2::Event::CardholderLiability::Data::Action::TaggedSymbol ] ) end @@ -749,39 +867,10 @@ module Lithic end end end - - sig do - override.returns(T::Array[Lithic::DisputeV2::Event::Data::Variants]) - end - def self.variants - end end - # Type of event - module Type - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, Lithic::DisputeV2::Event::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - WORKFLOW = - T.let(:WORKFLOW, Lithic::DisputeV2::Event::Type::TaggedSymbol) - FINANCIAL = - T.let(:FINANCIAL, Lithic::DisputeV2::Event::Type::TaggedSymbol) - CARDHOLDER_LIABILITY = - T.let( - :CARDHOLDER_LIABILITY, - Lithic::DisputeV2::Event::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[Lithic::DisputeV2::Event::Type::TaggedSymbol] - ) - end - def self.values - end + sig { override.returns(T::Array[Lithic::DisputeV2::Event::Variants]) } + def self.variants end end diff --git a/sig/lithic/models/dispute_v2.rbs b/sig/lithic/models/dispute_v2.rbs index 5b32411e..7404fe4d 100644 --- a/sig/lithic/models/dispute_v2.rbs +++ b/sig/lithic/models/dispute_v2.rbs @@ -10,7 +10,7 @@ module Lithic created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, - events: ::Array[Lithic::DisputeV2::Event], + events: ::Array[Lithic::Models::DisputeV2::event], liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::Models::DisputeV2::network, @@ -36,7 +36,7 @@ module Lithic attr_accessor disposition: Lithic::Models::DisputeV2::disposition? - attr_accessor events: ::Array[Lithic::DisputeV2::Event] + attr_accessor events: ::Array[Lithic::Models::DisputeV2::event] attr_accessor liability_allocation: Lithic::DisputeV2::LiabilityAllocation @@ -59,7 +59,7 @@ module Lithic created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, - events: ::Array[Lithic::DisputeV2::Event], + events: ::Array[Lithic::Models::DisputeV2::event], liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::Models::DisputeV2::network, @@ -77,7 +77,7 @@ module Lithic created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, - events: ::Array[Lithic::DisputeV2::Event], + events: ::Array[Lithic::Models::DisputeV2::event], liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::Models::DisputeV2::network, @@ -101,83 +101,78 @@ module Lithic end type event = - { - token: String, - created: Time, - data: Lithic::Models::DisputeV2::Event::data, - type: Lithic::Models::DisputeV2::Event::type_ - } + Lithic::DisputeV2::Event::Workflow + | Lithic::DisputeV2::Event::Financial + | Lithic::DisputeV2::Event::CardholderLiability - class Event < Lithic::Internal::Type::BaseModel - attr_accessor token: String + module Event + extend Lithic::Internal::Type::Union - attr_accessor created: Time + type workflow = + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Workflow::Data, + type: :WORKFLOW + } - attr_accessor data: Lithic::Models::DisputeV2::Event::data + class Workflow < Lithic::Internal::Type::BaseModel + attr_accessor token: String - attr_accessor type: Lithic::Models::DisputeV2::Event::type_ + attr_accessor created: Time - def initialize: ( - token: String, - created: Time, - data: Lithic::Models::DisputeV2::Event::data, - type: Lithic::Models::DisputeV2::Event::type_ - ) -> void + attr_accessor data: Lithic::DisputeV2::Event::Workflow::Data - def to_hash: -> { - token: String, - created: Time, - data: Lithic::Models::DisputeV2::Event::data, - type: Lithic::Models::DisputeV2::Event::type_ - } + attr_accessor type: :WORKFLOW - type data = - Lithic::DisputeV2::Event::Data::Workflow - | Lithic::DisputeV2::Event::Data::Financial - | Lithic::DisputeV2::Event::Data::CardholderLiability + def initialize: ( + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Workflow::Data, + ?type: :WORKFLOW + ) -> void - module Data - extend Lithic::Internal::Type::Union + def to_hash: -> { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Workflow::Data, + type: :WORKFLOW + } - type workflow = + type data = { - action: Lithic::Models::DisputeV2::Event::Data::Workflow::action, + action: Lithic::Models::DisputeV2::Event::Workflow::Data::action, amount: Integer?, - disposition: Lithic::Models::DisputeV2::Event::Data::Workflow::disposition?, + disposition: Lithic::Models::DisputeV2::Event::Workflow::Data::disposition?, reason: String?, - stage: Lithic::Models::DisputeV2::Event::Data::Workflow::stage, - type: :WORKFLOW + stage: Lithic::Models::DisputeV2::Event::Workflow::Data::stage } - class Workflow < Lithic::Internal::Type::BaseModel - attr_accessor action: Lithic::Models::DisputeV2::Event::Data::Workflow::action + class Data < Lithic::Internal::Type::BaseModel + attr_accessor action: Lithic::Models::DisputeV2::Event::Workflow::Data::action attr_accessor amount: Integer? - attr_accessor disposition: Lithic::Models::DisputeV2::Event::Data::Workflow::disposition? + attr_accessor disposition: Lithic::Models::DisputeV2::Event::Workflow::Data::disposition? attr_accessor reason: String? - attr_accessor stage: Lithic::Models::DisputeV2::Event::Data::Workflow::stage - - attr_accessor type: :WORKFLOW + attr_accessor stage: Lithic::Models::DisputeV2::Event::Workflow::Data::stage def initialize: ( - action: Lithic::Models::DisputeV2::Event::Data::Workflow::action, + action: Lithic::Models::DisputeV2::Event::Workflow::Data::action, amount: Integer?, - disposition: Lithic::Models::DisputeV2::Event::Data::Workflow::disposition?, + disposition: Lithic::Models::DisputeV2::Event::Workflow::Data::disposition?, reason: String?, - stage: Lithic::Models::DisputeV2::Event::Data::Workflow::stage, - ?type: :WORKFLOW + stage: Lithic::Models::DisputeV2::Event::Workflow::Data::stage ) -> void def to_hash: -> { - action: Lithic::Models::DisputeV2::Event::Data::Workflow::action, + action: Lithic::Models::DisputeV2::Event::Workflow::Data::action, amount: Integer?, - disposition: Lithic::Models::DisputeV2::Event::Data::Workflow::disposition?, + disposition: Lithic::Models::DisputeV2::Event::Workflow::Data::disposition?, reason: String?, - stage: Lithic::Models::DisputeV2::Event::Data::Workflow::stage, - type: :WORKFLOW + stage: Lithic::Models::DisputeV2::Event::Workflow::Data::stage } type action = :OPENED | :CLOSED | :REOPENED @@ -189,7 +184,7 @@ module Lithic CLOSED: :CLOSED REOPENED: :REOPENED - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::Workflow::action] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Workflow::Data::action] end type disposition = @@ -204,7 +199,7 @@ module Lithic WITHDRAWN: :WITHDRAWN DENIED: :DENIED - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::Workflow::disposition] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Workflow::Data::disposition] end type stage = :CLAIM @@ -214,39 +209,66 @@ module Lithic CLAIM: :CLAIM - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::Workflow::stage] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Workflow::Data::stage] end end + end + + type financial = + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Financial::Data, + type: :FINANCIAL + } - type financial = + class Financial < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor data: Lithic::DisputeV2::Event::Financial::Data + + attr_accessor type: :FINANCIAL + + def initialize: ( + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Financial::Data, + ?type: :FINANCIAL + ) -> void + + def to_hash: -> { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::Financial::Data, + type: :FINANCIAL + } + + type data = { amount: Integer, - polarity: Lithic::Models::DisputeV2::Event::Data::Financial::polarity, - stage: Lithic::Models::DisputeV2::Event::Data::Financial::stage, - type: :FINANCIAL + polarity: Lithic::Models::DisputeV2::Event::Financial::Data::polarity, + stage: Lithic::Models::DisputeV2::Event::Financial::Data::stage } - class Financial < Lithic::Internal::Type::BaseModel + class Data < Lithic::Internal::Type::BaseModel attr_accessor amount: Integer - attr_accessor polarity: Lithic::Models::DisputeV2::Event::Data::Financial::polarity + attr_accessor polarity: Lithic::Models::DisputeV2::Event::Financial::Data::polarity - attr_accessor stage: Lithic::Models::DisputeV2::Event::Data::Financial::stage - - attr_accessor type: :FINANCIAL + attr_accessor stage: Lithic::Models::DisputeV2::Event::Financial::Data::stage def initialize: ( amount: Integer, - polarity: Lithic::Models::DisputeV2::Event::Data::Financial::polarity, - stage: Lithic::Models::DisputeV2::Event::Data::Financial::stage, - ?type: :FINANCIAL + polarity: Lithic::Models::DisputeV2::Event::Financial::Data::polarity, + stage: Lithic::Models::DisputeV2::Event::Financial::Data::stage ) -> void def to_hash: -> { amount: Integer, - polarity: Lithic::Models::DisputeV2::Event::Data::Financial::polarity, - stage: Lithic::Models::DisputeV2::Event::Data::Financial::stage, - type: :FINANCIAL + polarity: Lithic::Models::DisputeV2::Event::Financial::Data::polarity, + stage: Lithic::Models::DisputeV2::Event::Financial::Data::stage } type polarity = :CREDIT | :DEBIT @@ -257,7 +279,7 @@ module Lithic CREDIT: :CREDIT DEBIT: :DEBIT - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::Financial::polarity] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Financial::Data::polarity] end type stage = @@ -276,39 +298,66 @@ module Lithic ARBITRATION: :ARBITRATION COLLABORATION: :COLLABORATION - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::Financial::stage] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Financial::Data::stage] end end + end - type cardholder_liability = + type cardholder_liability = + { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::CardholderLiability::Data, + type: :CARDHOLDER_LIABILITY + } + + class CardholderLiability < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor created: Time + + attr_accessor data: Lithic::DisputeV2::Event::CardholderLiability::Data + + attr_accessor type: :CARDHOLDER_LIABILITY + + def initialize: ( + token: String, + created: Time, + data: Lithic::DisputeV2::Event::CardholderLiability::Data, + ?type: :CARDHOLDER_LIABILITY + ) -> void + + def to_hash: -> { + token: String, + created: Time, + data: Lithic::DisputeV2::Event::CardholderLiability::Data, + type: :CARDHOLDER_LIABILITY + } + + type data = { - action: Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action, + action: Lithic::Models::DisputeV2::Event::CardholderLiability::Data::action, amount: Integer, - reason: String, - type: :CARDHOLDER_LIABILITY + reason: String? } - class CardholderLiability < Lithic::Internal::Type::BaseModel - attr_accessor action: Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action + class Data < Lithic::Internal::Type::BaseModel + attr_accessor action: Lithic::Models::DisputeV2::Event::CardholderLiability::Data::action attr_accessor amount: Integer - attr_accessor reason: String - - attr_accessor type: :CARDHOLDER_LIABILITY + attr_accessor reason: String? def initialize: ( - action: Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action, + action: Lithic::Models::DisputeV2::Event::CardholderLiability::Data::action, amount: Integer, - reason: String, - ?type: :CARDHOLDER_LIABILITY + reason: String? ) -> void def to_hash: -> { - action: Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action, + action: Lithic::Models::DisputeV2::Event::CardholderLiability::Data::action, amount: Integer, - reason: String, - type: :CARDHOLDER_LIABILITY + reason: String? } type action = @@ -325,24 +374,12 @@ module Lithic WRITTEN_OFF: :WRITTEN_OFF WRITE_OFF_REVERSED: :WRITE_OFF_REVERSED - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action] + def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::CardholderLiability::Data::action] end end - - def self?.variants: -> ::Array[Lithic::Models::DisputeV2::Event::data] end - type type_ = :WORKFLOW | :FINANCIAL | :CARDHOLDER_LIABILITY - - module Type - extend Lithic::Internal::Type::Enum - - WORKFLOW: :WORKFLOW - FINANCIAL: :FINANCIAL - CARDHOLDER_LIABILITY: :CARDHOLDER_LIABILITY - - def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::type_] - end + def self?.variants: -> ::Array[Lithic::Models::DisputeV2::event] end type liability_allocation = diff --git a/test/lithic/resources/disputes_v2_test.rb b/test/lithic/resources/disputes_v2_test.rb index ef57e09f..37ef1819 100644 --- a/test/lithic/resources/disputes_v2_test.rb +++ b/test/lithic/resources/disputes_v2_test.rb @@ -20,7 +20,7 @@ def test_retrieve created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, - events: ^(Lithic::Internal::Type::ArrayOf[Lithic::DisputeV2::Event]), + events: ^(Lithic::Internal::Type::ArrayOf[union: Lithic::DisputeV2::Event]), liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::DisputeV2::Network, @@ -55,7 +55,7 @@ def test_list created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, - events: ^(Lithic::Internal::Type::ArrayOf[Lithic::DisputeV2::Event]), + events: ^(Lithic::Internal::Type::ArrayOf[union: Lithic::DisputeV2::Event]), liability_allocation: Lithic::DisputeV2::LiabilityAllocation, merchant: Lithic::Merchant, network: Lithic::DisputeV2::Network, From ce96330d08b6f3b9bbc4ee1011dcc7080f839a38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:17:53 +0000 Subject: [PATCH 17/19] feat: Make blockchain recipient account_token nullable --- .stats.yml | 4 ++-- lib/lithic/models/blockchain_recipient.rb | 9 +++++---- rbi/lithic/models/blockchain_recipient.rbi | 12 +++++++----- sig/lithic/models/blockchain_recipient.rbs | 8 ++++---- test/lithic/resources/blockchain_recipients_test.rb | 2 +- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index bf4a80ab..c15505b9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-70848844b69f7905307f9986b5630160aee26497cdbaf9257839a088ae7ca00b.yml -openapi_spec_hash: a5d37fbb60eba858c8bd2ebe982936e1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9829c574c7a227436f0828b64037e25825704e2d26115ec48750affcdb2bf0e0.yml +openapi_spec_hash: c5c6cbb7b3b9d1e4663844122b5d6012 config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/lib/lithic/models/blockchain_recipient.rb b/lib/lithic/models/blockchain_recipient.rb index be3aae98..6461336e 100644 --- a/lib/lithic/models/blockchain_recipient.rb +++ b/lib/lithic/models/blockchain_recipient.rb @@ -11,10 +11,11 @@ class BlockchainRecipient < Lithic::Internal::Type::BaseModel required :token, String # @!attribute account_token - # The financial account the blockchain recipient belongs to + # The financial account the blockchain recipient belongs to, or null when the + # recipient is registered against the program rather than a financial account # - # @return [String] - required :account_token, String + # @return [String, nil] + required :account_token, String, nil?: true # @!attribute address_tag # An optional tag or memo used by some chains to identify the destination of a @@ -90,7 +91,7 @@ class BlockchainRecipient < Lithic::Internal::Type::BaseModel # # @param token [String] A globally unique identifier for this blockchain recipient # - # @param account_token [String] The financial account the blockchain recipient belongs to + # @param account_token [String, nil] The financial account the blockchain recipient belongs to, or null when the reci # # @param address_tag [String, nil] An optional tag or memo used by some chains to identify the destination of a tra # diff --git a/rbi/lithic/models/blockchain_recipient.rbi b/rbi/lithic/models/blockchain_recipient.rbi index 222c4da3..642b95b0 100644 --- a/rbi/lithic/models/blockchain_recipient.rbi +++ b/rbi/lithic/models/blockchain_recipient.rbi @@ -12,8 +12,9 @@ module Lithic sig { returns(String) } attr_accessor :token - # The financial account the blockchain recipient belongs to - sig { returns(String) } + # The financial account the blockchain recipient belongs to, or null when the + # recipient is registered against the program rather than a financial account + sig { returns(T.nilable(String)) } attr_accessor :account_token # An optional tag or memo used by some chains to identify the destination of a @@ -67,7 +68,7 @@ module Lithic sig do params( token: String, - account_token: String, + account_token: T.nilable(String), address_tag: T.nilable(String), chain: String, created: Time, @@ -85,7 +86,8 @@ module Lithic def self.new( # A globally unique identifier for this blockchain recipient token:, - # The financial account the blockchain recipient belongs to + # The financial account the blockchain recipient belongs to, or null when the + # recipient is registered against the program rather than a financial account account_token:, # An optional tag or memo used by some chains to identify the destination of a # transfer within a shared address @@ -118,7 +120,7 @@ module Lithic override.returns( { token: String, - account_token: String, + account_token: T.nilable(String), address_tag: T.nilable(String), chain: String, created: Time, diff --git a/sig/lithic/models/blockchain_recipient.rbs b/sig/lithic/models/blockchain_recipient.rbs index 6192929a..6b2c4895 100644 --- a/sig/lithic/models/blockchain_recipient.rbs +++ b/sig/lithic/models/blockchain_recipient.rbs @@ -3,7 +3,7 @@ module Lithic type blockchain_recipient = { token: String, - account_token: String, + account_token: String?, address_tag: String?, chain: String, created: Time, @@ -20,7 +20,7 @@ module Lithic class BlockchainRecipient < Lithic::Internal::Type::BaseModel attr_accessor token: String - attr_accessor account_token: String + attr_accessor account_token: String? attr_accessor address_tag: String? @@ -46,7 +46,7 @@ module Lithic def initialize: ( token: String, - account_token: String, + account_token: String?, address_tag: String?, chain: String, created: Time, @@ -62,7 +62,7 @@ module Lithic def to_hash: -> { token: String, - account_token: String, + account_token: String?, address_tag: String?, chain: String, created: Time, diff --git a/test/lithic/resources/blockchain_recipients_test.rb b/test/lithic/resources/blockchain_recipients_test.rb index bad4ec8c..ba7cce4f 100644 --- a/test/lithic/resources/blockchain_recipients_test.rb +++ b/test/lithic/resources/blockchain_recipients_test.rb @@ -20,7 +20,7 @@ def test_create_required_params assert_pattern do response => { token: String, - account_token: String, + account_token: String | nil, address_tag: String | nil, chain: String, created: Time, From 2f6bdfaf9f1c6c9128e765e10b495252ca9711ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:05:45 +0000 Subject: [PATCH 18/19] feat(api): add reassign_account method to cards --- .stats.yml | 8 +-- lib/lithic.rb | 1 + lib/lithic/models.rb | 2 + .../models/card_reassign_account_params.rb | 29 +++++++++++ lib/lithic/resources/cards.rb | 27 ++++++++++ rbi/lithic/models.rbi | 2 + .../models/card_reassign_account_params.rbi | 49 +++++++++++++++++++ rbi/lithic/resources/cards.rbi | 19 +++++++ sig/lithic/models.rbs | 2 + .../models/card_reassign_account_params.rbs | 28 +++++++++++ sig/lithic/resources/cards.rbs | 6 +++ test/lithic/resources/cards_test.rb | 12 +++++ 12 files changed, 181 insertions(+), 4 deletions(-) create mode 100644 lib/lithic/models/card_reassign_account_params.rb create mode 100644 rbi/lithic/models/card_reassign_account_params.rbi create mode 100644 sig/lithic/models/card_reassign_account_params.rbs diff --git a/.stats.yml b/.stats.yml index c15505b9..47c7d754 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9829c574c7a227436f0828b64037e25825704e2d26115ec48750affcdb2bf0e0.yml -openapi_spec_hash: c5c6cbb7b3b9d1e4663844122b5d6012 -config_hash: f6d04d790aaddf639fc04b7f0092e7ec +configured_endpoints: 216 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-38a020a15ab14f79c7fea3290822406cf80a9d43d46ab3295632a9723f5e42cd.yml +openapi_spec_hash: 5a7357a17c5119bc91d8f5e42297fac3 +config_hash: 27fa50e251754c8982e3dc615ef6da41 diff --git a/lib/lithic.rb b/lib/lithic.rb index 79f7a288..d7c81541 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -199,6 +199,7 @@ require_relative "lithic/models/card_program_retrieve_params" require_relative "lithic/models/card_provision_params" require_relative "lithic/models/card_provision_response" +require_relative "lithic/models/card_reassign_account_params" require_relative "lithic/models/card_reissued_webhook_event" require_relative "lithic/models/card_reissue_params" require_relative "lithic/models/card_renewed_webhook_event" diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index e942c266..4dde49d0 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -178,6 +178,8 @@ module Lithic CardProvisionParams = Lithic::Models::CardProvisionParams + CardReassignAccountParams = Lithic::Models::CardReassignAccountParams + CardReissuedWebhookEvent = Lithic::Models::CardReissuedWebhookEvent CardReissueParams = Lithic::Models::CardReissueParams diff --git a/lib/lithic/models/card_reassign_account_params.rb b/lib/lithic/models/card_reassign_account_params.rb new file mode 100644 index 00000000..68a6a467 --- /dev/null +++ b/lib/lithic/models/card_reassign_account_params.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::Cards#reassign_account + class CardReassignAccountParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute card_token + # + # @return [String] + required :card_token, String + + # @!attribute new_account_token + # Globally unique identifier for the account to associate with the card + # + # @return [String] + required :new_account_token, String + + # @!method initialize(card_token:, new_account_token:, request_options: {}) + # @param card_token [String] + # + # @param new_account_token [String] Globally unique identifier for the account to associate with the card + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/resources/cards.rb b/lib/lithic/resources/cards.rb index 74a38d4b..41dccc8c 100644 --- a/lib/lithic/resources/cards.rb +++ b/lib/lithic/resources/cards.rb @@ -327,6 +327,33 @@ def provision(card_token, params = {}) ) end + # Reassigns a card to another account. The card must be in an `OPEN` or `PAUSED` + # state, and the destination account must be in an `ACTIVE` state. + # + # Clients must contact their Lithic account manager for access to this endpoint. + # + # @overload reassign_account(card_token, new_account_token:, request_options: {}) + # + # @param card_token [String] + # + # @param new_account_token [String] Globally unique identifier for the account to associate with the card + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::Card] + # + # @see Lithic::Models::CardReassignAccountParams + def reassign_account(card_token, params) + parsed, options = Lithic::CardReassignAccountParams.dump_request(params) + @client.request( + method: :post, + path: ["v1/cards/%1$s/reassign_account", card_token], + body: parsed, + model: Lithic::Card, + options: options + ) + end + # Some parameter documentations has been truncated, see # {Lithic::Models::CardReissueParams} for more details. # diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 80bceebc..eb73cf11 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -158,6 +158,8 @@ module Lithic CardProvisionParams = Lithic::Models::CardProvisionParams + CardReassignAccountParams = Lithic::Models::CardReassignAccountParams + CardReissuedWebhookEvent = Lithic::Models::CardReissuedWebhookEvent CardReissueParams = Lithic::Models::CardReissueParams diff --git a/rbi/lithic/models/card_reassign_account_params.rbi b/rbi/lithic/models/card_reassign_account_params.rbi new file mode 100644 index 00000000..06707f0c --- /dev/null +++ b/rbi/lithic/models/card_reassign_account_params.rbi @@ -0,0 +1,49 @@ +# typed: strong + +module Lithic + module Models + class CardReassignAccountParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Lithic::CardReassignAccountParams, Lithic::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :card_token + + # Globally unique identifier for the account to associate with the card + sig { returns(String) } + attr_accessor :new_account_token + + sig do + params( + card_token: String, + new_account_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + card_token:, + # Globally unique identifier for the account to associate with the card + new_account_token:, + request_options: {} + ) + end + + sig do + override.returns( + { + card_token: String, + new_account_token: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 218cce9d..f1a6a6ac 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -489,6 +489,25 @@ module Lithic ) end + # Reassigns a card to another account. The card must be in an `OPEN` or `PAUSED` + # state, and the destination account must be in an `ACTIVE` state. + # + # Clients must contact their Lithic account manager for access to this endpoint. + sig do + params( + card_token: String, + new_account_token: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::Card) + end + def reassign_account( + card_token, + # Globally unique identifier for the account to associate with the card + new_account_token:, + request_options: {} + ) + end + # Initiate print and shipment of a duplicate physical card (e.g. card is # physically damaged). The PAN, expiry, and CVC2 will remain the same and the # original card can continue to be used until the new card is activated. Only diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 78828ae8..38d60a8c 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -135,6 +135,8 @@ module Lithic class CardProvisionParams = Lithic::Models::CardProvisionParams + class CardReassignAccountParams = Lithic::Models::CardReassignAccountParams + class CardReissuedWebhookEvent = Lithic::Models::CardReissuedWebhookEvent class CardReissueParams = Lithic::Models::CardReissueParams diff --git a/sig/lithic/models/card_reassign_account_params.rbs b/sig/lithic/models/card_reassign_account_params.rbs new file mode 100644 index 00000000..91a81dfb --- /dev/null +++ b/sig/lithic/models/card_reassign_account_params.rbs @@ -0,0 +1,28 @@ +module Lithic + module Models + type card_reassign_account_params = + { card_token: String, new_account_token: String } + & Lithic::Internal::Type::request_parameters + + class CardReassignAccountParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor card_token: String + + attr_accessor new_account_token: String + + def initialize: ( + card_token: String, + new_account_token: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + card_token: String, + new_account_token: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/resources/cards.rbs b/sig/lithic/resources/cards.rbs index 71d04318..25e30db6 100644 --- a/sig/lithic/resources/cards.rbs +++ b/sig/lithic/resources/cards.rbs @@ -88,6 +88,12 @@ module Lithic ?request_options: Lithic::request_opts ) -> Lithic::Models::CardProvisionResponse + def reassign_account: ( + String card_token, + new_account_token: String, + ?request_options: Lithic::request_opts + ) -> Lithic::Card + def reissue: ( String card_token, ?carrier: Lithic::Carrier, diff --git a/test/lithic/resources/cards_test.rb b/test/lithic/resources/cards_test.rb index ef519052..a7ebf1be 100644 --- a/test/lithic/resources/cards_test.rb +++ b/test/lithic/resources/cards_test.rb @@ -114,6 +114,18 @@ def test_provision end end + def test_reassign_account_required_params + response = + @lithic.cards.reassign_account( + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + new_account_token: "82d7c408-2bbb-4f63-889a-8a2a2b1601af" + ) + + assert_pattern do + response => Lithic::Card + end + end + def test_reissue response = @lithic.cards.reissue("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") From 2edbe5acdc3ce2e89227ccfe7fd75797b0fb85e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:06:21 +0000 Subject: [PATCH 19/19] release: 0.20.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e7562934..0c2ecec6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.19.0" + ".": "0.20.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e65cdb43..bd4faf6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## 0.20.0 (2026-08-31) + +Full Changelog: [v0.19.0...v0.20.0](https://github.com/lithic-com/lithic-ruby/compare/v0.19.0...v0.20.0) + +### Features + +* **api:** add blockchain_addresses field to FinancialAccount model ([c46e82c](https://github.com/lithic-com/lithic-ruby/commit/c46e82cc5bf4560c31adc1ebd6e991b55a1c3f2d)) +* **api:** add blockchain_recipients resource ([437d522](https://github.com/lithic-com/lithic-ruby/commit/437d5226c1c6b1dfd8faaa70787e8b2ea533f14a)) +* **api:** add claim_token field/param and WRITE_OFF_REVERSED to disputes v2 ([d32fe12](https://github.com/lithic-com/lithic-ruby/commit/d32fe12d9edaa339a12b61333e542f24c67f3c2e)) +* **api:** add limit_cash_amount and limit_cash_count to velocity limit params ([4e4dfb7](https://github.com/lithic-com/lithic-ruby/commit/4e4dfb78069500939027ed67d445d63160cd9e1c)) +* **api:** add PROGRAM scope to auth rules, FINANCIAL_ACCOUNT/PROGRAM to case_entity ([1520693](https://github.com/lithic-com/lithic-ruby/commit/15206930f871b13afd3852083c6bf778a83e6eb9)) +* **api:** add reassign_account method to cards ([2f6bdfa](https://github.com/lithic-com/lithic-ruby/commit/2f6bdfaf9f1c6c9128e765e10b495252ca9711ce)) +* **api:** add STABLECOIN enum value to payment type ([5151e5d](https://github.com/lithic-com/lithic-ruby/commit/5151e5d6276054b59f41d32af07efae6badabcbb)) +* **api:** add stablecoin event types to payment/financial_event/statement_line_items ([2f1fbca](https://github.com/lithic-com/lithic-ruby/commit/2f1fbca332e111e3624d834a774db3f7d979f4a4)) +* **api:** add STABLECOIN method, make method_attributes nullable in Payment ([6ecbe70](https://github.com/lithic-com/lithic-ruby/commit/6ecbe702c2e3d1cd3e5623cecf46e4bc02fb3b41)) +* **api:** add stablecoin payment method type to payments ([80e026a](https://github.com/lithic-com/lithic-ruby/commit/80e026ae4b67579db63140dcaa70c44409b47b83)) +* **api:** add stablecoin_inbound/stablecoin_outbound to payment type enum ([087861b](https://github.com/lithic-com/lithic-ruby/commit/087861b820756e52b92ff69b5d7929109e27ba59)) +* Make blockchain recipient account_token nullable ([ce96330](https://github.com/lithic-com/lithic-ruby/commit/ce96330d08b6f3b9bbc4ee1011dcc7080f839a38)) +* Remove stablecoin transfer type ([41e80f8](https://github.com/lithic-com/lithic-ruby/commit/41e80f87c3b3a3167f97c4657acd71cf28bc3074)) + + +### Bug Fixes + +* **types:** rename event data variants, remove type discriminator in dispute_v2 ([aeedd0a](https://github.com/lithic-com/lithic-ruby/commit/aeedd0ab75d527323dc8a748af1ea86a95f52ac5)) + + +### Chores + +* **internal:** allow the mock server port to be set with STAINLESS_MOCK_PORT ([0fbeb86](https://github.com/lithic-com/lithic-ruby/commit/0fbeb86633809668c1bd304a40b2f23860b232be)) + + +### Documentation + +* **api:** update client_device_id and client_wallet_account_id descriptions in card provision ([e5cd94f](https://github.com/lithic-com/lithic-ruby/commit/e5cd94f58dbafc40ab1f2e25182b4b559d2ed258)) +* **api:** update cvv field documentation in Card and tokenization ([b520213](https://github.com/lithic-com/lithic-ruby/commit/b520213ceec3af853f96b5ca9e8ef32a34169a0a)) + ## 0.19.0 (2026-07-30) Full Changelog: [v0.18.1...v0.19.0](https://github.com/lithic-com/lithic-ruby/compare/v0.18.1...v0.19.0) diff --git a/Gemfile.lock b/Gemfile.lock index 310ca168..53f1b0d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.19.0) + lithic (0.20.0) cgi connection_pool diff --git a/README.md b/README.md index 18e8a51b..55ac7cac 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.19.0" +gem "lithic", "~> 0.20.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 2a47352e..125be3f9 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.19.0" + VERSION = "0.20.0" end