Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.12.0"
".": "0.13.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
config_hash: ac8326134e692f3f3bdec82396bbec80
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0f374e78a0212145a2f55a55dfc39a612de19094d5152ae26b1bc74b01b9e343.yml
openapi_spec_hash: ec888cdaebea979a2cd6231ca04c346c
config_hash: 01dfc901bb6d54b0f582155d779bcbe0
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.13.0 (2026-05-06)

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))
* **api:** add CARD_TRANSACTION_UPDATE event stream to auth_rules ([7f395eb](https://github.com/lithic-com/lithic-ruby/commit/7f395eb5b666d1d5563705da6ebe8dd7d8d98787))
* **api:** add IS_NEW_MERCHANT attribute to auth rules conditional authorization ([48b6bd5](https://github.com/lithic-com/lithic-ruby/commit/48b6bd5a7a5076b8e59b6b6f30730c4d1c706a0b))
* 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))
* **types:** clarify event_tokens and transaction_token fields in SettlementDetail ([5eacf6f](https://github.com/lithic-com/lithic-ruby/commit/5eacf6f69073956549ff4d3e2141d56650dd0ba7))

## 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)
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
lithic (0.12.0)
lithic (0.13.0)
cgi
connection_pool

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "lithic", "~> 0.12.0"
gem "lithic", "~> 0.13.0"
```

<!-- x-release-please-end -->
Expand Down
5 changes: 4 additions & 1 deletion lib/lithic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
require_relative "lithic/internal/single_page"
require_relative "lithic/models/merchant"
require_relative "lithic/models/transaction"
require_relative "lithic/models/auth_rules/velocity_limit_filters"
require_relative "lithic/models/auth_rules/v2/backtest_results"
require_relative "lithic/models/book_transfer_response"
require_relative "lithic/models/non_pci_card"
Expand Down Expand Up @@ -118,18 +119,21 @@
require_relative "lithic/models/auth_rules/auth_rule_condition"
require_relative "lithic/models/auth_rules/auth_rule_version"
require_relative "lithic/models/auth_rules/backtest_stats"
require_relative "lithic/models/auth_rules/card_transaction_update_action"
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
require_relative "lithic/models/auth_rules/conditional_ach_action_parameters"
require_relative "lithic/models/auth_rules/conditional_attribute"
require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters"
require_relative "lithic/models/auth_rules/conditional_block_parameters"
require_relative "lithic/models/auth_rules/conditional_card_transaction_update_action_parameters"
require_relative "lithic/models/auth_rules/conditional_operation"
require_relative "lithic/models/auth_rules/conditional_tokenization_action_parameters"
require_relative "lithic/models/auth_rules/conditional_value"
require_relative "lithic/models/auth_rules/event_stream"
require_relative "lithic/models/auth_rules/merchant_lock_parameters"
require_relative "lithic/models/auth_rules/report_stats"
require_relative "lithic/models/auth_rules/rule_feature"
require_relative "lithic/models/auth_rules/spend_velocity_filters"
require_relative "lithic/models/auth_rules/typescript_code_parameters"
require_relative "lithic/models/auth_rules/v2/backtest_create_params"
require_relative "lithic/models/auth_rules/v2/backtest_create_response"
Expand All @@ -149,7 +153,6 @@
require_relative "lithic/models/auth_rules/v2_retrieve_report_params"
require_relative "lithic/models/auth_rules/v2_retrieve_report_response"
require_relative "lithic/models/auth_rules/v2_update_params"
require_relative "lithic/models/auth_rules/velocity_limit_filters"
require_relative "lithic/models/auth_rules/velocity_limit_params"
require_relative "lithic/models/auth_rules/velocity_limit_period"
require_relative "lithic/models/auth_rules_backtest_report_created_webhook_event"
Expand Down
16 changes: 15 additions & 1 deletion lib/lithic/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/lithic/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/lithic/models/account_holder_update_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/lithic/models/account_update_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
#
Expand Down
Loading