From 9ebb8239e22dc3f680560918ac628af6707a3114 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:11:45 +0000 Subject: [PATCH 1/9] fix(api): Allow null values for optional enum and object fields in schema validation --- .stats.yml | 4 +- lib/lithic/models/account.rb | 4 +- ...der_simulate_enrollment_review_response.rb | 9 ++-- .../models/account_holder_update_response.rb | 6 +-- lib/lithic/models/account_update_params.rb | 4 +- lib/lithic/models/non_pci_card.rb | 26 +++++----- lib/lithic/resources/accounts.rb | 2 +- rbi/lithic/models/account.rbi | 9 ++-- ...er_simulate_enrollment_review_response.rbi | 24 ++++----- .../models/account_holder_update_response.rbi | 6 +-- rbi/lithic/models/account_update_params.rbi | 13 ++--- rbi/lithic/models/non_pci_card.rbi | 52 ++++++++----------- rbi/lithic/resources/accounts.rbi | 3 +- sig/lithic/models/account.rbs | 12 ++--- ...er_simulate_enrollment_review_response.rbs | 12 ++--- sig/lithic/models/account_update_params.rbs | 12 ++--- sig/lithic/models/non_pci_card.rbs | 50 +++++++----------- sig/lithic/resources/accounts.rbs | 2 +- test/lithic/resources/cards_test.rb | 2 +- 19 files changed, 106 insertions(+), 146 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a1957f0..ccbfde87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d29b68bb85936070878d8badaa8a7c5991313285e70a990bc812c838eba85373.yml -openapi_spec_hash: 54b44da68df22eb0ea99f2bc564667a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml +openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/account.rb b/lib/lithic/models/account.rb index ddf0b580..8a8c7c61 100644 --- a/lib/lithic/models/account.rb +++ b/lib/lithic/models/account.rb @@ -102,7 +102,7 @@ class Account < Lithic::Internal::Type::BaseModel # particular reason. # # @return [Symbol, Lithic::Models::Account::Substatus, nil] - optional :substatus, enum: -> { Lithic::Account::Substatus } + optional :substatus, enum: -> { Lithic::Account::Substatus }, nil?: true # @!attribute verification_address # @deprecated @@ -130,7 +130,7 @@ class Account < Lithic::Internal::Type::BaseModel # # @param comment [String] Additional context or information related to the account. # - # @param substatus [Symbol, Lithic::Models::Account::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::Account::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::Account::VerificationAddress] diff --git a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb index 674278c9..fa060fc2 100644 --- a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +++ b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb @@ -75,12 +75,13 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba optional :email, String # @!attribute exemption_type - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @return [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType, nil] optional :exemption_type, - enum: -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType } + enum: -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType }, + nil?: true # @!attribute external_id # Customer-provided token that indicates a relationship with an object outside of @@ -188,7 +189,7 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # # @param email [String] (Deprecated. Use control_person.email when user_type == "BUSINESS". # - # @param exemption_type [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # @param exemption_type [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType, nil] The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # # @param external_id [String] Customer-provided token that indicates a relationship with an object outside of # @@ -465,7 +466,7 @@ class Address < Lithic::Internal::Type::BaseModel end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @see Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse#exemption_type diff --git a/lib/lithic/models/account_holder_update_response.rb b/lib/lithic/models/account_holder_update_response.rb index af945e51..0f8b6b42 100644 --- a/lib/lithic/models/account_holder_update_response.rb +++ b/lib/lithic/models/account_holder_update_response.rb @@ -82,7 +82,7 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel optional :email, String # @!attribute exemption_type - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @return [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType, nil] @@ -196,7 +196,7 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # # @param email [String] (Deprecated. Use control_person.email when user_type == "BUSINESS". # - # @param exemption_type [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # @param exemption_type [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # # @param external_id [String] Customer-provided token that indicates a relationship with an object outside of # @@ -473,7 +473,7 @@ class Address < Lithic::Internal::Type::BaseModel end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @see Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse#exemption_type diff --git a/lib/lithic/models/account_update_params.rb b/lib/lithic/models/account_update_params.rb index c6a88f06..d73fc744 100644 --- a/lib/lithic/models/account_update_params.rb +++ b/lib/lithic/models/account_update_params.rb @@ -80,7 +80,7 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel # particular reason. # # @return [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] - optional :substatus, enum: -> { Lithic::AccountUpdateParams::Substatus } + optional :substatus, enum: -> { Lithic::AccountUpdateParams::Substatus }, nil?: true # @!attribute verification_address # @deprecated @@ -109,7 +109,7 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel # # @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states. # - # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction # diff --git a/lib/lithic/models/non_pci_card.rb b/lib/lithic/models/non_pci_card.rb index 9b81b3eb..5461f849 100644 --- a/lib/lithic/models/non_pci_card.rb +++ b/lib/lithic/models/non_pci_card.rb @@ -29,10 +29,10 @@ class NonPCICard < Lithic::Internal::Type::BaseModel required :created, Time # @!attribute funding - # Deprecated: Funding account for the card. + # Funding account for a card # - # @return [Lithic::Models::NonPCICard::Funding] - required :funding, -> { Lithic::NonPCICard::Funding } + # @return [Lithic::Models::NonPCICard::Funding, nil] + required :funding, -> { Lithic::NonPCICard::Funding }, nil?: true # @!attribute last_four # Last four digits of the card number. @@ -141,7 +141,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # by Lithic to use. # # @return [String, nil] - optional :digital_card_art_token, String + optional :digital_card_art_token, String, nil?: true # @!attribute exp_month # Two digit (MM) expiry month. @@ -189,7 +189,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # should be manufactured with. # # @return [String, nil] - optional :product_id, String + optional :product_id, String, nil?: true # @!attribute replacement_for # If the card is a replacement for another card, the globally unique identifier @@ -221,7 +221,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # of the above categories. A comment can be provided to specify the reason. # # @return [Symbol, Lithic::Models::NonPCICard::Substatus, nil] - optional :substatus, enum: -> { Lithic::NonPCICard::Substatus } + optional :substatus, enum: -> { Lithic::NonPCICard::Substatus }, nil?: true # @!method initialize(token:, account_token:, card_program_token:, created:, funding:, last_four:, pin_status:, spend_limit:, spend_limit_duration:, state:, type:, auth_rule_tokens: nil, bulk_order_token: nil, cardholder_currency: nil, comment: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, hostname: nil, memo: nil, network_program_token: nil, pending_commands: nil, product_id: nil, replacement_for: nil, substatus: nil) # Some parameter documentations has been truncated, see @@ -237,7 +237,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param created [Time] An RFC 3339 timestamp for when the card was created. UTC time zone. # - # @param funding [Lithic::Models::NonPCICard::Funding] Deprecated: Funding account for the card. + # @param funding [Lithic::Models::NonPCICard::Funding, nil] Funding account for a card # # @param last_four [String] Last four digits of the card number. # @@ -261,7 +261,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param comment [String] Additional context or information related to the card. # - # @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, nil] Specifies the digital card art to be displayed in the user's digital wallet afte # # @param exp_month [String] Two digit (MM) expiry month. # @@ -275,11 +275,11 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param pending_commands [Array] Indicates if there are offline PIN changes pending card interaction with an offl # - # @param product_id [String] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic + # @param product_id [String, nil] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic # # @param replacement_for [String, nil] If the card is a replacement for another card, the globally unique identifier fo # - # @param substatus [Symbol, Lithic::Models::NonPCICard::Substatus] Card state substatus values: \* `LOST` - The physical card is no longer in the + # @param substatus [Symbol, Lithic::Models::NonPCICard::Substatus, nil] Card state substatus values: \* `LOST` - The physical card is no longer in the # ca # @see Lithic::Models::NonPCICard#funding @@ -330,13 +330,13 @@ class Funding < Lithic::Internal::Type::BaseModel # The nickname given to the `FundingAccount` or `null` if it has no nickname. # # @return [String, nil] - optional :nickname, String + optional :nickname, String, nil?: true # @!method initialize(token:, created:, last_four:, state:, type:, account_name: nil, nickname: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::NonPCICard::Funding} for more details. # - # Deprecated: Funding account for the card. + # Funding account for a card # # @param token [String] A globally unique identifier for this FundingAccount. # @@ -351,7 +351,7 @@ class Funding < Lithic::Internal::Type::BaseModel # # @param account_name [String] Account name identifying the funding source. This may be `null`. # - # @param nickname [String] The nickname given to the `FundingAccount` or `null` if it has no nickname. + # @param nickname [String, nil] The nickname given to the `FundingAccount` or `null` if it has no nickname. # State of funding source. Funding source states: _ `ENABLED` - The funding # account is available to use for card creation and transactions. _ `PENDING` - diff --git a/lib/lithic/resources/accounts.rb b/lib/lithic/resources/accounts.rb index ada65551..421ac64e 100644 --- a/lib/lithic/resources/accounts.rb +++ b/lib/lithic/resources/accounts.rb @@ -44,7 +44,7 @@ def retrieve(account_token, params = {}) # # @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states. # - # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction # diff --git a/rbi/lithic/models/account.rbi b/rbi/lithic/models/account.rbi index 0c7ef2f2..73441f0a 100644 --- a/rbi/lithic/models/account.rbi +++ b/rbi/lithic/models/account.rbi @@ -101,10 +101,7 @@ module Lithic # of the above categories. A comment should be provided to specify the # particular reason. sig { returns(T.nilable(Lithic::Account::Substatus::TaggedSymbol)) } - attr_reader :substatus - - sig { params(substatus: Lithic::Account::Substatus::OrSymbol).void } - attr_writer :substatus + attr_accessor :substatus sig { returns(T.nilable(Lithic::Account::VerificationAddress)) } attr_reader :verification_address @@ -126,7 +123,7 @@ module Lithic auth_rule_tokens: T::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Account::Substatus::OrSymbol, + substatus: T.nilable(Lithic::Account::Substatus::OrSymbol), verification_address: Lithic::Account::VerificationAddress::OrHash ).returns(T.attached_class) end @@ -208,7 +205,7 @@ module Lithic auth_rule_tokens: T::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Account::Substatus::TaggedSymbol, + substatus: T.nilable(Lithic::Account::Substatus::TaggedSymbol), verification_address: Lithic::Account::VerificationAddress } ) diff --git a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi index ebdaed3c..b10b950b 100644 --- a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +++ b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi @@ -110,7 +110,7 @@ module Lithic sig { params(email: String).void } attr_writer :email - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. sig do returns( @@ -119,15 +119,7 @@ module Lithic ) ) end - attr_reader :exemption_type - - sig do - params( - exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol - ).void - end - attr_writer :exemption_type + attr_accessor :exemption_type # Customer-provided token that indicates a relationship with an object outside of # the Lithic ecosystem. @@ -301,7 +293,9 @@ module Lithic created: Time, email: String, exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol, + T.nilable( + Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol + ), external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual::OrHash, @@ -359,7 +353,7 @@ module Lithic # individual.phone_number when user_type == "INDIVIDUAL".) Primary email of # Account Holder. email: nil, - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. exemption_type: nil, # Customer-provided token that indicates a relationship with an object outside of @@ -420,7 +414,9 @@ module Lithic created: Time, email: String, exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::TaggedSymbol, + T.nilable( + Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::TaggedSymbol + ), external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, @@ -850,7 +846,7 @@ module Lithic end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. module ExemptionType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_holder_update_response.rbi b/rbi/lithic/models/account_holder_update_response.rbi index ef701d7d..1ebd29ec 100644 --- a/rbi/lithic/models/account_holder_update_response.rbi +++ b/rbi/lithic/models/account_holder_update_response.rbi @@ -121,7 +121,7 @@ module Lithic sig { params(email: String).void } attr_writer :email - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. sig do returns( @@ -370,7 +370,7 @@ module Lithic # individual.phone_number when user_type == "INDIVIDUAL".) Primary email of # Account Holder. email: nil, - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. exemption_type: nil, # Customer-provided token that indicates a relationship with an object outside of @@ -861,7 +861,7 @@ module Lithic end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. module ExemptionType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_update_params.rbi b/rbi/lithic/models/account_update_params.rbi index 46bafb14..739baf85 100644 --- a/rbi/lithic/models/account_update_params.rbi +++ b/rbi/lithic/models/account_update_params.rbi @@ -87,12 +87,7 @@ module Lithic sig do returns(T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol)) end - attr_reader :substatus - - sig do - params(substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol).void - end - attr_writer :substatus + attr_accessor :substatus # Address used during Address Verification Service (AVS) checks during # transactions if enabled via Auth Rules. This field is deprecated as AVS checks @@ -119,7 +114,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress::OrHash, request_options: Lithic::RequestOptions::OrHash @@ -191,7 +187,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress, request_options: Lithic::RequestOptions diff --git a/rbi/lithic/models/non_pci_card.rbi b/rbi/lithic/models/non_pci_card.rbi index d240969a..a4cd7147 100644 --- a/rbi/lithic/models/non_pci_card.rbi +++ b/rbi/lithic/models/non_pci_card.rbi @@ -22,11 +22,13 @@ module Lithic sig { returns(Time) } attr_accessor :created - # Deprecated: Funding account for the card. - sig { returns(Lithic::NonPCICard::Funding) } + # Funding account for a card + sig { returns(T.nilable(Lithic::NonPCICard::Funding)) } attr_reader :funding - sig { params(funding: Lithic::NonPCICard::Funding::OrHash).void } + sig do + params(funding: T.nilable(Lithic::NonPCICard::Funding::OrHash)).void + end attr_writer :funding # Last four digits of the card number. @@ -121,10 +123,7 @@ module Lithic # after tokenization. This artwork must be approved by Mastercard and configured # by Lithic to use. sig { returns(T.nilable(String)) } - attr_reader :digital_card_art_token - - sig { params(digital_card_art_token: String).void } - attr_writer :digital_card_art_token + attr_accessor :digital_card_art_token # Two digit (MM) expiry month. sig { returns(T.nilable(String)) } @@ -173,10 +172,7 @@ module Lithic # before use. Specifies the configuration (i.e., physical card art) that the card # should be manufactured with. sig { returns(T.nilable(String)) } - attr_reader :product_id - - sig { params(product_id: String).void } - attr_writer :product_id + attr_accessor :product_id # If the card is a replacement for another card, the globally unique identifier # for the card that was replaced. @@ -204,10 +200,7 @@ module Lithic # has been returned. \* `OTHER` - The reason for the status does not fall into any # of the above categories. A comment can be provided to specify the reason. sig { returns(T.nilable(Lithic::NonPCICard::Substatus::TaggedSymbol)) } - attr_reader :substatus - - sig { params(substatus: Lithic::NonPCICard::Substatus::OrSymbol).void } - attr_writer :substatus + attr_accessor :substatus # Card details without PCI information sig do @@ -216,7 +209,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding::OrHash, + funding: T.nilable(Lithic::NonPCICard::Funding::OrHash), last_four: String, pin_status: Lithic::NonPCICard::PinStatus::OrSymbol, spend_limit: Integer, @@ -227,16 +220,16 @@ module Lithic bulk_order_token: T.nilable(String), cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: T.nilable(String), exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: T.nilable(String), pending_commands: T::Array[String], - product_id: String, + product_id: T.nilable(String), replacement_for: T.nilable(String), - substatus: Lithic::NonPCICard::Substatus::OrSymbol + substatus: T.nilable(Lithic::NonPCICard::Substatus::OrSymbol) ).returns(T.attached_class) end def self.new( @@ -248,7 +241,7 @@ module Lithic card_program_token:, # An RFC 3339 timestamp for when the card was created. UTC time zone. created:, - # Deprecated: Funding account for the card. + # Funding account for a card funding:, # Last four digits of the card number. last_four:, @@ -367,7 +360,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: T.nilable(Lithic::NonPCICard::Funding), last_four: String, pin_status: Lithic::NonPCICard::PinStatus::TaggedSymbol, spend_limit: Integer, @@ -378,16 +371,16 @@ module Lithic bulk_order_token: T.nilable(String), cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: T.nilable(String), exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: T.nilable(String), pending_commands: T::Array[String], - product_id: String, + product_id: T.nilable(String), replacement_for: T.nilable(String), - substatus: Lithic::NonPCICard::Substatus::TaggedSymbol + substatus: T.nilable(Lithic::NonPCICard::Substatus::TaggedSymbol) } ) end @@ -435,12 +428,9 @@ module Lithic # The nickname given to the `FundingAccount` or `null` if it has no nickname. sig { returns(T.nilable(String)) } - attr_reader :nickname - - sig { params(nickname: String).void } - attr_writer :nickname + attr_accessor :nickname - # Deprecated: Funding account for the card. + # Funding account for a card sig do params( token: String, @@ -449,7 +439,7 @@ module Lithic state: Lithic::NonPCICard::Funding::State::OrSymbol, type: Lithic::NonPCICard::Funding::Type::OrSymbol, account_name: String, - nickname: String + nickname: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -485,7 +475,7 @@ module Lithic state: Lithic::NonPCICard::Funding::State::TaggedSymbol, type: Lithic::NonPCICard::Funding::Type::TaggedSymbol, account_name: String, - nickname: String + nickname: T.nilable(String) } ) end diff --git a/rbi/lithic/resources/accounts.rbi b/rbi/lithic/resources/accounts.rbi index 57c07a32..23d3a1d6 100644 --- a/rbi/lithic/resources/accounts.rbi +++ b/rbi/lithic/resources/accounts.rbi @@ -28,7 +28,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress::OrHash, request_options: Lithic::RequestOptions::OrHash diff --git a/sig/lithic/models/account.rbs b/sig/lithic/models/account.rbs index 93c36c8e..526d2509 100644 --- a/sig/lithic/models/account.rbs +++ b/sig/lithic/models/account.rbs @@ -10,7 +10,7 @@ module Lithic auth_rule_tokens: ::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Models::Account::substatus, + substatus: Lithic::Models::Account::substatus?, verification_address: Lithic::Account::VerificationAddress } @@ -41,11 +41,7 @@ module Lithic def comment=: (String) -> String - attr_reader substatus: Lithic::Models::Account::substatus? - - def substatus=: ( - Lithic::Models::Account::substatus - ) -> Lithic::Models::Account::substatus + attr_accessor substatus: Lithic::Models::Account::substatus? attr_reader verification_address: Lithic::Account::VerificationAddress? @@ -62,7 +58,7 @@ module Lithic ?auth_rule_tokens: ::Array[String], ?cardholder_currency: String, ?comment: String, - ?substatus: Lithic::Models::Account::substatus, + ?substatus: Lithic::Models::Account::substatus?, ?verification_address: Lithic::Account::VerificationAddress ) -> void @@ -75,7 +71,7 @@ module Lithic auth_rule_tokens: ::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Models::Account::substatus, + substatus: Lithic::Models::Account::substatus?, verification_address: Lithic::Account::VerificationAddress } diff --git a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs index acb8afa1..e7d96465 100644 --- a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +++ b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs @@ -10,7 +10,7 @@ module Lithic control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, created: Time, email: String, - exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, naics_code: String, @@ -61,11 +61,7 @@ module Lithic def email=: (String) -> String - attr_reader exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type? - - def exemption_type=: ( - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type - ) -> Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type + attr_accessor exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type? attr_reader external_id: String? @@ -132,7 +128,7 @@ module Lithic ?control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, ?created: Time, ?email: String, - ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, ?external_id: String, ?individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, ?naics_code: String, @@ -155,7 +151,7 @@ module Lithic control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, created: Time, email: String, - exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, naics_code: String, diff --git a/sig/lithic/models/account_update_params.rbs b/sig/lithic/models/account_update_params.rbs index 53d0311f..f49c446d 100644 --- a/sig/lithic/models/account_update_params.rbs +++ b/sig/lithic/models/account_update_params.rbs @@ -8,7 +8,7 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::Models::AccountUpdateParams::state, - substatus: Lithic::Models::AccountUpdateParams::substatus, + substatus: Lithic::Models::AccountUpdateParams::substatus?, verification_address: Lithic::AccountUpdateParams::VerificationAddress } & Lithic::Internal::Type::request_parameters @@ -41,11 +41,7 @@ module Lithic Lithic::Models::AccountUpdateParams::state ) -> Lithic::Models::AccountUpdateParams::state - attr_reader substatus: Lithic::Models::AccountUpdateParams::substatus? - - def substatus=: ( - Lithic::Models::AccountUpdateParams::substatus - ) -> Lithic::Models::AccountUpdateParams::substatus + attr_accessor substatus: Lithic::Models::AccountUpdateParams::substatus? attr_reader verification_address: Lithic::AccountUpdateParams::VerificationAddress? @@ -60,7 +56,7 @@ module Lithic ?lifetime_spend_limit: Integer, ?monthly_spend_limit: Integer, ?state: Lithic::Models::AccountUpdateParams::state, - ?substatus: Lithic::Models::AccountUpdateParams::substatus, + ?substatus: Lithic::Models::AccountUpdateParams::substatus?, ?verification_address: Lithic::AccountUpdateParams::VerificationAddress, ?request_options: Lithic::request_opts ) -> void @@ -72,7 +68,7 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::Models::AccountUpdateParams::state, - substatus: Lithic::Models::AccountUpdateParams::substatus, + substatus: Lithic::Models::AccountUpdateParams::substatus?, verification_address: Lithic::AccountUpdateParams::VerificationAddress, request_options: Lithic::RequestOptions } diff --git a/sig/lithic/models/non_pci_card.rbs b/sig/lithic/models/non_pci_card.rbs index 84cbd736..590ed5b0 100644 --- a/sig/lithic/models/non_pci_card.rbs +++ b/sig/lithic/models/non_pci_card.rbs @@ -6,7 +6,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -17,16 +17,16 @@ module Lithic bulk_order_token: String?, cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: String?, exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: String?, pending_commands: ::Array[String], - product_id: String, + product_id: String?, replacement_for: String?, - substatus: Lithic::Models::NonPCICard::substatus + substatus: Lithic::Models::NonPCICard::substatus? } class NonPCICard < Lithic::Internal::Type::BaseModel @@ -38,7 +38,7 @@ module Lithic attr_accessor created: Time - attr_accessor funding: Lithic::NonPCICard::Funding + attr_accessor funding: Lithic::NonPCICard::Funding? attr_accessor last_four: String @@ -66,9 +66,7 @@ module Lithic def comment=: (String) -> String - attr_reader digital_card_art_token: String? - - def digital_card_art_token=: (String) -> String + attr_accessor digital_card_art_token: String? attr_reader exp_month: String? @@ -92,24 +90,18 @@ module Lithic def pending_commands=: (::Array[String]) -> ::Array[String] - attr_reader product_id: String? - - def product_id=: (String) -> String + attr_accessor product_id: String? attr_accessor replacement_for: String? - attr_reader substatus: Lithic::Models::NonPCICard::substatus? - - def substatus=: ( - Lithic::Models::NonPCICard::substatus - ) -> Lithic::Models::NonPCICard::substatus + attr_accessor substatus: Lithic::Models::NonPCICard::substatus? def initialize: ( token: String, account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -120,16 +112,16 @@ module Lithic ?bulk_order_token: String?, ?cardholder_currency: String, ?comment: String, - ?digital_card_art_token: String, + ?digital_card_art_token: String?, ?exp_month: String, ?exp_year: String, ?hostname: String, ?memo: String, ?network_program_token: String?, ?pending_commands: ::Array[String], - ?product_id: String, + ?product_id: String?, ?replacement_for: String?, - ?substatus: Lithic::Models::NonPCICard::substatus + ?substatus: Lithic::Models::NonPCICard::substatus? ) -> void def to_hash: -> { @@ -137,7 +129,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -148,16 +140,16 @@ module Lithic bulk_order_token: String?, cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: String?, exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: String?, pending_commands: ::Array[String], - product_id: String, + product_id: String?, replacement_for: String?, - substatus: Lithic::Models::NonPCICard::substatus + substatus: Lithic::Models::NonPCICard::substatus? } type funding = @@ -168,7 +160,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, account_name: String, - nickname: String + nickname: String? } class Funding < Lithic::Internal::Type::BaseModel @@ -186,9 +178,7 @@ module Lithic def account_name=: (String) -> String - attr_reader nickname: String? - - def nickname=: (String) -> String + attr_accessor nickname: String? def initialize: ( token: String, @@ -197,7 +187,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, ?account_name: String, - ?nickname: String + ?nickname: String? ) -> void def to_hash: -> { @@ -207,7 +197,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, account_name: String, - nickname: String + nickname: String? } type state = :DELETED | :ENABLED | :PENDING diff --git a/sig/lithic/resources/accounts.rbs b/sig/lithic/resources/accounts.rbs index da34a111..56aebf0d 100644 --- a/sig/lithic/resources/accounts.rbs +++ b/sig/lithic/resources/accounts.rbs @@ -13,7 +13,7 @@ module Lithic ?lifetime_spend_limit: Integer, ?monthly_spend_limit: Integer, ?state: Lithic::Models::AccountUpdateParams::state, - ?substatus: Lithic::Models::AccountUpdateParams::substatus, + ?substatus: Lithic::Models::AccountUpdateParams::substatus?, ?verification_address: Lithic::AccountUpdateParams::VerificationAddress, ?request_options: Lithic::request_opts ) -> Lithic::Account diff --git a/test/lithic/resources/cards_test.rb b/test/lithic/resources/cards_test.rb index 0c541c67..fb20bcb0 100644 --- a/test/lithic/resources/cards_test.rb +++ b/test/lithic/resources/cards_test.rb @@ -47,7 +47,7 @@ def test_list account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding | nil, last_four: String, pin_status: Lithic::NonPCICard::PinStatus, spend_limit: Integer, From f9ff453ab8d4d2ad0170f3e55bf8ef7b75f72587 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:35:27 +0000 Subject: [PATCH 2/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccbfde87..a0da8756 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml -openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml +openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc config_hash: ac8326134e692f3f3bdec82396bbec80 From b03a0eb40e63ea3c40ffe90eaa30796a7722feac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:58:25 +0000 Subject: [PATCH 3/9] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From a209f16480d3a19ba50c00ea1c5b8c6b3950129e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:46:48 +0000 Subject: [PATCH 4/9] feat(api): add AMEX network value to settlement models --- .stats.yml | 4 ++-- .../models/reports/settlement/network_total_list_params.rb | 1 + lib/lithic/models/settlement_detail.rb | 1 + lib/lithic/models/settlement_summary_details.rb | 1 + .../models/reports/settlement/network_total_list_params.rbi | 5 +++++ rbi/lithic/models/settlement_detail.rbi | 1 + rbi/lithic/models/settlement_summary_details.rbi | 2 ++ .../models/reports/settlement/network_total_list_params.rbs | 3 ++- sig/lithic/models/settlement_detail.rbs | 4 +++- sig/lithic/models/settlement_summary_details.rbs | 4 +++- 10 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0da8756..cba45ec2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml -openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/reports/settlement/network_total_list_params.rb b/lib/lithic/models/reports/settlement/network_total_list_params.rb index 3342f3a4..3910397e 100644 --- a/lib/lithic/models/reports/settlement/network_total_list_params.rb +++ b/lib/lithic/models/reports/settlement/network_total_list_params.rb @@ -112,6 +112,7 @@ class NetworkTotalListParams < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX VISA = :VISA MASTERCARD = :MASTERCARD MAESTRO = :MAESTRO diff --git a/lib/lithic/models/settlement_detail.rb b/lib/lithic/models/settlement_detail.rb index 054de972..c1cec8a3 100644 --- a/lib/lithic/models/settlement_detail.rb +++ b/lib/lithic/models/settlement_detail.rb @@ -188,6 +188,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX INTERLINK = :INTERLINK MAESTRO = :MAESTRO MASTERCARD = :MASTERCARD diff --git a/lib/lithic/models/settlement_summary_details.rb b/lib/lithic/models/settlement_summary_details.rb index 2df9d7a7..d894b168 100644 --- a/lib/lithic/models/settlement_summary_details.rb +++ b/lib/lithic/models/settlement_summary_details.rb @@ -80,6 +80,7 @@ class SettlementSummaryDetails < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX INTERLINK = :INTERLINK MAESTRO = :MAESTRO MASTERCARD = :MASTERCARD diff --git a/rbi/lithic/models/reports/settlement/network_total_list_params.rbi b/rbi/lithic/models/reports/settlement/network_total_list_params.rbi index 5eb67f65..3bbaa45e 100644 --- a/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +++ b/rbi/lithic/models/reports/settlement/network_total_list_params.rbi @@ -193,6 +193,11 @@ module Lithic end OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = + T.let( + :AMEX, + Lithic::Reports::Settlement::NetworkTotalListParams::Network::TaggedSymbol + ) VISA = T.let( :VISA, diff --git a/rbi/lithic/models/settlement_detail.rbi b/rbi/lithic/models/settlement_detail.rbi index ac051101..9050d615 100644 --- a/rbi/lithic/models/settlement_detail.rbi +++ b/rbi/lithic/models/settlement_detail.rbi @@ -226,6 +226,7 @@ module Lithic T.type_alias { T.all(Symbol, Lithic::SettlementDetail::Network) } OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = T.let(:AMEX, Lithic::SettlementDetail::Network::TaggedSymbol) INTERLINK = T.let(:INTERLINK, Lithic::SettlementDetail::Network::TaggedSymbol) MAESTRO = diff --git a/rbi/lithic/models/settlement_summary_details.rbi b/rbi/lithic/models/settlement_summary_details.rbi index ef4213d2..dddcef17 100644 --- a/rbi/lithic/models/settlement_summary_details.rbi +++ b/rbi/lithic/models/settlement_summary_details.rbi @@ -137,6 +137,8 @@ module Lithic end OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = + T.let(:AMEX, Lithic::SettlementSummaryDetails::Network::TaggedSymbol) INTERLINK = T.let( :INTERLINK, diff --git a/sig/lithic/models/reports/settlement/network_total_list_params.rbs b/sig/lithic/models/reports/settlement/network_total_list_params.rbs index cb5804b2..2a1a8365 100644 --- a/sig/lithic/models/reports/settlement/network_total_list_params.rbs +++ b/sig/lithic/models/reports/settlement/network_total_list_params.rbs @@ -98,11 +98,12 @@ module Lithic request_options: Lithic::RequestOptions } - type network = :VISA | :MASTERCARD | :MAESTRO | :INTERLINK + type network = :AMEX | :VISA | :MASTERCARD | :MAESTRO | :INTERLINK module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX VISA: :VISA MASTERCARD: :MASTERCARD MAESTRO: :MAESTRO diff --git a/sig/lithic/models/settlement_detail.rbs b/sig/lithic/models/settlement_detail.rbs index af7beae1..cda4b410 100644 --- a/sig/lithic/models/settlement_detail.rbs +++ b/sig/lithic/models/settlement_detail.rbs @@ -118,11 +118,13 @@ module Lithic fee_description: String } - type network = :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA + type network = + :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX INTERLINK: :INTERLINK MAESTRO: :MAESTRO MASTERCARD: :MASTERCARD diff --git a/sig/lithic/models/settlement_summary_details.rbs b/sig/lithic/models/settlement_summary_details.rbs index 0617747a..9a7c1cab 100644 --- a/sig/lithic/models/settlement_summary_details.rbs +++ b/sig/lithic/models/settlement_summary_details.rbs @@ -69,11 +69,13 @@ module Lithic transactions_gross_amount: Integer } - type network = :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA + type network = + :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX INTERLINK: :INTERLINK MAESTRO: :MAESTRO MASTERCARD: :MASTERCARD From 02db7be84225c5782bdcf2de90c55890bd2b0358 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:36:50 +0000 Subject: [PATCH 5/9] docs(api): update exp_month/exp_year descriptions in card create/renew params --- .stats.yml | 2 +- lib/lithic/models/card_create_params.rb | 6 ++++-- lib/lithic/models/card_renew_params.rb | 6 ++++-- rbi/lithic/models/card_create_params.rbi | 12 ++++++++---- rbi/lithic/models/card_renew_params.rbi | 12 ++++++++---- rbi/lithic/resources/cards.rbi | 12 ++++++++---- 6 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index cba45ec2..bf2a162b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml -openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 +openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/card_create_params.rb b/lib/lithic/models/card_create_params.rb index 1d6837a9..eebe84a7 100644 --- a/lib/lithic/models/card_create_params.rb +++ b/lib/lithic/models/card_create_params.rb @@ -72,14 +72,16 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # @!attribute exp_month # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. # # @return [String, nil] optional :exp_month, String # @!attribute exp_year # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. # # @return [String, nil] optional :exp_year, String diff --git a/lib/lithic/models/card_renew_params.rb b/lib/lithic/models/card_renew_params.rb index 5b7cd10c..6f591929 100644 --- a/lib/lithic/models/card_renew_params.rb +++ b/lib/lithic/models/card_renew_params.rb @@ -26,14 +26,16 @@ class CardRenewParams < Lithic::Internal::Type::BaseModel # @!attribute exp_month # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. # # @return [String, nil] optional :exp_month, String # @!attribute exp_year # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. # # @return [String, nil] optional :exp_year, String diff --git a/rbi/lithic/models/card_create_params.rbi b/rbi/lithic/models/card_create_params.rbi index 2b5a1b0a..2757fcc8 100644 --- a/rbi/lithic/models/card_create_params.rbi +++ b/rbi/lithic/models/card_create_params.rbi @@ -78,7 +78,8 @@ module Lithic attr_writer :digital_card_art_token # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_month @@ -86,7 +87,8 @@ module Lithic attr_writer :exp_month # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_year @@ -339,10 +341,12 @@ module Lithic # [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. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Friendly name to identify the card. memo: nil, diff --git a/rbi/lithic/models/card_renew_params.rbi b/rbi/lithic/models/card_renew_params.rbi index 985dcef1..ae1336b9 100644 --- a/rbi/lithic/models/card_renew_params.rbi +++ b/rbi/lithic/models/card_renew_params.rbi @@ -29,7 +29,8 @@ module Lithic attr_writer :carrier # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_month @@ -37,7 +38,8 @@ module Lithic attr_writer :exp_month # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_year @@ -100,10 +102,12 @@ module Lithic # If omitted, the previous carrier will be used. carrier: nil, # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Specifies the configuration (e.g. physical card art) that the card should be # manufactured with, and only applies to cards of type `PHYSICAL`. This must be diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 7b4b41a4..057c572b 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -80,10 +80,12 @@ module Lithic # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). digital_card_art_token: nil, # Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` - # is provided, an expiration date will be generated. + # is provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_month: nil, # Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` - # is provided, an expiration date will be generated. + # is provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Body param: Friendly name to identify the card. memo: nil, @@ -556,10 +558,12 @@ module Lithic # If omitted, the previous carrier will be used. carrier: nil, # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Specifies the configuration (e.g. physical card art) that the card should be # manufactured with, and only applies to cards of type `PHYSICAL`. This must be From 01b4c634e91f47513e26619946ab010f5f1decec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:33:12 +0000 Subject: [PATCH 6/9] feat: support setting headers via env --- lib/lithic/client.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index 8b78c197..6d9b1b5d 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -190,6 +190,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"LITHIC_API_KEY\"") end + headers = {} + custom_headers_env = ENV["LITHIC_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s @webhook_secret = webhook_secret&.to_s @@ -198,7 +211,8 @@ def initialize( timeout: timeout, max_retries: max_retries, initial_retry_delay: initial_retry_delay, - max_retry_delay: max_retry_delay + max_retry_delay: max_retry_delay, + headers: headers ) @accounts = Lithic::Resources::Accounts.new(client: self) From 7da8cdf24a46edc1a7cdd8764275542590c729a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:53:56 +0000 Subject: [PATCH 7/9] chore(internal): codegen related update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4ee606a..4eba03fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -143,7 +143,7 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - standardwebhooks (1.0.1) + standardwebhooks (1.1.0) steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) From d13400571fbb6f7b00b420bd13437d5abcfe1fd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:04:46 +0000 Subject: [PATCH 8/9] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf2a162b..6e83ca3b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 98c42f600e3cb1925288753896d4b61c47026246 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:05:17 +0000 Subject: [PATCH 9/9] release: 0.13.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 25 +++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7130553..d52d2b97 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ae7832..a86c4fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.13.0 (2026-04-28) + +Full Changelog: [v0.12.0...v0.13.0](https://github.com/lithic-com/lithic-ruby/compare/v0.12.0...v0.13.0) + +### Features + +* **api:** add AMEX network value to settlement models ([a209f16](https://github.com/lithic-com/lithic-ruby/commit/a209f16480d3a19ba50c00ea1c5b8c6b3950129e)) +* support setting headers via env ([01b4c63](https://github.com/lithic-com/lithic-ruby/commit/01b4c634e91f47513e26619946ab010f5f1decec)) + + +### Bug Fixes + +* **api:** Allow null values for optional enum and object fields in schema validation ([9ebb823](https://github.com/lithic-com/lithic-ruby/commit/9ebb8239e22dc3f680560918ac628af6707a3114)) + + +### Chores + +* **internal:** codegen related update ([7da8cdf](https://github.com/lithic-com/lithic-ruby/commit/7da8cdf24a46edc1a7cdd8764275542590c729a7)) +* **internal:** more robust bootstrap script ([b03a0eb](https://github.com/lithic-com/lithic-ruby/commit/b03a0eb40e63ea3c40ffe90eaa30796a7722feac)) + + +### Documentation + +* **api:** update exp_month/exp_year descriptions in card create/renew params ([02db7be](https://github.com/lithic-com/lithic-ruby/commit/02db7be84225c5782bdcf2de90c55890bd2b0358)) + ## 0.12.0 (2026-04-20) Full Changelog: [v0.11.0...v0.12.0](https://github.com/lithic-com/lithic-ruby/compare/v0.11.0...v0.12.0) diff --git a/Gemfile.lock b/Gemfile.lock index 4eba03fe..1c6d5542 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.12.0) + lithic (0.13.0) cgi connection_pool diff --git a/README.md b/README.md index e1731131..057c6c36 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.12.0" +gem "lithic", "~> 0.13.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 297e5449..6760a97d 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.12.0" + VERSION = "0.13.0" end