From 0fe9646694e932fddba74b91dcc7cdb1bb565d10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 19:46:47 +0000 Subject: [PATCH 01/17] feat(api): Add card state attribute to tokenization rules feat(api): Add event_type to ASA request and 3DS decisioning request feat(api): Add user defined status to ledger accounts feat(api): Expose Payment Allocation Details chore: update code formatting docs: Update language for Google Web Push Provisioning docs --- rbi/lithic/resources/webhooks.rbi | 62 ++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/rbi/lithic/resources/webhooks.rbi b/rbi/lithic/resources/webhooks.rbi index 767a2dfd..1d887194 100644 --- a/rbi/lithic/resources/webhooks.rbi +++ b/rbi/lithic/resources/webhooks.rbi @@ -8,7 +8,67 @@ module Lithic payload: String, headers: T::Hash[String, String], secret: T.nilable(String) - ).returns(Lithic::ParsedWebhookEvent::Variants) + ).returns( + T.any( + Lithic::AccountHolderCreatedWebhookEvent, + Lithic::ParsedWebhookEvent::KYBPayload, + Lithic::ParsedWebhookEvent::KYCPayload, + Lithic::ParsedWebhookEvent::LegacyPayload, + Lithic::AccountHolderVerificationWebhookEvent, + Lithic::AccountHolderDocumentUpdatedWebhookEvent, + Lithic::CardAuthorizationApprovalRequestWebhookEvent, + Lithic::TokenizationDecisioningRequestWebhookEvent, + Lithic::AuthRulesBacktestReportCreatedWebhookEvent, + Lithic::BalanceUpdatedWebhookEvent, + Lithic::BookTransferTransactionCreatedWebhookEvent, + Lithic::BookTransferTransactionUpdatedWebhookEvent, + Lithic::CardCreatedWebhookEvent, + Lithic::CardConvertedWebhookEvent, + Lithic::CardRenewedWebhookEvent, + Lithic::CardReissuedWebhookEvent, + Lithic::CardShippedWebhookEvent, + Lithic::CardTransactionUpdatedWebhookEvent, + Lithic::CardTransactionEnhancedDataCreatedWebhookEvent, + Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent, + Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent, + Lithic::DigitalWalletTokenizationResultWebhookEvent, + Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, + Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, + Lithic::DigitalWalletTokenizationUpdatedWebhookEvent, + Lithic::DisputeUpdatedWebhookEvent, + Lithic::DisputeEvidenceUploadFailedWebhookEvent, + Lithic::ExternalBankAccountCreatedWebhookEvent, + Lithic::ExternalBankAccountUpdatedWebhookEvent, + Lithic::ExternalPaymentCreatedWebhookEvent, + Lithic::ExternalPaymentUpdatedWebhookEvent, + Lithic::FinancialAccountCreatedWebhookEvent, + Lithic::FinancialAccountUpdatedWebhookEvent, + Lithic::FundingEventCreatedWebhookEvent, + Lithic::LoanTapeCreatedWebhookEvent, + Lithic::LoanTapeUpdatedWebhookEvent, + Lithic::ManagementOperationCreatedWebhookEvent, + Lithic::ManagementOperationUpdatedWebhookEvent, + Lithic::InternalTransactionCreatedWebhookEvent, + Lithic::InternalTransactionUpdatedWebhookEvent, + Lithic::NetworkTotalCreatedWebhookEvent, + Lithic::NetworkTotalUpdatedWebhookEvent, + Lithic::PaymentTransactionCreatedWebhookEvent, + Lithic::PaymentTransactionUpdatedWebhookEvent, + Lithic::SettlementReportUpdatedWebhookEvent, + Lithic::StatementsCreatedWebhookEvent, + Lithic::ThreeDSAuthenticationCreatedWebhookEvent, + Lithic::ThreeDSAuthenticationUpdatedWebhookEvent, + Lithic::ThreeDSAuthenticationChallengeWebhookEvent, + Lithic::TokenizationApprovalRequestWebhookEvent, + Lithic::TokenizationResultWebhookEvent, + Lithic::TokenizationTwoFactorAuthenticationCodeWebhookEvent, + Lithic::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, + Lithic::TokenizationUpdatedWebhookEvent, + Lithic::ThreeDSAuthenticationApprovalRequestWebhookEvent, + Lithic::DisputeTransactionCreatedWebhookEvent, + Lithic::DisputeTransactionUpdatedWebhookEvent + ) + ) end def parse(payload, headers:, secret: nil) end From ba770b2cd5f50ba1871c539f89036ff4538b1df2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 21:10:37 +0000 Subject: [PATCH 02/17] chore: configure new SDK language --- .stats.yml | 2 +- README.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ddb484b7..44b43de3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a -config_hash: 9dddee5f7af579864599849cb28a0770 +config_hash: 751a4cc75aa0276b40cc2c7879b24dea diff --git a/README.md b/README.md index 2333dd34..6df183ac 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,15 @@ The Lithic Ruby library provides convenient access to the Lithic REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/lithic-com/lithic-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. +## MCP Server + +Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. + +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXX0) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%7D) + +> Note: You may need to set environment variables in your MCP client. + ## Documentation Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic). From 143a5ea456ee1e6db32fd923ddb68f749ceed53b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:35:18 +0000 Subject: [PATCH 03/17] chore(internal): codegen related update --- Gemfile.lock | 2 ++ lithic.gemspec | 1 + 2 files changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index ec7d09db..20fbb144 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,6 +19,7 @@ PATH remote: . specs: lithic (0.3.0) + cgi connection_pool GEM @@ -49,6 +50,7 @@ GEM base64 (0.3.0) benchmark (0.5.0) bigdecimal (3.3.1) + cgi (0.5.1) concurrent-ruby (1.3.5) connection_pool (2.5.4) console (1.34.2) diff --git a/lithic.gemspec b/lithic.gemspec index fb28b4e3..004e5d22 100644 --- a/lithic.gemspec +++ b/lithic.gemspec @@ -24,5 +24,6 @@ Gem::Specification.new do |s| ".ignore" ] s.extra_rdoc_files = ["README.md"] + s.add_dependency "cgi" s.add_dependency "connection_pool" end From 3e09d4a5488c83ad8122c973baf5eb4e18de29b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 11:15:57 +0000 Subject: [PATCH 04/17] feat(api): make filter optional for Spend Velocity Auth Rules fix(api): rename WIRE_DRAWDOWN_REQUEST to WIRE_INBOUND_DRAWDOWN_REQUEST --- .stats.yml | 6 +- README.md | 9 -- .../auth_rules/velocity_limit_params.rb | 42 ++++----- lib/lithic/models/payment.rb | 2 +- .../auth_rules/velocity_limit_params.rbi | 92 ++++++++++--------- rbi/lithic/models/payment.rbi | 7 +- .../auth_rules/velocity_limit_params.rbs | 36 ++++---- sig/lithic/models/payment.rbs | 4 +- 8 files changed, 99 insertions(+), 99 deletions(-) diff --git a/.stats.yml b/.stats.yml index 44b43de3..ac611e10 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml -openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a -config_hash: 751a4cc75aa0276b40cc2c7879b24dea +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c06c4d54858775fef1de57e33d471e997cb28fe0c925fd7b08ba45fdd335e938.yml +openapi_spec_hash: 23745357b2171bcdfb5d30bfef1df48d +config_hash: 9dddee5f7af579864599849cb28a0770 diff --git a/README.md b/README.md index 6df183ac..2333dd34 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,6 @@ The Lithic Ruby library provides convenient access to the Lithic REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/lithic-com/lithic-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. -## MCP Server - -Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. - -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXX0) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%7D) - -> Note: You may need to set environment variables in your MCP client. - ## Documentation Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic). diff --git a/lib/lithic/models/auth_rules/velocity_limit_params.rb b/lib/lithic/models/auth_rules/velocity_limit_params.rb index af706df4..55b2d7a4 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params.rb @@ -4,11 +4,6 @@ module Lithic module Models module AuthRules class VelocityLimitParams < Lithic::Internal::Type::BaseModel - # @!attribute filters - # - # @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters] - required :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters } - # @!attribute period # Velocity over the current day since 00:00 / 12 AM in Eastern Time # @@ -21,6 +16,11 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope] required :scope, enum: -> { Lithic::AuthRules::VelocityLimitParams::Scope } + # @!attribute filters + # + # @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters, nil] + optional :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters } + # @!attribute limit_amount # The maximum amount of spend velocity allowed in the period in minor units (the # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this @@ -39,20 +39,33 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Integer, nil] optional :limit_count, Integer, nil?: true - # @!method initialize(filters:, period:, scope:, limit_amount: nil, limit_count: nil) + # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_count: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::VelocityLimitParams} for more details. # - # @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters] - # # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time # # @param scope [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope] The scope the velocity is calculated for # + # @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters] + # # @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s # # @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 + # + # @see Lithic::Models::AuthRules::VelocityLimitParams#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + # @see Lithic::Models::AuthRules::VelocityLimitParams#filters class Filters < Lithic::Internal::Type::BaseModel # @!attribute exclude_countries @@ -133,19 +146,6 @@ module IncludePanEntryMode # @return [Array] end end - - # The scope the velocity is calculated for - # - # @see Lithic::Models::AuthRules::VelocityLimitParams#scope - module Scope - extend Lithic::Internal::Type::Enum - - CARD = :CARD - ACCOUNT = :ACCOUNT - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index 68b8f367..aa25ca3c 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -650,7 +650,7 @@ module Type WIRE_INBOUND_ADMIN = :WIRE_INBOUND_ADMIN WIRE_OUTBOUND_PAYMENT = :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN - WIRE_DRAWDOWN_REQUEST = :WIRE_DRAWDOWN_REQUEST + WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST # @!method self.values # @return [Array] diff --git a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi index a7fa0ed9..c9026a50 100644 --- a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +++ b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi @@ -12,16 +12,6 @@ module Lithic ) end - sig { returns(Lithic::AuthRules::VelocityLimitParams::Filters) } - attr_reader :filters - - sig do - params( - filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash - ).void - end - attr_writer :filters - # Velocity over the current day since 00:00 / 12 AM in Eastern Time sig do returns( @@ -40,6 +30,18 @@ module Lithic sig { returns(Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol) } attr_accessor :scope + sig do + returns(T.nilable(Lithic::AuthRules::VelocityLimitParams::Filters)) + end + attr_reader :filters + + sig do + params( + filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash + ).void + end + attr_writer :filters + # The maximum amount of spend velocity allowed in the period in minor units (the # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this # limit will be declined. @@ -56,7 +58,6 @@ module Lithic sig do params( - filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash, period: T.any( Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, @@ -66,16 +67,17 @@ module Lithic Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash ), scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, + filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash, limit_amount: T.nilable(Integer), limit_count: T.nilable(Integer) ).returns(T.attached_class) end def self.new( - filters:, # Velocity over the current day since 00:00 / 12 AM in Eastern Time period:, # The scope the velocity is calculated for scope:, + filters: nil, # The maximum amount of spend velocity allowed in the period in minor units (the # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this # limit will be declined. @@ -92,7 +94,6 @@ module Lithic sig do override.returns( { - filters: Lithic::AuthRules::VelocityLimitParams::Filters, period: T.any( Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, @@ -102,6 +103,7 @@ module Lithic Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear ), scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, + filters: Lithic::AuthRules::VelocityLimitParams::Filters, limit_amount: T.nilable(Integer), limit_count: T.nilable(Integer) } @@ -110,6 +112,38 @@ module Lithic def to_hash end + # The scope the velocity is calculated for + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + class Filters < Lithic::Internal::Type::BaseModel OrHash = T.type_alias do @@ -307,38 +341,6 @@ module Lithic end end end - - # The scope the velocity is calculated for - module Scope - extend Lithic::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CARD = - T.let( - :CARD, - Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol - ) - ACCOUNT = - T.let( - :ACCOUNT, - Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 523b96dc..28dd76eb 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -1061,8 +1061,11 @@ module Lithic T.let(:WIRE_OUTBOUND_PAYMENT, Lithic::Payment::Type::TaggedSymbol) WIRE_OUTBOUND_ADMIN = T.let(:WIRE_OUTBOUND_ADMIN, Lithic::Payment::Type::TaggedSymbol) - WIRE_DRAWDOWN_REQUEST = - T.let(:WIRE_DRAWDOWN_REQUEST, Lithic::Payment::Type::TaggedSymbol) + WIRE_INBOUND_DRAWDOWN_REQUEST = + T.let( + :WIRE_INBOUND_DRAWDOWN_REQUEST, + Lithic::Payment::Type::TaggedSymbol + ) sig { override.returns(T::Array[Lithic::Payment::Type::TaggedSymbol]) } def self.values diff --git a/sig/lithic/models/auth_rules/velocity_limit_params.rbs b/sig/lithic/models/auth_rules/velocity_limit_params.rbs index 709c43fb..d85272ca 100644 --- a/sig/lithic/models/auth_rules/velocity_limit_params.rbs +++ b/sig/lithic/models/auth_rules/velocity_limit_params.rbs @@ -3,40 +3,55 @@ module Lithic module AuthRules type velocity_limit_params = { - filters: Lithic::AuthRules::VelocityLimitParams::Filters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, + filters: Lithic::AuthRules::VelocityLimitParams::Filters, limit_amount: Integer?, limit_count: Integer? } class VelocityLimitParams < Lithic::Internal::Type::BaseModel - attr_accessor filters: Lithic::AuthRules::VelocityLimitParams::Filters - attr_accessor period: Lithic::Models::AuthRules::velocity_limit_period attr_accessor scope: Lithic::Models::AuthRules::VelocityLimitParams::scope + attr_reader filters: Lithic::AuthRules::VelocityLimitParams::Filters? + + def filters=: ( + Lithic::AuthRules::VelocityLimitParams::Filters + ) -> Lithic::AuthRules::VelocityLimitParams::Filters + attr_accessor limit_amount: Integer? attr_accessor limit_count: Integer? def initialize: ( - filters: Lithic::AuthRules::VelocityLimitParams::Filters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, + ?filters: Lithic::AuthRules::VelocityLimitParams::Filters, ?limit_amount: Integer?, ?limit_count: Integer? ) -> void def to_hash: -> { - filters: Lithic::AuthRules::VelocityLimitParams::Filters, period: Lithic::Models::AuthRules::velocity_limit_period, scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, + filters: Lithic::AuthRules::VelocityLimitParams::Filters, limit_amount: Integer?, limit_count: Integer? } + type scope = :CARD | :ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitParams::scope] + end + type filters = { exclude_countries: ::Array[String]?, @@ -112,17 +127,6 @@ module Lithic def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitParams::Filters::include_pan_entry_mode] end end - - type scope = :CARD | :ACCOUNT - - module Scope - extend Lithic::Internal::Type::Enum - - CARD: :CARD - ACCOUNT: :ACCOUNT - - def self?.values: -> ::Array[Lithic::Models::AuthRules::VelocityLimitParams::scope] - end end end end diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index 3fbdbd5b..e908b268 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -524,7 +524,7 @@ module Lithic | :WIRE_INBOUND_ADMIN | :WIRE_OUTBOUND_PAYMENT | :WIRE_OUTBOUND_ADMIN - | :WIRE_DRAWDOWN_REQUEST + | :WIRE_INBOUND_DRAWDOWN_REQUEST module Type extend Lithic::Internal::Type::Enum @@ -537,7 +537,7 @@ module Lithic WIRE_INBOUND_ADMIN: :WIRE_INBOUND_ADMIN WIRE_OUTBOUND_PAYMENT: :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN: :WIRE_OUTBOUND_ADMIN - WIRE_DRAWDOWN_REQUEST: :WIRE_DRAWDOWN_REQUEST + WIRE_INBOUND_DRAWDOWN_REQUEST: :WIRE_INBOUND_DRAWDOWN_REQUEST def self?.values: -> ::Array[Lithic::Models::Payment::type_] end From 16b65553840cfad0d39eb52d9770ca394a893c44 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:18:20 +0000 Subject: [PATCH 05/17] fix(api): Correct field name from ach_hold__period to ach_hold_period --- .stats.yml | 6 +++--- lib/lithic/models/payment_create_params.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ac611e10..ddf55aa9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c06c4d54858775fef1de57e33d471e997cb28fe0c925fd7b08ba45fdd335e938.yml -openapi_spec_hash: 23745357b2171bcdfb5d30bfef1df48d -config_hash: 9dddee5f7af579864599849cb28a0770 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-64e9dd6979ae45f1bb6e77b40e8244ee46673332112ebf33fe2f3a287467ce85.yml +openapi_spec_hash: ce885445b66e95c5671ee72c01882d79 +config_hash: 07f0e0f3036a4a5825cee527bc46b0b6 diff --git a/lib/lithic/models/payment_create_params.rb b/lib/lithic/models/payment_create_params.rb index ee1ae3a5..efba70e3 100644 --- a/lib/lithic/models/payment_create_params.rb +++ b/lib/lithic/models/payment_create_params.rb @@ -98,7 +98,7 @@ class MethodAttributes < Lithic::Internal::Type::BaseModel # Number of days to hold the ACH payment # # @return [Integer, nil] - optional :ach_hold_period, Integer, api_name: :ach_hold__period + optional :ach_hold_period, Integer # @!attribute addenda # From ef965b2fc0cfebc92a3d2317b7201318bcd500aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 21:10:13 +0000 Subject: [PATCH 06/17] chore(internal): codegen related update --- lib/lithic/resources/financial_accounts.rb | 10 +++++----- rbi/lithic/resources/financial_accounts.rbi | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/lithic/resources/financial_accounts.rb b/lib/lithic/resources/financial_accounts.rb index ee7e18c0..17f5d49b 100644 --- a/lib/lithic/resources/financial_accounts.rb +++ b/lib/lithic/resources/financial_accounts.rb @@ -22,15 +22,15 @@ class FinancialAccounts # # @overload create(nickname:, type:, account_token: nil, is_for_benefit_of: nil, idempotency_key: nil, request_options: {}) # - # @param nickname [String] Body param: + # @param nickname [String] Body param # - # @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param: + # @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param # - # @param account_token [String] Body param: + # @param account_token [String] Body param # - # @param is_for_benefit_of [Boolean] Body param: + # @param is_for_benefit_of [Boolean] Body param # - # @param idempotency_key [String] Header param: + # @param idempotency_key [String] Header param # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/lithic/resources/financial_accounts.rbi b/rbi/lithic/resources/financial_accounts.rbi index 66e0ac9e..172f5039 100644 --- a/rbi/lithic/resources/financial_accounts.rbi +++ b/rbi/lithic/resources/financial_accounts.rbi @@ -32,15 +32,15 @@ module Lithic ).returns(Lithic::FinancialAccount) end def create( - # Body param: + # Body param nickname:, - # Body param: + # Body param type:, - # Body param: + # Body param account_token: nil, - # Body param: + # Body param is_for_benefit_of: nil, - # Header param: + # Header param idempotency_key: nil, request_options: {} ) From fdb9960d08f95f161da8abf310509d594a0d2957 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 18:03:23 +0000 Subject: [PATCH 07/17] chore: Rework event type generation to support spec splitting --- .stats.yml | 6 +++--- lib/lithic/models/payment_create_params.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddf55aa9..ae10d57f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-64e9dd6979ae45f1bb6e77b40e8244ee46673332112ebf33fe2f3a287467ce85.yml -openapi_spec_hash: ce885445b66e95c5671ee72c01882d79 -config_hash: 07f0e0f3036a4a5825cee527bc46b0b6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6e800837b020104545778d65b7b16bae277e6667d98044e83f3bfeacebdb489b.yml +openapi_spec_hash: 94788968e119e8665a1b0d4742565984 +config_hash: 2af43c32faa12490c9c9caa2ce62bccb diff --git a/lib/lithic/models/payment_create_params.rb b/lib/lithic/models/payment_create_params.rb index efba70e3..ee1ae3a5 100644 --- a/lib/lithic/models/payment_create_params.rb +++ b/lib/lithic/models/payment_create_params.rb @@ -98,7 +98,7 @@ class MethodAttributes < Lithic::Internal::Type::BaseModel # Number of days to hold the ACH payment # # @return [Integer, nil] - optional :ach_hold_period, Integer + optional :ach_hold_period, Integer, api_name: :ach_hold__period # @!attribute addenda # From 51321d8d84f5e1fcb4e9161dd607f01dc9d5cf5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:09:07 +0000 Subject: [PATCH 08/17] feat(api): Add idempotency key to cards POST and PATCH endpoints --- .stats.yml | 4 +- lib/lithic/models/card_create_params.rb | 9 +- lib/lithic/resources/cards.rb | 54 +++++++----- lib/lithic/resources/financial_accounts.rb | 2 +- rbi/lithic/models/card_create_params.rbi | 9 ++ rbi/lithic/resources/cards.rbi | 92 +++++++++++---------- rbi/lithic/resources/financial_accounts.rbi | 2 +- sig/lithic/models/card_create_params.rbs | 9 +- sig/lithic/resources/cards.rbs | 1 + 9 files changed, 111 insertions(+), 71 deletions(-) diff --git a/.stats.yml b/.stats.yml index ae10d57f..bd16674f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6e800837b020104545778d65b7b16bae277e6667d98044e83f3bfeacebdb489b.yml -openapi_spec_hash: 94788968e119e8665a1b0d4742565984 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-eeeb62a4869ba1436c9252f9630006a829695178e86305aea232f6be0d1e3d81.yml +openapi_spec_hash: 25bf9c499cd22240949862e622c534f2 config_hash: 2af43c32faa12490c9c9caa2ce62bccb diff --git a/lib/lithic/models/card_create_params.rb b/lib/lithic/models/card_create_params.rb index 02866cdf..7248d940 100644 --- a/lib/lithic/models/card_create_params.rb +++ b/lib/lithic/models/card_create_params.rb @@ -226,7 +226,12 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::CardCreateParams::State, nil] optional :state, enum: -> { Lithic::CardCreateParams::State } - # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {}) + # @!attribute idempotency_key + # + # @return [String, nil] + optional :idempotency_key, String + + # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::CardCreateParams} for more details. # @@ -270,6 +275,8 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # # @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values: # + # @param idempotency_key [String] + # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] # Card types: diff --git a/lib/lithic/resources/cards.rb b/lib/lithic/resources/cards.rb index 5d7bd6cb..bcf5e7b3 100644 --- a/lib/lithic/resources/cards.rb +++ b/lib/lithic/resources/cards.rb @@ -15,47 +15,49 @@ class Cards # Create a new virtual or physical card. Parameters `shipping_address` and # `product_id` only apply to physical cards. # - # @overload create(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {}) + # @overload create(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {}) # - # @param type [Symbol, Lithic::Models::CardCreateParams::Type] Card types: + # @param type [Symbol, Lithic::Models::CardCreateParams::Type] Body param: Card types: # - # @param account_token [String] Globally unique identifier for the account that the card will be associated with + # @param account_token [String] Body param: Globally unique identifier for the account that the card will be ass # - # @param bulk_order_token [String] Globally unique identifier for an existing bulk order to associate this card wit + # @param bulk_order_token [String] Body param: Globally unique identifier for an existing bulk order to associate t # - # @param card_program_token [String] For card programs with more than one BIN range. This must be configured with Lit + # @param card_program_token [String] Body param: For card programs with more than one BIN range. This must be configu # - # @param carrier [Lithic::Models::Carrier] + # @param carrier [Lithic::Models::Carrier] Body param # - # @param digital_card_art_token [String] Specifies the digital card art to be displayed in the user’s digital wallet afte + # @param digital_card_art_token [String] Body param: Specifies the digital card art to be displayed in the user’s digital # - # @param exp_month [String] Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, + # @param exp_month [String] Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` i # - # @param exp_year [String] Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided + # @param exp_year [String] Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` # - # @param memo [String] Friendly name to identify the card. + # @param memo [String] Body param: Friendly name to identify the card. # - # @param pin [String] Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and `VIRTUA + # @param pin [String] Body param: Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` # - # @param product_id [String] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic + # @param product_id [String] Body param: Only applicable to cards of type `PHYSICAL`. This must be configured # - # @param replacement_account_token [String] Restricted field limited to select use cases. Lithic will reach out directly if + # @param replacement_account_token [String] Body param: Restricted field limited to select use cases. Lithic will reach out # - # @param replacement_comment [String] Additional context or information related to the card that this card will replac + # @param replacement_comment [String] Body param: Additional context or information related to the card that this card # - # @param replacement_for [String] Globally unique identifier for the card that this card will replace. If the card + # @param replacement_for [String] Body param: Globally unique identifier for the card that this card will replace. # - # @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Card state substatus values for the card that this card will replace: + # @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Body param: Card state substatus values for the card that this card will replace # - # @param shipping_address [Lithic::Models::ShippingAddress] + # @param shipping_address [Lithic::Models::ShippingAddress] Body param # - # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Shipping method for the card. Only applies to cards of type PHYSICAL. + # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Body param: Shipping method for the card. Only applies to cards of type PHYSICAL # - # @param spend_limit [Integer] Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,00 + # @param spend_limit [Integer] Body param: Amount (in cents) to limit approved authorizations (e.g. 100000 woul # - # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Spend limit duration values: + # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Body param: Spend limit duration values: + # + # @param state [Symbol, Lithic::Models::CardCreateParams::State] Body param: Card state values: # - # @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values: + # @param idempotency_key [String] Header param: Idempotency key for the request # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -64,7 +66,15 @@ class Cards # @see Lithic::Models::CardCreateParams def create(params) parsed, options = Lithic::CardCreateParams.dump_request(params) - @client.request(method: :post, path: "v1/cards", body: parsed, model: Lithic::Card, options: options) + header_params = {idempotency_key: "idempotency-key"} + @client.request( + method: :post, + path: "v1/cards", + headers: parsed.slice(*header_params.keys).transform_keys(header_params), + body: parsed.except(*header_params.keys), + model: Lithic::Card, + options: options + ) end # Get card configuration such as spend limit and state. diff --git a/lib/lithic/resources/financial_accounts.rb b/lib/lithic/resources/financial_accounts.rb index 17f5d49b..fc2f9e9c 100644 --- a/lib/lithic/resources/financial_accounts.rb +++ b/lib/lithic/resources/financial_accounts.rb @@ -30,7 +30,7 @@ class FinancialAccounts # # @param is_for_benefit_of [Boolean] Body param # - # @param idempotency_key [String] Header param + # @param idempotency_key [String] Header param: Idempotency key for the request # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/lithic/models/card_create_params.rbi b/rbi/lithic/models/card_create_params.rbi index 7e6901cc..ba208800 100644 --- a/rbi/lithic/models/card_create_params.rbi +++ b/rbi/lithic/models/card_create_params.rbi @@ -264,6 +264,12 @@ module Lithic sig { params(state: Lithic::CardCreateParams::State::OrSymbol).void } attr_writer :state + sig { returns(T.nilable(String)) } + attr_reader :idempotency_key + + sig { params(idempotency_key: String).void } + attr_writer :idempotency_key + sig do params( type: Lithic::CardCreateParams::Type::OrSymbol, @@ -287,6 +293,7 @@ module Lithic spend_limit: Integer, spend_limit_duration: Lithic::SpendLimitDuration::OrSymbol, state: Lithic::CardCreateParams::State::OrSymbol, + idempotency_key: String, request_options: Lithic::RequestOptions::OrHash ).returns(T.attached_class) end @@ -430,6 +437,7 @@ module Lithic # - `PAUSED` - Card will decline authorizations, but can be resumed at a later # time. state: nil, + idempotency_key: nil, request_options: {} ) end @@ -458,6 +466,7 @@ module Lithic spend_limit: Integer, spend_limit_duration: Lithic::SpendLimitDuration::OrSymbol, state: Lithic::CardCreateParams::State::OrSymbol, + idempotency_key: String, request_options: Lithic::RequestOptions } ) diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 733e5ad2..a6dde942 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -34,11 +34,12 @@ module Lithic spend_limit: Integer, spend_limit_duration: Lithic::SpendLimitDuration::OrSymbol, state: Lithic::CardCreateParams::State::OrSymbol, + idempotency_key: String, request_options: Lithic::RequestOptions::OrHash ).returns(Lithic::Card) end def create( - # Card types: + # Body param: Card types: # # - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital # wallet like Apple Pay or Google Pay (if the card program is digital @@ -55,58 +56,60 @@ module Lithic # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please # use VIRTUAL instead. type:, - # Globally unique identifier for the account that the card will be associated - # with. Required for programs enrolling users using the + # Body param: Globally unique identifier for the account that the card will be + # associated with. Required for programs enrolling users using the # [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). # See [Managing Your Program](doc:managing-your-program) for more information. account_token: nil, - # Globally unique identifier for an existing bulk order to associate this card - # with. When specified, the card will be added to the bulk order for batch - # shipment. Only applicable to cards of type PHYSICAL + # Body param: Globally unique identifier for an existing bulk order to associate + # this card with. When specified, the card will be added to the bulk order for + # batch shipment. Only applicable to cards of type PHYSICAL bulk_order_token: nil, - # For card programs with more than one BIN range. This must be configured with - # Lithic before use. Identifies the card program/BIN range under which to create - # the card. If omitted, will utilize the program's default `card_program_token`. - # In Sandbox, use 00000000-0000-0000-1000-000000000000 and + # Body param: For card programs with more than one BIN range. This must be + # configured with Lithic before use. Identifies the card program/BIN range under + # which to create the card. If omitted, will utilize the program's default + # `card_program_token`. In Sandbox, use 00000000-0000-0000-1000-000000000000 and # 00000000-0000-0000-2000-000000000000 to test creating cards on specific card # programs. card_program_token: nil, + # Body param carrier: nil, - # Specifies the digital card art to be displayed in the user’s digital wallet - # after tokenization. This artwork must be approved by Mastercard and configured - # by Lithic to use. See + # Body param: Specifies the digital card art to be displayed in the user’s digital + # wallet after tokenization. This artwork must be approved by Mastercard and + # configured by Lithic to use. See # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). digital_card_art_token: nil, - # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` + # is provided, an expiration date will be generated. exp_month: nil, - # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` + # is provided, an expiration date will be generated. exp_year: nil, - # Friendly name to identify the card. + # Body param: Friendly name to identify the card. memo: nil, - # Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and - # `VIRTUAL`. See + # Body param: Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` + # and `VIRTUAL`. See # [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block). pin: nil, - # Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic - # before use. Specifies the configuration (i.e., physical card art) that the card - # should be manufactured with. + # Body param: Only applicable to cards of type `PHYSICAL`. This must be configured + # with Lithic before use. Specifies the configuration (i.e., physical card art) + # that the card should be manufactured with. product_id: nil, - # Restricted field limited to select use cases. Lithic will reach out directly if - # this field should be used. Globally unique identifier for the replacement card's - # account. If this field is specified, `replacement_for` must also be specified. - # If `replacement_for` is specified and this field is omitted, the replacement - # card's account will be inferred from the card being replaced. + # Body param: Restricted field limited to select use cases. Lithic will reach out + # directly if this field should be used. Globally unique identifier for the + # replacement card's account. If this field is specified, `replacement_for` must + # also be specified. If `replacement_for` is specified and this field is omitted, + # the replacement card's account will be inferred from the card being replaced. replacement_account_token: nil, - # Additional context or information related to the card that this card will - # replace. + # Body param: Additional context or information related to the card that this card + # will replace. replacement_comment: nil, - # Globally unique identifier for the card that this card will replace. If the card - # type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is - # `VIRTUAL` it will be replaced by a `VIRTUAL` card. + # Body param: Globally unique identifier for the card that this card will replace. + # If the card type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the + # card type is `VIRTUAL` it will be replaced by a `VIRTUAL` card. replacement_for: nil, - # Card state substatus values for the card that this card will replace: + # Body param: Card state substatus values for the card that this card will + # replace: # # - `LOST` - The physical card is no longer in the cardholder's possession due to # being lost or never received by the cardholder. @@ -134,9 +137,10 @@ module Lithic # - `OTHER` - The reason for the status does not fall into any of the above # categories. A comment should be provided to specify the reason. replacement_substatus: nil, + # Body param shipping_address: nil, - # Shipping method for the card. Only applies to cards of type PHYSICAL. Use of - # options besides `STANDARD` require additional permissions. + # Body param: Shipping method for the card. Only applies to cards of type + # PHYSICAL. Use of options besides `STANDARD` require additional permissions. # # - `STANDARD` - USPS regular mail or similar international option, with no # tracking @@ -151,13 +155,13 @@ module Lithic # or similar international option, with tracking # - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping shipping_method: nil, - # Amount (in cents) to limit approved authorizations (e.g. 100000 would be a - # $1,000 limit). Transaction requests above the spend limit will be declined. Note - # that a spend limit of 0 is effectively no limit, and should only be used to - # reset or remove a prior limit. Only a limit of 1 or above will result in - # declined transactions due to checks against the card limit. + # Body param: Amount (in cents) to limit approved authorizations (e.g. 100000 + # would be a $1,000 limit). Transaction requests above the spend limit will be + # declined. Note that a spend limit of 0 is effectively no limit, and should only + # be used to reset or remove a prior limit. Only a limit of 1 or above will result + # in declined transactions due to checks against the card limit. spend_limit: nil, - # Spend limit duration values: + # Body param: Spend limit duration values: # # - `ANNUALLY` - Card will authorize transactions up to spend limit for the # trailing year. @@ -170,13 +174,15 @@ module Lithic # - `TRANSACTION` - Card will authorize multiple transactions if each individual # transaction is under the spend limit. spend_limit_duration: nil, - # Card state values: + # Body param: Card state values: # # - `OPEN` - Card will approve authorizations (if they match card and account # parameters). # - `PAUSED` - Card will decline authorizations, but can be resumed at a later # time. state: nil, + # Header param: Idempotency key for the request + idempotency_key: nil, request_options: {} ) end diff --git a/rbi/lithic/resources/financial_accounts.rbi b/rbi/lithic/resources/financial_accounts.rbi index 172f5039..fddebdd4 100644 --- a/rbi/lithic/resources/financial_accounts.rbi +++ b/rbi/lithic/resources/financial_accounts.rbi @@ -40,7 +40,7 @@ module Lithic account_token: nil, # Body param is_for_benefit_of: nil, - # Header param + # Header param: Idempotency key for the request idempotency_key: nil, request_options: {} ) diff --git a/sig/lithic/models/card_create_params.rbs b/sig/lithic/models/card_create_params.rbs index edc57451..8ea307b4 100644 --- a/sig/lithic/models/card_create_params.rbs +++ b/sig/lithic/models/card_create_params.rbs @@ -21,7 +21,8 @@ module Lithic shipping_method: Lithic::Models::CardCreateParams::shipping_method, spend_limit: Integer, spend_limit_duration: Lithic::Models::spend_limit_duration, - state: Lithic::Models::CardCreateParams::state + state: Lithic::Models::CardCreateParams::state, + idempotency_key: String } & Lithic::Internal::Type::request_parameters @@ -117,6 +118,10 @@ module Lithic Lithic::Models::CardCreateParams::state ) -> Lithic::Models::CardCreateParams::state + attr_reader idempotency_key: String? + + def idempotency_key=: (String) -> String + def initialize: ( type: Lithic::Models::CardCreateParams::type_, ?account_token: String, @@ -138,6 +143,7 @@ module Lithic ?spend_limit: Integer, ?spend_limit_duration: Lithic::Models::spend_limit_duration, ?state: Lithic::Models::CardCreateParams::state, + ?idempotency_key: String, ?request_options: Lithic::request_opts ) -> void @@ -162,6 +168,7 @@ module Lithic spend_limit: Integer, spend_limit_duration: Lithic::Models::spend_limit_duration, state: Lithic::Models::CardCreateParams::state, + idempotency_key: String, request_options: Lithic::RequestOptions } diff --git a/sig/lithic/resources/cards.rbs b/sig/lithic/resources/cards.rbs index ef8d2773..b8288b8f 100644 --- a/sig/lithic/resources/cards.rbs +++ b/sig/lithic/resources/cards.rbs @@ -26,6 +26,7 @@ module Lithic ?spend_limit: Integer, ?spend_limit_duration: Lithic::Models::spend_limit_duration, ?state: Lithic::Models::CardCreateParams::state, + ?idempotency_key: String, ?request_options: Lithic::request_opts ) -> Lithic::Card From 4105b29d27ce48c60180c5b7166e664fdd1c0e46 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 12:58:03 +0000 Subject: [PATCH 09/17] fix(api): mark AppleWebPushProvisioningResponse fields required --- .stats.yml | 6 +++--- lib/lithic/models/card_web_provision_response.rb | 10 +++++----- lib/lithic/models/payment_create_params.rb | 2 +- rbi/lithic/models/card_web_provision_response.rbi | 15 +++++---------- sig/lithic/models/card_web_provision_response.rbs | 14 ++++---------- 5 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd16674f..021c6dec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-eeeb62a4869ba1436c9252f9630006a829695178e86305aea232f6be0d1e3d81.yml -openapi_spec_hash: 25bf9c499cd22240949862e622c534f2 -config_hash: 2af43c32faa12490c9c9caa2ce62bccb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6e80e52c9f20d95780f2cf4869f80ee2c4b270ff9470941dc057e79d15bda1a.yml +openapi_spec_hash: f2bb7084cd5225769302589cd1563241 +config_hash: 31d71922d7838f34ae0875c9b8026d99 diff --git a/lib/lithic/models/card_web_provision_response.rb b/lib/lithic/models/card_web_provision_response.rb index c5371e02..2f20b874 100644 --- a/lib/lithic/models/card_web_provision_response.rb +++ b/lib/lithic/models/card_web_provision_response.rb @@ -14,16 +14,16 @@ class AppleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel # @!attribute jws # JWS object required for handoff to Apple's script. # - # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, nil] - optional :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws } + # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] + required :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws } # @!attribute state # A unique identifier for the JWS object. # - # @return [String, nil] - optional :state, String + # @return [String] + required :state, String - # @!method initialize(jws: nil, state: nil) + # @!method initialize(jws:, state:) # @param jws [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] JWS object required for handoff to Apple's script. # # @param state [String] A unique identifier for the JWS object. diff --git a/lib/lithic/models/payment_create_params.rb b/lib/lithic/models/payment_create_params.rb index ee1ae3a5..efba70e3 100644 --- a/lib/lithic/models/payment_create_params.rb +++ b/lib/lithic/models/payment_create_params.rb @@ -98,7 +98,7 @@ class MethodAttributes < Lithic::Internal::Type::BaseModel # Number of days to hold the ACH payment # # @return [Integer, nil] - optional :ach_hold_period, Integer, api_name: :ach_hold__period + optional :ach_hold_period, Integer # @!attribute addenda # diff --git a/rbi/lithic/models/card_web_provision_response.rbi b/rbi/lithic/models/card_web_provision_response.rbi index fb68bbba..ad66b2d1 100644 --- a/rbi/lithic/models/card_web_provision_response.rbi +++ b/rbi/lithic/models/card_web_provision_response.rbi @@ -25,9 +25,7 @@ module Lithic # JWS object required for handoff to Apple's script. sig do returns( - T.nilable( - Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws - ) + Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws ) end attr_reader :jws @@ -41,11 +39,8 @@ module Lithic attr_writer :jws # A unique identifier for the JWS object. - sig { returns(T.nilable(String)) } - attr_reader :state - - sig { params(state: String).void } - attr_writer :state + sig { returns(String) } + attr_accessor :state sig do params( @@ -56,9 +51,9 @@ module Lithic end def self.new( # JWS object required for handoff to Apple's script. - jws: nil, + jws:, # A unique identifier for the JWS object. - state: nil + state: ) end diff --git a/sig/lithic/models/card_web_provision_response.rbs b/sig/lithic/models/card_web_provision_response.rbs index 59537141..2f4fa578 100644 --- a/sig/lithic/models/card_web_provision_response.rbs +++ b/sig/lithic/models/card_web_provision_response.rbs @@ -14,19 +14,13 @@ module Lithic } class AppleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel - attr_reader jws: Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws? + attr_accessor jws: Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws - def jws=: ( - Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws - ) -> Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws - - attr_reader state: String? - - def state=: (String) -> String + attr_accessor state: String def initialize: ( - ?jws: Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, - ?state: String + jws: Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, + state: String ) -> void def to_hash: -> { From 830ae4ad28662e5be21860d14ea86d2f1fa25ec0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:34:12 +0000 Subject: [PATCH 10/17] chore(internal): update `actions/checkout` version --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-gem.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 631daab8..1d20e873 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -36,7 +36,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/lithic-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index a48dc659..7322f05b 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index ae6f51b8..4f43d314 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'lithic-com/lithic-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | From 35a67d3154e8f54d374c53d8b3b53b9485272878 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 10:35:05 +0000 Subject: [PATCH 11/17] chore: Add spec linter for YAML and folded style multiline strings --- .stats.yml | 4 ++-- lib/lithic/models/financial_transaction.rb | 6 ++++-- rbi/lithic/models/financial_transaction.rbi | 12 ++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 021c6dec..4bf8e155 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6e80e52c9f20d95780f2cf4869f80ee2c4b270ff9470941dc057e79d15bda1a.yml -openapi_spec_hash: f2bb7084cd5225769302589cd1563241 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a64e7cc23f0e28427e8a433dd951f05da5d35d982fe695ab2914941711bdfb0f.yml +openapi_spec_hash: 22ea6fa451b7bea3cc33a23d3aded4d6 config_hash: 31d71922d7838f34ae0875c9b8026d99 diff --git a/lib/lithic/models/financial_transaction.rb b/lib/lithic/models/financial_transaction.rb index 4a12ab1a..d987a017 100644 --- a/lib/lithic/models/financial_transaction.rb +++ b/lib/lithic/models/financial_transaction.rb @@ -49,8 +49,10 @@ class FinancialTransaction < Lithic::Internal::Type::BaseModel # @!attribute pending_amount # Pending amount of the transaction in the currency's smallest unit (e.g., cents), - # including any acquirer fees. The value of this field will go to zero over time - # once the financial transaction is settled. + # including any acquirer fees. + # + # The value of this field will go to zero over time once the financial transaction + # is settled. # # @return [Integer] required :pending_amount, Integer diff --git a/rbi/lithic/models/financial_transaction.rbi b/rbi/lithic/models/financial_transaction.rbi index ea7aa4f6..a9489978 100644 --- a/rbi/lithic/models/financial_transaction.rbi +++ b/rbi/lithic/models/financial_transaction.rbi @@ -41,8 +41,10 @@ module Lithic attr_accessor :events # Pending amount of the transaction in the currency's smallest unit (e.g., cents), - # including any acquirer fees. The value of this field will go to zero over time - # once the financial transaction is settled. + # including any acquirer fees. + # + # The value of this field will go to zero over time once the financial transaction + # is settled. sig { returns(Integer) } attr_accessor :pending_amount @@ -109,8 +111,10 @@ module Lithic # A list of all financial events that have modified this financial transaction. events:, # Pending amount of the transaction in the currency's smallest unit (e.g., cents), - # including any acquirer fees. The value of this field will go to zero over time - # once the financial transaction is settled. + # including any acquirer fees. + # + # The value of this field will go to zero over time once the financial transaction + # is settled. pending_amount:, # APPROVED transactions were successful while DECLINED transactions were declined # by user, Lithic, or the network. From 80369fe89f4bfb7255bfa05a2035c77238debe3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 22:29:09 +0000 Subject: [PATCH 12/17] feat(api): Add card.updated event --- .stats.yml | 4 +- lib/lithic.rb | 1 + lib/lithic/models.rb | 2 + .../models/card_updated_webhook_event.rb | 40 ++++++++++++ lib/lithic/models/event.rb | 3 + lib/lithic/models/event_list_params.rb | 2 + lib/lithic/models/event_subscription.rb | 2 + .../events/subscription_create_params.rb | 2 + ...scription_send_simulated_example_params.rb | 1 + .../events/subscription_update_params.rb | 2 + lib/lithic/models/parsed_webhook_event.rb | 4 +- lib/lithic/resources/webhooks.rb | 2 +- rbi/lithic/models.rbi | 2 + .../models/card_updated_webhook_event.rbi | 61 +++++++++++++++++++ rbi/lithic/models/event.rbi | 5 ++ rbi/lithic/models/event_list_params.rbi | 6 ++ rbi/lithic/models/event_subscription.rbi | 6 ++ .../events/subscription_create_params.rbi | 6 ++ ...cription_send_simulated_example_params.rbi | 5 ++ .../events/subscription_update_params.rbi | 6 ++ rbi/lithic/models/parsed_webhook_event.rbi | 1 + rbi/lithic/resources/webhooks.rbi | 1 + sig/lithic/models.rbs | 2 + .../models/card_updated_webhook_event.rbs | 35 +++++++++++ sig/lithic/models/event.rbs | 2 + sig/lithic/models/event_list_params.rbs | 2 + sig/lithic/models/event_subscription.rbs | 2 + .../events/subscription_create_params.rbs | 2 + ...cription_send_simulated_example_params.rbs | 2 + .../events/subscription_update_params.rbs | 2 + sig/lithic/models/parsed_webhook_event.rbs | 1 + sig/lithic/resources/webhooks.rbs | 59 +++++++++++++++++- 32 files changed, 268 insertions(+), 5 deletions(-) create mode 100644 lib/lithic/models/card_updated_webhook_event.rb create mode 100644 rbi/lithic/models/card_updated_webhook_event.rbi create mode 100644 sig/lithic/models/card_updated_webhook_event.rbs diff --git a/.stats.yml b/.stats.yml index 4bf8e155..048a5d63 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a64e7cc23f0e28427e8a433dd951f05da5d35d982fe695ab2914941711bdfb0f.yml -openapi_spec_hash: 22ea6fa451b7bea3cc33a23d3aded4d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-11ebfaf7523a8c0eafca9e2c914e44102537634be4b22289fe85d46b9ab3d650.yml +openapi_spec_hash: 38fdabb7812d528c839eadad87d49e5a config_hash: 31d71922d7838f34ae0875c9b8026d99 diff --git a/lib/lithic.rb b/lib/lithic.rb index 2b939bb5..3924f8a8 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -185,6 +185,7 @@ require_relative "lithic/models/card_transaction_enhanced_data_created_webhook_event" require_relative "lithic/models/card_transaction_enhanced_data_updated_webhook_event" require_relative "lithic/models/card_transaction_updated_webhook_event" +require_relative "lithic/models/card_updated_webhook_event" require_relative "lithic/models/card_update_params" require_relative "lithic/models/card_web_provision_params" require_relative "lithic/models/card_web_provision_response" diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 746c1f2d..f74a466a 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -189,6 +189,8 @@ module Lithic CardTransactionUpdatedWebhookEvent = Lithic::Models::CardTransactionUpdatedWebhookEvent + CardUpdatedWebhookEvent = Lithic::Models::CardUpdatedWebhookEvent + CardUpdateParams = Lithic::Models::CardUpdateParams CardWebProvisionParams = Lithic::Models::CardWebProvisionParams diff --git a/lib/lithic/models/card_updated_webhook_event.rb b/lib/lithic/models/card_updated_webhook_event.rb new file mode 100644 index 00000000..7d1fa06c --- /dev/null +++ b/lib/lithic/models/card_updated_webhook_event.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module Lithic + module Models + class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + # @!attribute token + # The token of the card that was updated. + # + # @return [String] + required :token, String + + # @!attribute event_type + # The type of event that occurred. + # + # @return [Symbol, :"card.updated"] + required :event_type, const: :"card.updated" + + # @!attribute previous_fields + # The previous values of the fields that were updated. + # + # @return [Object] + required :previous_fields, Lithic::Internal::Type::Unknown + + # @!attribute state + # The current state of the card. + # + # @return [String] + required :state, String + + # @!method initialize(token:, previous_fields:, state:, event_type: :"card.updated") + # @param token [String] The token of the card that was updated. + # + # @param previous_fields [Object] The previous values of the fields that were updated. + # + # @param state [String] The current state of the card. + # + # @param event_type [Symbol, :"card.updated"] The type of event that occurred. + end + end +end diff --git a/lib/lithic/models/event.rb b/lib/lithic/models/event.rb index a613fa61..e64fa7ee 100644 --- a/lib/lithic/models/event.rb +++ b/lib/lithic/models/event.rb @@ -44,6 +44,7 @@ class Event < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -167,6 +168,7 @@ class Event < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -263,6 +265,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/event_list_params.rb b/lib/lithic/models/event_list_params.rb index f74e1d04..31913c4b 100644 --- a/lib/lithic/models/event_list_params.rb +++ b/lib/lithic/models/event_list_params.rb @@ -98,6 +98,7 @@ class EventListParams < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -192,6 +193,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/event_subscription.rb b/lib/lithic/models/event_subscription.rb index ad0a5dc4..95dc392c 100644 --- a/lib/lithic/models/event_subscription.rb +++ b/lib/lithic/models/event_subscription.rb @@ -71,6 +71,7 @@ class EventSubscription < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -165,6 +166,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/events/subscription_create_params.rb b/lib/lithic/models/events/subscription_create_params.rb index c0daecd1..8785fb85 100644 --- a/lib/lithic/models/events/subscription_create_params.rb +++ b/lib/lithic/models/events/subscription_create_params.rb @@ -73,6 +73,7 @@ class SubscriptionCreateParams < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -167,6 +168,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/events/subscription_send_simulated_example_params.rb b/lib/lithic/models/events/subscription_send_simulated_example_params.rb index 131d46e8..cb3f8074 100644 --- a/lib/lithic/models/events/subscription_send_simulated_example_params.rb +++ b/lib/lithic/models/events/subscription_send_simulated_example_params.rb @@ -39,6 +39,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/events/subscription_update_params.rb b/lib/lithic/models/events/subscription_update_params.rb index c46ff59c..619bc83d 100644 --- a/lib/lithic/models/events/subscription_update_params.rb +++ b/lib/lithic/models/events/subscription_update_params.rb @@ -73,6 +73,7 @@ class SubscriptionUpdateParams < Lithic::Internal::Type::BaseModel # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -167,6 +168,7 @@ module EventType CARD_REISSUED = :"card.reissued" CARD_RENEWED = :"card.renewed" CARD_SHIPPED = :"card.shipped" + CARD_UPDATED = :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = diff --git a/lib/lithic/models/parsed_webhook_event.rb b/lib/lithic/models/parsed_webhook_event.rb index d00da4bc..b044bcb1 100644 --- a/lib/lithic/models/parsed_webhook_event.rb +++ b/lib/lithic/models/parsed_webhook_event.rb @@ -46,6 +46,8 @@ module ParsedWebhookEvent variant -> { Lithic::CardShippedWebhookEvent } + variant -> { Lithic::CardUpdatedWebhookEvent } + variant -> { Lithic::CardTransactionUpdatedWebhookEvent } variant -> { Lithic::CardTransactionEnhancedDataCreatedWebhookEvent } @@ -811,7 +813,7 @@ module EventType end # @!method self.variants - # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] + # @return [Array(Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent)] end end end diff --git a/lib/lithic/resources/webhooks.rb b/lib/lithic/resources/webhooks.rb index fd3925b2..c54bf610 100644 --- a/lib/lithic/resources/webhooks.rb +++ b/lib/lithic/resources/webhooks.rb @@ -32,7 +32,7 @@ def parse(payload, headers:, secret: nil) # # @param payload [String] The raw webhook payload as a string # - # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] + # @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent] def parse_unsafe(payload) parsed = JSON.parse(payload, symbolize_names: true) Lithic::Internal::Type::Converter.coerce(Lithic::Models::ParsedWebhookEvent, parsed) diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index e4b80c79..c711f98e 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -167,6 +167,8 @@ module Lithic CardTransactionUpdatedWebhookEvent = Lithic::Models::CardTransactionUpdatedWebhookEvent + CardUpdatedWebhookEvent = Lithic::Models::CardUpdatedWebhookEvent + CardUpdateParams = Lithic::Models::CardUpdateParams CardWebProvisionParams = Lithic::Models::CardWebProvisionParams diff --git a/rbi/lithic/models/card_updated_webhook_event.rbi b/rbi/lithic/models/card_updated_webhook_event.rbi new file mode 100644 index 00000000..4462f397 --- /dev/null +++ b/rbi/lithic/models/card_updated_webhook_event.rbi @@ -0,0 +1,61 @@ +# typed: strong + +module Lithic + module Models + class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::CardUpdatedWebhookEvent, Lithic::Internal::AnyHash) + end + + # The token of the card that was updated. + sig { returns(String) } + attr_accessor :token + + # The type of event that occurred. + sig { returns(Symbol) } + attr_accessor :event_type + + # The previous values of the fields that were updated. + sig { returns(T.anything) } + attr_accessor :previous_fields + + # The current state of the card. + sig { returns(String) } + attr_accessor :state + + sig do + params( + token: String, + previous_fields: T.anything, + state: String, + event_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The token of the card that was updated. + token:, + # The previous values of the fields that were updated. + previous_fields:, + # The current state of the card. + state:, + # The type of event that occurred. + event_type: :"card.updated" + ) + end + + sig do + override.returns( + { + token: String, + event_type: Symbol, + previous_fields: T.anything, + state: String + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/event.rbi b/rbi/lithic/models/event.rbi index 45298700..6cd21bd3 100644 --- a/rbi/lithic/models/event.rbi +++ b/rbi/lithic/models/event.rbi @@ -40,6 +40,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -162,6 +163,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -280,6 +282,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -423,6 +426,8 @@ module Lithic T.let(:"card.renewed", Lithic::Event::EventType::TaggedSymbol) CARD_SHIPPED = T.let(:"card.shipped", Lithic::Event::EventType::TaggedSymbol) + CARD_UPDATED = + T.let(:"card.updated", Lithic::Event::EventType::TaggedSymbol) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/event_list_params.rbi b/rbi/lithic/models/event_list_params.rbi index 9464b5e1..e64d0e7e 100644 --- a/rbi/lithic/models/event_list_params.rbi +++ b/rbi/lithic/models/event_list_params.rbi @@ -149,6 +149,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -311,6 +312,11 @@ module Lithic :"card.shipped", Lithic::EventListParams::EventType::TaggedSymbol ) + CARD_UPDATED = + T.let( + :"card.updated", + Lithic::EventListParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/event_subscription.rbi b/rbi/lithic/models/event_subscription.rbi index 8886afe0..3a80e8bb 100644 --- a/rbi/lithic/models/event_subscription.rbi +++ b/rbi/lithic/models/event_subscription.rbi @@ -97,6 +97,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -259,6 +260,11 @@ module Lithic :"card.shipped", Lithic::EventSubscription::EventType::TaggedSymbol ) + CARD_UPDATED = + T.let( + :"card.updated", + Lithic::EventSubscription::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/events/subscription_create_params.rbi b/rbi/lithic/models/events/subscription_create_params.rbi index 56e52a46..3ba86daa 100644 --- a/rbi/lithic/models/events/subscription_create_params.rbi +++ b/rbi/lithic/models/events/subscription_create_params.rbi @@ -124,6 +124,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -288,6 +289,11 @@ module Lithic :"card.shipped", Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol ) + CARD_UPDATED = + T.let( + :"card.updated", + Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi index 866adaeb..9d3ce05d 100644 --- a/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +++ b/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi @@ -152,6 +152,11 @@ module Lithic :"card.shipped", Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol ) + CARD_UPDATED = + T.let( + :"card.updated", + Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/events/subscription_update_params.rbi b/rbi/lithic/models/events/subscription_update_params.rbi index 1ec917c5..56accacb 100644 --- a/rbi/lithic/models/events/subscription_update_params.rbi +++ b/rbi/lithic/models/events/subscription_update_params.rbi @@ -124,6 +124,7 @@ module Lithic # - card.reissued: Occurs when a card is reissued. # - card.renewed: Occurs when a card is renewed. # - card.shipped: Occurs when a card is shipped. + # - card.updated: Occurs when a card is updated. # - digital_wallet.tokenization_approval_request: Occurs when a tokenization # approval request is made. This event will be deprecated in the future. We # recommend using `tokenization.approval_request` instead. @@ -288,6 +289,11 @@ module Lithic :"card.shipped", Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol ) + CARD_UPDATED = + T.let( + :"card.updated", + Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol + ) DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = T.let( :"digital_wallet.tokenization_approval_request", diff --git a/rbi/lithic/models/parsed_webhook_event.rbi b/rbi/lithic/models/parsed_webhook_event.rbi index e667d775..5265312d 100644 --- a/rbi/lithic/models/parsed_webhook_event.rbi +++ b/rbi/lithic/models/parsed_webhook_event.rbi @@ -26,6 +26,7 @@ module Lithic Lithic::CardRenewedWebhookEvent, Lithic::CardReissuedWebhookEvent, Lithic::CardShippedWebhookEvent, + Lithic::CardUpdatedWebhookEvent, Lithic::CardTransactionUpdatedWebhookEvent, Lithic::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent, diff --git a/rbi/lithic/resources/webhooks.rbi b/rbi/lithic/resources/webhooks.rbi index 1d887194..61f48021 100644 --- a/rbi/lithic/resources/webhooks.rbi +++ b/rbi/lithic/resources/webhooks.rbi @@ -27,6 +27,7 @@ module Lithic Lithic::CardRenewedWebhookEvent, Lithic::CardReissuedWebhookEvent, Lithic::CardShippedWebhookEvent, + Lithic::CardUpdatedWebhookEvent, Lithic::CardTransactionUpdatedWebhookEvent, Lithic::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent, diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 9a292f5d..51887173 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -145,6 +145,8 @@ module Lithic class CardTransactionUpdatedWebhookEvent = Lithic::Models::CardTransactionUpdatedWebhookEvent + class CardUpdatedWebhookEvent = Lithic::Models::CardUpdatedWebhookEvent + class CardUpdateParams = Lithic::Models::CardUpdateParams class CardWebProvisionParams = Lithic::Models::CardWebProvisionParams diff --git a/sig/lithic/models/card_updated_webhook_event.rbs b/sig/lithic/models/card_updated_webhook_event.rbs new file mode 100644 index 00000000..18f15b57 --- /dev/null +++ b/sig/lithic/models/card_updated_webhook_event.rbs @@ -0,0 +1,35 @@ +module Lithic + module Models + type card_updated_webhook_event = + { + token: String, + event_type: :"card.updated", + previous_fields: top, + state: String + } + + class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor event_type: :"card.updated" + + attr_accessor previous_fields: top + + attr_accessor state: String + + def initialize: ( + token: String, + previous_fields: top, + state: String, + ?event_type: :"card.updated" + ) -> void + + def to_hash: -> { + token: String, + event_type: :"card.updated", + previous_fields: top, + state: String + } + end + end +end diff --git a/sig/lithic/models/event.rbs b/sig/lithic/models/event.rbs index 78790bab..c2c6ce53 100644 --- a/sig/lithic/models/event.rbs +++ b/sig/lithic/models/event.rbs @@ -48,6 +48,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -104,6 +105,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/event_list_params.rbs b/sig/lithic/models/event_list_params.rbs index 30a319db..35d0111e 100644 --- a/sig/lithic/models/event_list_params.rbs +++ b/sig/lithic/models/event_list_params.rbs @@ -85,6 +85,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -141,6 +142,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/event_subscription.rbs b/sig/lithic/models/event_subscription.rbs index c9299784..525f1c37 100644 --- a/sig/lithic/models/event_subscription.rbs +++ b/sig/lithic/models/event_subscription.rbs @@ -53,6 +53,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -109,6 +110,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/events/subscription_create_params.rbs b/sig/lithic/models/events/subscription_create_params.rbs index 72dab4ec..f6cc4f03 100644 --- a/sig/lithic/models/events/subscription_create_params.rbs +++ b/sig/lithic/models/events/subscription_create_params.rbs @@ -63,6 +63,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -119,6 +120,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs index f09cd4e0..f4ce767e 100644 --- a/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +++ b/sig/lithic/models/events/subscription_send_simulated_example_params.rbs @@ -44,6 +44,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -100,6 +101,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/events/subscription_update_params.rbs b/sig/lithic/models/events/subscription_update_params.rbs index a80273bf..f2821310 100644 --- a/sig/lithic/models/events/subscription_update_params.rbs +++ b/sig/lithic/models/events/subscription_update_params.rbs @@ -63,6 +63,7 @@ module Lithic | :"card.reissued" | :"card.renewed" | :"card.shipped" + | :"card.updated" | :"digital_wallet.tokenization_approval_request" | :"digital_wallet.tokenization_result" | :"digital_wallet.tokenization_two_factor_authentication_code" @@ -119,6 +120,7 @@ module Lithic CARD_REISSUED: :"card.reissued" CARD_RENEWED: :"card.renewed" CARD_SHIPPED: :"card.shipped" + CARD_UPDATED: :"card.updated" DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST: :"digital_wallet.tokenization_approval_request" DIGITAL_WALLET_TOKENIZATION_RESULT: :"digital_wallet.tokenization_result" DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE: :"digital_wallet.tokenization_two_factor_authentication_code" diff --git a/sig/lithic/models/parsed_webhook_event.rbs b/sig/lithic/models/parsed_webhook_event.rbs index b80501d8..6b901f7b 100644 --- a/sig/lithic/models/parsed_webhook_event.rbs +++ b/sig/lithic/models/parsed_webhook_event.rbs @@ -18,6 +18,7 @@ module Lithic | Lithic::CardRenewedWebhookEvent | Lithic::CardReissuedWebhookEvent | Lithic::CardShippedWebhookEvent + | Lithic::CardUpdatedWebhookEvent | Lithic::CardTransactionUpdatedWebhookEvent | Lithic::CardTransactionEnhancedDataCreatedWebhookEvent | Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent diff --git a/sig/lithic/resources/webhooks.rbs b/sig/lithic/resources/webhooks.rbs index 66669a57..f00a481a 100644 --- a/sig/lithic/resources/webhooks.rbs +++ b/sig/lithic/resources/webhooks.rbs @@ -5,7 +5,64 @@ module Lithic String payload, headers: Hash[String, String], ?secret: String? - ) -> Lithic::Models::parsed_webhook_event + ) -> (Lithic::AccountHolderCreatedWebhookEvent + | Lithic::ParsedWebhookEvent::KYBPayload + | Lithic::ParsedWebhookEvent::KYCPayload + | Lithic::ParsedWebhookEvent::LegacyPayload + | Lithic::AccountHolderVerificationWebhookEvent + | Lithic::AccountHolderDocumentUpdatedWebhookEvent + | Lithic::CardAuthorizationApprovalRequestWebhookEvent + | Lithic::TokenizationDecisioningRequestWebhookEvent + | Lithic::AuthRulesBacktestReportCreatedWebhookEvent + | Lithic::BalanceUpdatedWebhookEvent + | Lithic::BookTransferTransactionCreatedWebhookEvent + | Lithic::BookTransferTransactionUpdatedWebhookEvent + | Lithic::CardCreatedWebhookEvent + | Lithic::CardConvertedWebhookEvent + | Lithic::CardRenewedWebhookEvent + | Lithic::CardReissuedWebhookEvent + | Lithic::CardShippedWebhookEvent + | Lithic::CardUpdatedWebhookEvent + | Lithic::CardTransactionUpdatedWebhookEvent + | Lithic::CardTransactionEnhancedDataCreatedWebhookEvent + | Lithic::CardTransactionEnhancedDataUpdatedWebhookEvent + | Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent + | Lithic::DigitalWalletTokenizationResultWebhookEvent + | Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent + | Lithic::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent + | Lithic::DigitalWalletTokenizationUpdatedWebhookEvent + | Lithic::DisputeUpdatedWebhookEvent + | Lithic::DisputeEvidenceUploadFailedWebhookEvent + | Lithic::ExternalBankAccountCreatedWebhookEvent + | Lithic::ExternalBankAccountUpdatedWebhookEvent + | Lithic::ExternalPaymentCreatedWebhookEvent + | Lithic::ExternalPaymentUpdatedWebhookEvent + | Lithic::FinancialAccountCreatedWebhookEvent + | Lithic::FinancialAccountUpdatedWebhookEvent + | Lithic::FundingEventCreatedWebhookEvent + | Lithic::LoanTapeCreatedWebhookEvent + | Lithic::LoanTapeUpdatedWebhookEvent + | Lithic::ManagementOperationCreatedWebhookEvent + | Lithic::ManagementOperationUpdatedWebhookEvent + | Lithic::InternalTransactionCreatedWebhookEvent + | Lithic::InternalTransactionUpdatedWebhookEvent + | Lithic::NetworkTotalCreatedWebhookEvent + | Lithic::NetworkTotalUpdatedWebhookEvent + | Lithic::PaymentTransactionCreatedWebhookEvent + | Lithic::PaymentTransactionUpdatedWebhookEvent + | Lithic::SettlementReportUpdatedWebhookEvent + | Lithic::StatementsCreatedWebhookEvent + | Lithic::ThreeDSAuthenticationCreatedWebhookEvent + | Lithic::ThreeDSAuthenticationUpdatedWebhookEvent + | Lithic::ThreeDSAuthenticationChallengeWebhookEvent + | Lithic::TokenizationApprovalRequestWebhookEvent + | Lithic::TokenizationResultWebhookEvent + | Lithic::TokenizationTwoFactorAuthenticationCodeWebhookEvent + | Lithic::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent + | Lithic::TokenizationUpdatedWebhookEvent + | Lithic::ThreeDSAuthenticationApprovalRequestWebhookEvent + | Lithic::DisputeTransactionCreatedWebhookEvent + | Lithic::DisputeTransactionUpdatedWebhookEvent) def parse_unsafe: (String payload) -> Lithic::Models::parsed_webhook_event From edf8fbccb53de602bc52be916d6c80498ae4e390 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:17:40 +0000 Subject: [PATCH 13/17] feat(api): Add tags field to card transactions --- .stats.yml | 4 ++-- lib/lithic/models/transaction.rb | 11 ++++++++++- rbi/lithic/models/transaction.rbi | 10 ++++++++++ sig/lithic/models/transaction.rbs | 5 +++++ test/lithic/resources/transactions_test.rb | 2 ++ 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 048a5d63..a90a83e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-11ebfaf7523a8c0eafca9e2c914e44102537634be4b22289fe85d46b9ab3d650.yml -openapi_spec_hash: 38fdabb7812d528c839eadad87d49e5a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1307147a7305d37c3eb288d87350e35d946c27e6b40dc8c6a00967d806dbade5.yml +openapi_spec_hash: 21c48156c56569871d503df54e2e1442 config_hash: 31d71922d7838f34ae0875c9b8026d99 diff --git a/lib/lithic/models/transaction.rb b/lib/lithic/models/transaction.rb index cb8f93e1..dcf50ac4 100644 --- a/lib/lithic/models/transaction.rb +++ b/lib/lithic/models/transaction.rb @@ -162,6 +162,13 @@ class Transaction < Lithic::Internal::Type::BaseModel # @return [Symbol, Lithic::Models::Transaction::Status] required :status, enum: -> { Lithic::Transaction::Status } + # @!attribute tags + # Key-value pairs for tagging resources. Tags allow you to associate arbitrary + # metadata with a resource for your own purposes. + # + # @return [Hash{Symbol=>String}] + required :tags, Lithic::Internal::Type::HashOf[String] + # @!attribute token_info # # @return [Lithic::Models::TokenInfo, nil] @@ -178,7 +185,7 @@ class Transaction < Lithic::Internal::Type::BaseModel # @return [Array, nil] optional :events, -> { Lithic::Internal::Type::ArrayOf[Lithic::Transaction::Event] } - # @!method initialize(token:, account_token:, acquirer_fee:, acquirer_reference_number:, amount:, amounts:, authorization_amount:, authorization_code:, avs:, card_token:, cardholder_authentication:, created:, financial_account_token:, merchant:, merchant_amount:, merchant_authorization_amount:, merchant_currency:, network:, network_risk_score:, pos:, result:, settled_amount:, status:, token_info:, updated:, events: nil) + # @!method initialize(token:, account_token:, acquirer_fee:, acquirer_reference_number:, amount:, amounts:, authorization_amount:, authorization_code:, avs:, card_token:, cardholder_authentication:, created:, financial_account_token:, merchant:, merchant_amount:, merchant_authorization_amount:, merchant_currency:, network:, network_risk_score:, pos:, result:, settled_amount:, status:, tags:, token_info:, updated:, events: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::Transaction} for more details. # @@ -228,6 +235,8 @@ class Transaction < Lithic::Internal::Type::BaseModel # # @param status [Symbol, Lithic::Models::Transaction::Status] Status of the transaction. # + # @param tags [Hash{Symbol=>String}] Key-value pairs for tagging resources. Tags allow you to associate arbitrary met + # # @param token_info [Lithic::Models::TokenInfo, nil] # # @param updated [Time] Date and time when the transaction last updated. UTC time zone. diff --git a/rbi/lithic/models/transaction.rbi b/rbi/lithic/models/transaction.rbi index 8135ae5e..3a563dc2 100644 --- a/rbi/lithic/models/transaction.rbi +++ b/rbi/lithic/models/transaction.rbi @@ -124,6 +124,11 @@ module Lithic sig { returns(Lithic::Transaction::Status::TaggedSymbol) } attr_accessor :status + # Key-value pairs for tagging resources. Tags allow you to associate arbitrary + # metadata with a resource for your own purposes. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :tags + sig { returns(T.nilable(Lithic::TokenInfo)) } attr_reader :token_info @@ -166,6 +171,7 @@ module Lithic result: Lithic::Transaction::Result::OrSymbol, settled_amount: Integer, status: Lithic::Transaction::Status::OrSymbol, + tags: T::Hash[Symbol, String], token_info: T.nilable(Lithic::TokenInfo::OrHash), updated: Time, events: T::Array[Lithic::Transaction::Event::OrHash] @@ -224,6 +230,9 @@ module Lithic settled_amount:, # Status of the transaction. status:, + # Key-value pairs for tagging resources. Tags allow you to associate arbitrary + # metadata with a resource for your own purposes. + tags:, token_info:, # Date and time when the transaction last updated. UTC time zone. updated:, @@ -258,6 +267,7 @@ module Lithic result: Lithic::Transaction::Result::TaggedSymbol, settled_amount: Integer, status: Lithic::Transaction::Status::TaggedSymbol, + tags: T::Hash[Symbol, String], token_info: T.nilable(Lithic::TokenInfo), updated: Time, events: T::Array[Lithic::Transaction::Event] diff --git a/sig/lithic/models/transaction.rbs b/sig/lithic/models/transaction.rbs index ab7e3025..40dd25b9 100644 --- a/sig/lithic/models/transaction.rbs +++ b/sig/lithic/models/transaction.rbs @@ -25,6 +25,7 @@ module Lithic result: Lithic::Models::Transaction::result, settled_amount: Integer, status: Lithic::Models::Transaction::status, + tags: ::Hash[Symbol, String], token_info: Lithic::TokenInfo?, updated: Time, events: ::Array[Lithic::Transaction::Event] @@ -77,6 +78,8 @@ module Lithic attr_accessor status: Lithic::Models::Transaction::status + attr_accessor tags: ::Hash[Symbol, String] + attr_accessor token_info: Lithic::TokenInfo? attr_accessor updated: Time @@ -111,6 +114,7 @@ module Lithic result: Lithic::Models::Transaction::result, settled_amount: Integer, status: Lithic::Models::Transaction::status, + tags: ::Hash[Symbol, String], token_info: Lithic::TokenInfo?, updated: Time, ?events: ::Array[Lithic::Transaction::Event] @@ -140,6 +144,7 @@ module Lithic result: Lithic::Models::Transaction::result, settled_amount: Integer, status: Lithic::Models::Transaction::status, + tags: ::Hash[Symbol, String], token_info: Lithic::TokenInfo?, updated: Time, events: ::Array[Lithic::Transaction::Event] diff --git a/test/lithic/resources/transactions_test.rb b/test/lithic/resources/transactions_test.rb index f1940a0a..8d0ba968 100644 --- a/test/lithic/resources/transactions_test.rb +++ b/test/lithic/resources/transactions_test.rb @@ -35,6 +35,7 @@ def test_retrieve result: Lithic::Transaction::Result, settled_amount: Integer, status: Lithic::Transaction::Status, + tags: ^(Lithic::Internal::Type::HashOf[String]), token_info: Lithic::TokenInfo | nil, updated: Time, events: ^(Lithic::Internal::Type::ArrayOf[Lithic::Transaction::Event]) | nil @@ -81,6 +82,7 @@ def test_list result: Lithic::Transaction::Result, settled_amount: Integer, status: Lithic::Transaction::Status, + tags: ^(Lithic::Internal::Type::HashOf[String]), token_info: Lithic::TokenInfo | nil, updated: Time, events: ^(Lithic::Internal::Type::ArrayOf[Lithic::Transaction::Event]) | nil From 27a1087c2acbdf937db38d2848a42ba977a8ae3f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:59:03 +0000 Subject: [PATCH 14/17] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a90a83e7..4dc4c9aa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1307147a7305d37c3eb288d87350e35d946c27e6b40dc8c6a00967d806dbade5.yml -openapi_spec_hash: 21c48156c56569871d503df54e2e1442 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aa74f7b53f47c2bda4be2ee890578b6c99d26705fddb855013ea3c38b8f384f9.yml +openapi_spec_hash: 2d195f177651cd8ddb55937e8eef8995 config_hash: 31d71922d7838f34ae0875c9b8026d99 From ffc53e2c6a8b8d04901de1a583f40fbea13ee4df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:42:14 +0000 Subject: [PATCH 15/17] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4dc4c9aa..acfbe38e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aa74f7b53f47c2bda4be2ee890578b6c99d26705fddb855013ea3c38b8f384f9.yml -openapi_spec_hash: 2d195f177651cd8ddb55937e8eef8995 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-14b3b5bca66c1e0935b314e469476f91193413c29a47ad4a0affa19beb14c7d3.yml +openapi_spec_hash: afba11ad031397d6e3873485b5b42473 config_hash: 31d71922d7838f34ae0875c9b8026d99 From b3104df92ab8f161c92c1136b86a1a734576f574 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:53:07 +0000 Subject: [PATCH 16/17] docs: Remove deprecated tag from MERCHANT_LOCKED card type --- .stats.yml | 4 +-- lib/lithic/models/card_create_params.rb | 8 +++--- .../models/card_updated_webhook_event.rb | 8 +++--- lib/lithic/models/non_pci_card.rb | 18 ++++++------- rbi/lithic/models/card_create_params.rbi | 12 ++++----- .../models/card_updated_webhook_event.rbi | 8 +++--- rbi/lithic/models/non_pci_card.rbi | 27 +++++++++---------- rbi/lithic/resources/cards.rbi | 4 +-- .../models/card_updated_webhook_event.rbs | 8 +++--- 9 files changed, 46 insertions(+), 51 deletions(-) diff --git a/.stats.yml b/.stats.yml index acfbe38e..30dea04f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-14b3b5bca66c1e0935b314e469476f91193413c29a47ad4a0affa19beb14c7d3.yml -openapi_spec_hash: afba11ad031397d6e3873485b5b42473 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a6c56df3bc156ac1e6ee5d635c6cd964f0d60836fe17a97deec8af8429bd339c.yml +openapi_spec_hash: c563acd10d96ddabe6c9643b592bd509 config_hash: 31d71922d7838f34ae0875c9b8026d99 diff --git a/lib/lithic/models/card_create_params.rb b/lib/lithic/models/card_create_params.rb index 7248d940..669b73db 100644 --- a/lib/lithic/models/card_create_params.rb +++ b/lib/lithic/models/card_create_params.rb @@ -18,8 +18,8 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please @@ -289,8 +289,8 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please diff --git a/lib/lithic/models/card_updated_webhook_event.rb b/lib/lithic/models/card_updated_webhook_event.rb index 7d1fa06c..31f52e69 100644 --- a/lib/lithic/models/card_updated_webhook_event.rb +++ b/lib/lithic/models/card_updated_webhook_event.rb @@ -3,11 +3,11 @@ module Lithic module Models class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel - # @!attribute token + # @!attribute card_token # The token of the card that was updated. # # @return [String] - required :token, String + required :card_token, String # @!attribute event_type # The type of event that occurred. @@ -27,8 +27,8 @@ class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel # @return [String] required :state, String - # @!method initialize(token:, previous_fields:, state:, event_type: :"card.updated") - # @param token [String] The token of the card that was updated. + # @!method initialize(card_token:, previous_fields:, state:, event_type: :"card.updated") + # @param card_token [String] The token of the card that was updated. # # @param previous_fields [Object] The previous values of the fields that were updated. # diff --git a/lib/lithic/models/non_pci_card.rb b/lib/lithic/models/non_pci_card.rb index 4a444fe3..9b81b3eb 100644 --- a/lib/lithic/models/non_pci_card.rb +++ b/lib/lithic/models/non_pci_card.rb @@ -97,11 +97,10 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe # functionality. _ `SINGLE_USE` - Card is closed upon first successful - # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first - # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ - # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _ - # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use - # VIRTUAL instead. + # authorization. _ `MERCHANT_LOCKED` - Card is locked to the first merchant that + # successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ Similar behavior + # to VIRTUAL cards, please use VIRTUAL instead. _ `DIGITAL_WALLET` - + # _[Deprecated]_ Similar behavior to VIRTUAL cards, please use VIRTUAL instead. # # @return [Symbol, Lithic::Models::NonPCICard::Type] required :type, enum: -> { Lithic::NonPCICard::Type } @@ -436,11 +435,10 @@ module State # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe # functionality. _ `SINGLE_USE` - Card is closed upon first successful - # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first - # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ - # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _ - # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use - # VIRTUAL instead. + # authorization. _ `MERCHANT_LOCKED` - Card is locked to the first merchant that + # successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ Similar behavior + # to VIRTUAL cards, please use VIRTUAL instead. _ `DIGITAL_WALLET` - + # _[Deprecated]_ Similar behavior to VIRTUAL cards, please use VIRTUAL instead. # # @see Lithic::Models::NonPCICard#type module Type diff --git a/rbi/lithic/models/card_create_params.rbi b/rbi/lithic/models/card_create_params.rbi index ba208800..a3ffe2a1 100644 --- a/rbi/lithic/models/card_create_params.rbi +++ b/rbi/lithic/models/card_create_params.rbi @@ -21,8 +21,8 @@ module Lithic # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please @@ -308,8 +308,8 @@ module Lithic # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please @@ -484,8 +484,8 @@ module Lithic # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please diff --git a/rbi/lithic/models/card_updated_webhook_event.rbi b/rbi/lithic/models/card_updated_webhook_event.rbi index 4462f397..70172f3c 100644 --- a/rbi/lithic/models/card_updated_webhook_event.rbi +++ b/rbi/lithic/models/card_updated_webhook_event.rbi @@ -10,7 +10,7 @@ module Lithic # The token of the card that was updated. sig { returns(String) } - attr_accessor :token + attr_accessor :card_token # The type of event that occurred. sig { returns(Symbol) } @@ -26,7 +26,7 @@ module Lithic sig do params( - token: String, + card_token: String, previous_fields: T.anything, state: String, event_type: Symbol @@ -34,7 +34,7 @@ module Lithic end def self.new( # The token of the card that was updated. - token:, + card_token:, # The previous values of the fields that were updated. previous_fields:, # The current state of the card. @@ -47,7 +47,7 @@ module Lithic sig do override.returns( { - token: String, + card_token: String, event_type: Symbol, previous_fields: T.anything, state: String diff --git a/rbi/lithic/models/non_pci_card.rbi b/rbi/lithic/models/non_pci_card.rbi index 3a77e87e..d240969a 100644 --- a/rbi/lithic/models/non_pci_card.rbi +++ b/rbi/lithic/models/non_pci_card.rbi @@ -81,11 +81,10 @@ module Lithic # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe # functionality. _ `SINGLE_USE` - Card is closed upon first successful - # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first - # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ - # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _ - # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use - # VIRTUAL instead. + # authorization. _ `MERCHANT_LOCKED` - Card is locked to the first merchant that + # successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ Similar behavior + # to VIRTUAL cards, please use VIRTUAL instead. _ `DIGITAL_WALLET` - + # _[Deprecated]_ Similar behavior to VIRTUAL cards, please use VIRTUAL instead. sig { returns(Lithic::NonPCICard::Type::TaggedSymbol) } attr_accessor :type @@ -293,11 +292,10 @@ module Lithic # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe # functionality. _ `SINGLE_USE` - Card is closed upon first successful - # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first - # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ - # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _ - # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use - # VIRTUAL instead. + # authorization. _ `MERCHANT_LOCKED` - Card is locked to the first merchant that + # successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ Similar behavior + # to VIRTUAL cards, please use VIRTUAL instead. _ `DIGITAL_WALLET` - + # _[Deprecated]_ Similar behavior to VIRTUAL cards, please use VIRTUAL instead. type:, # List of identifiers for the Auth Rule(s) that are applied on the card. This # field is deprecated and will no longer be populated in the `Card` object. The @@ -614,11 +612,10 @@ module Lithic # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe # functionality. _ `SINGLE_USE` - Card is closed upon first successful - # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first - # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ - # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _ - # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use - # VIRTUAL instead. + # authorization. _ `MERCHANT_LOCKED` - Card is locked to the first merchant that + # successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_ Similar behavior + # to VIRTUAL cards, please use VIRTUAL instead. _ `DIGITAL_WALLET` - + # _[Deprecated]_ Similar behavior to VIRTUAL cards, please use VIRTUAL instead. module Type extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index a6dde942..8aa66d9e 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -49,8 +49,8 @@ module Lithic # Reach out at [lithic.com/contact](https://lithic.com/contact) for more # information. # - `SINGLE_USE` - Card is closed upon first successful authorization. - # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that - # successfully authorizes the card. + # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully + # authorizes the card. # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use # VIRTUAL instead. # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please diff --git a/sig/lithic/models/card_updated_webhook_event.rbs b/sig/lithic/models/card_updated_webhook_event.rbs index 18f15b57..ec768914 100644 --- a/sig/lithic/models/card_updated_webhook_event.rbs +++ b/sig/lithic/models/card_updated_webhook_event.rbs @@ -2,14 +2,14 @@ module Lithic module Models type card_updated_webhook_event = { - token: String, + card_token: String, event_type: :"card.updated", previous_fields: top, state: String } class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel - attr_accessor token: String + attr_accessor card_token: String attr_accessor event_type: :"card.updated" @@ -18,14 +18,14 @@ module Lithic attr_accessor state: String def initialize: ( - token: String, + card_token: String, previous_fields: top, state: String, ?event_type: :"card.updated" ) -> void def to_hash: -> { - token: String, + card_token: String, event_type: :"card.updated", previous_fields: top, state: String From 9ab9d1949f2802600fb5ec893b4ab5c05026f533 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:53:28 +0000 Subject: [PATCH 17/17] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b7b74c5..da59f99e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 82022fd2..4845df5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,44 @@ # Changelog +## 0.4.0 (2026-01-26) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/lithic-com/lithic-ruby/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** Add card state attribute to tokenization rules ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) +* **api:** Add card.updated event ([80369fe](https://github.com/lithic-com/lithic-ruby/commit/80369fe89f4bfb7255bfa05a2035c77238debe3a)) +* **api:** Add event_type to ASA request and 3DS decisioning request ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) +* **api:** Add idempotency key to cards POST and PATCH endpoints ([51321d8](https://github.com/lithic-com/lithic-ruby/commit/51321d8d84f5e1fcb4e9161dd607f01dc9d5cf5d)) +* **api:** Add tags field to card transactions ([edf8fbc](https://github.com/lithic-com/lithic-ruby/commit/edf8fbccb53de602bc52be916d6c80498ae4e390)) +* **api:** Add user defined status to ledger accounts ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) +* **api:** Expose Payment Allocation Details ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) +* **api:** make filter optional for Spend Velocity Auth Rules ([3e09d4a](https://github.com/lithic-com/lithic-ruby/commit/3e09d4a5488c83ad8122c973baf5eb4e18de29b0)) + + +### Bug Fixes + +* **api:** Correct field name from ach_hold__period to ach_hold_period ([16b6555](https://github.com/lithic-com/lithic-ruby/commit/16b65553840cfad0d39eb52d9770ca394a893c44)) +* **api:** mark AppleWebPushProvisioningResponse fields required ([4105b29](https://github.com/lithic-com/lithic-ruby/commit/4105b29d27ce48c60180c5b7166e664fdd1c0e46)) +* **api:** rename WIRE_DRAWDOWN_REQUEST to WIRE_INBOUND_DRAWDOWN_REQUEST ([3e09d4a](https://github.com/lithic-com/lithic-ruby/commit/3e09d4a5488c83ad8122c973baf5eb4e18de29b0)) + + +### Chores + +* Add spec linter for YAML and folded style multiline strings ([35a67d3](https://github.com/lithic-com/lithic-ruby/commit/35a67d3154e8f54d374c53d8b3b53b9485272878)) +* configure new SDK language ([ba770b2](https://github.com/lithic-com/lithic-ruby/commit/ba770b2cd5f50ba1871c539f89036ff4538b1df2)) +* **internal:** codegen related update ([ef965b2](https://github.com/lithic-com/lithic-ruby/commit/ef965b2fc0cfebc92a3d2317b7201318bcd500aa)) +* **internal:** codegen related update ([143a5ea](https://github.com/lithic-com/lithic-ruby/commit/143a5ea456ee1e6db32fd923ddb68f749ceed53b)) +* **internal:** update `actions/checkout` version ([830ae4a](https://github.com/lithic-com/lithic-ruby/commit/830ae4ad28662e5be21860d14ea86d2f1fa25ec0)) +* Rework event type generation to support spec splitting ([fdb9960](https://github.com/lithic-com/lithic-ruby/commit/fdb9960d08f95f161da8abf310509d594a0d2957)) +* update code formatting ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) + + +### Documentation + +* Remove deprecated tag from MERCHANT_LOCKED card type ([b3104df](https://github.com/lithic-com/lithic-ruby/commit/b3104df92ab8f161c92c1136b86a1a734576f574)) +* Update language for Google Web Push Provisioning docs ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10)) + ## 0.3.0 (2026-01-08) Full Changelog: [v0.2.0...v0.3.0](https://github.com/lithic-com/lithic-ruby/compare/v0.2.0...v0.3.0) diff --git a/Gemfile.lock b/Gemfile.lock index 20fbb144..b3ae62c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GIT PATH remote: . specs: - lithic (0.3.0) + lithic (0.4.0) cgi connection_pool diff --git a/README.md b/README.md index 2333dd34..69d956a4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.3.0" +gem "lithic", "~> 0.4.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 5040b33e..3586eca7 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.3.0" + VERSION = "0.4.0" end