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"
}
4 changes: 2 additions & 2 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
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml
openapi_spec_hash: b615a0eb16502b4de874f9ae28491894
config_hash: ac8326134e692f3f3bdec82396bbec80
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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
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
6 changes: 4 additions & 2 deletions lib/lithic/models/card_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions lib/lithic/models/card_renew_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions lib/lithic/models/non_pci_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
#
Expand All @@ -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.
#
Expand All @@ -275,11 +275,11 @@ class NonPCICard < Lithic::Internal::Type::BaseModel
#
# @param pending_commands [Array<String>] 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
Expand Down Expand Up @@ -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.
#
Expand All @@ -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` -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/lithic/models/settlement_detail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/lithic/models/settlement_summary_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic/resources/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Lithic
VERSION = "0.12.0"
VERSION = "0.13.0"
end
Loading