Skip to content
Merged
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.1.0-alpha.53"
".": "0.1.0-alpha.54"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 169
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6432801dcf017d9234739b9f6153a8cfecd91255af4765f24ba5209f3e320b5c.yml
openapi_spec_hash: c2cfee2f044ba15d15b5bfdbd37280c0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-461a5622f5cf2e4e38fab8b899fa619cfa1bff349e3a485b8e4396c3d5b1282f.yml
openapi_spec_hash: 5314a4458e7ebfc7b374bca71966a6e4
config_hash: 8ac73ccdb428816c89c84802c794a3f8
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.1.0-alpha.54 (2025-11-04)

Full Changelog: [v0.1.0-alpha.53...v0.1.0-alpha.54](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.53...v0.1.0-alpha.54)

### Bug Fixes

* better thread safety via early initializing SSL store during HTTP client creation ([67db6d5](https://github.com/lithic-com/lithic-ruby/commit/67db6d53b0af488113c3506c6cacfbfafcf28164))


### Chores

* **api:** adds support for new ACH_RECEIPT_RELEASED event ([1834708](https://github.com/lithic-com/lithic-ruby/commit/183470896e9f3fb3e6f1b5d1e242e14ac6992d89))
* **client:** send user-agent header ([60cfe27](https://github.com/lithic-com/lithic-ruby/commit/60cfe272af1a4018aabca79debcbb6426ba9de0f))
* **internal:** codegen related update ([b4dbac6](https://github.com/lithic-com/lithic-ruby/commit/b4dbac6efd1ca89c7e60fe9a85f19fdc68654492))

## 0.1.0-alpha.53 (2025-10-23)

Full Changelog: [v0.1.0-alpha.52...v0.1.0-alpha.53](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.52...v0.1.0-alpha.53)
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ group :development do
gem "sorbet"
gem "steep"
gem "syntax_tree"
# TODO: using a fork for now, the prettier below has a bug
gem "syntax_tree-rbs", github: "stainless-api/syntax_tree-rbs", branch: "main"
gem "syntax_tree-rbs", github: "ruby-syntax-tree/syntax_tree-rbs", branch: "main"
gem "tapioca"
end

Expand Down
84 changes: 42 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/stainless-api/syntax_tree-rbs.git
revision: c30b50219918be7cfe3ef803a00b59d1e77fcada
remote: https://github.com/ruby-syntax-tree/syntax_tree-rbs.git
revision: f94bc3060682ffbd126e4d5086ffedc89073d626
branch: main
specs:
syntax_tree-rbs (1.0.0)
Expand All @@ -11,20 +11,20 @@ GIT
PATH
remote: .
specs:
lithic (0.1.0.pre.alpha.53)
lithic (0.1.0.pre.alpha.54)
connection_pool

GEM
remote: https://rubygems.org/
specs:
activesupport (8.0.2.1)
activesupport (8.1.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
Expand All @@ -33,22 +33,22 @@ GEM
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.3)
async (2.27.3)
async (2.34.0)
console (~> 1.29)
fiber-annotation
io-event (~> 1.11)
metrics (~> 0.12)
traces (~> 0.15)
traces (~> 0.18)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
benchmark (0.5.0)
bigdecimal (3.3.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.3)
console (1.33.0)
connection_pool (2.5.4)
console (1.34.2)
fiber-annotation
fiber-local (~> 1.1)
json
crack (1.0.0)
crack (1.0.1)
bigdecimal
rexml
csv (3.3.5)
Expand All @@ -64,20 +64,20 @@ GEM
fiber-local (1.1.0)
fiber-storage
fiber-storage (1.0.1)
fileutils (1.7.3)
hashdiff (1.2.0)
fileutils (1.8.0)
hashdiff (1.2.1)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
io-event (1.11.2)
json (2.13.2)
json (2.15.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
metrics (0.13.0)
minitest (5.25.5)
metrics (0.15.0)
minitest (5.26.0)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
minitest-hooks (1.5.2)
Expand All @@ -89,51 +89,51 @@ GEM
mutex_m (0.3.0)
netrc (0.11.0)
parallel (1.27.0)
parser (3.3.9.0)
parser (3.3.10.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (1.4.0)
prism (1.6.0)
public_suffix (6.0.2)
racc (1.8.1)
rainbow (3.1.1)
rake (13.3.0)
rake (13.3.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rbi (0.3.6)
rbi (0.3.7)
prism (~> 1.0)
rbs (>= 3.4.4)
rbs (3.9.4)
rbs (3.9.5)
logger
redcarpet (3.6.1)
regexp_parser (2.11.2)
rexml (3.4.1)
rubocop (1.79.2)
regexp_parser (2.11.3)
rexml (3.4.4)
rubocop (1.81.7)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
rubocop-ast (>= 1.47.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0)
rubocop-ast (1.47.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
sorbet (0.5.12424)
sorbet-static (= 0.5.12424)
sorbet-runtime (0.5.12424)
sorbet-static (0.5.12424-aarch64-linux)
sorbet-static (0.5.12424-universal-darwin)
sorbet-static (0.5.12424-x86_64-linux)
sorbet-static-and-runtime (0.5.12424)
sorbet (= 0.5.12424)
sorbet-runtime (= 0.5.12424)
sorbet (0.6.12690)
sorbet-static (= 0.6.12690)
sorbet-runtime (0.6.12690)
sorbet-static (0.6.12690-aarch64-linux)
sorbet-static (0.6.12690-universal-darwin)
sorbet-static (0.6.12690-x86_64-linux)
sorbet-static-and-runtime (0.6.12690)
sorbet (= 0.6.12690)
sorbet-runtime (= 0.6.12690)
spoom (1.6.3)
erubi (>= 1.10.0)
prism (>= 0.28.0)
Expand Down Expand Up @@ -174,14 +174,14 @@ GEM
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
thor (1.4.0)
traces (0.17.0)
traces (0.18.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (3.1.5)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
webmock (3.25.1)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
uri (1.1.0)
webmock (3.26.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "lithic", "~> 0.1.0.pre.alpha.53"
gem "lithic", "~> 0.1.0.pre.alpha.54"
```

<!-- x-release-please-end -->
Expand Down
1 change: 1 addition & 0 deletions lib/lithic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require "etc"
require "json"
require "net/http"
require "openssl"
require "pathname"
require "rbconfig"
require "securerandom"
Expand Down
8 changes: 7 additions & 1 deletion lib/lithic/internal/transport/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ def initialize(
self.class::PLATFORM_HEADERS,
{
"accept" => "application/json",
"content-type" => "application/json"
"content-type" => "application/json",
"user-agent" => user_agent
},
headers
)
Expand All @@ -219,6 +220,11 @@ def initialize(
# @return [Hash{String=>String}]
private def auth_headers = {}

# @api private
#
# @return [String]
private def user_agent = "#{self.class.name}/Ruby #{Lithic::VERSION}"

# @api private
#
# @return [String]
Expand Down
8 changes: 6 additions & 2 deletions lib/lithic/internal/transport/pooled_net_requester.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class PooledNetRequester
class << self
# @api private
#
# @param cert_store [OpenSSL::X509::Store]
# @param url [URI::Generic]
#
# @return [Net::HTTP]
def connect(url)
def connect(cert_store:, url:)
port =
case [url.port, url.scheme]
in [Integer, _]
Expand All @@ -33,6 +34,8 @@ def connect(url)
Net::HTTP.new(url.host, port).tap do
_1.use_ssl = %w[https wss].include?(url.scheme)
_1.max_retries = 0

(_1.cert_store = cert_store) if _1.use_ssl?
end
end

Expand Down Expand Up @@ -102,7 +105,7 @@ def build_request(request, &blk)
pool =
@mutex.synchronize do
@pools[origin] ||= ConnectionPool.new(size: @size) do
self.class.connect(url)
self.class.connect(cert_store: @cert_store, url: url)
end
end

Expand Down Expand Up @@ -192,6 +195,7 @@ def execute(request)
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
@mutex = Mutex.new
@size = size
@cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
@pools = {}
end

Expand Down
1 change: 1 addition & 0 deletions lib/lithic/models/account_activity_list_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ module Type
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ module Type
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module EventType
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
Expand Down
1 change: 1 addition & 0 deletions lib/lithic/models/financial_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ module Type
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
Expand Down
29 changes: 20 additions & 9 deletions lib/lithic/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,18 @@ class Event < Lithic::Internal::Type::BaseModel
# - `ACH_ORIGINATION_SETTLED` - ACH origination has settled.
# - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to
# available balance.
# - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository
# Financial Institution.
# - `ACH_ORIGINATION_REJECTED` - ACH origination was rejected and not sent to the
# Federal Reserve.
# - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder.
# - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt.
# - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled.
# - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available
# balance.
# - `ACH_RETURN_SETTLED` - ACH receipt return settled by the Receiving Depository
# - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt.
# - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository
# Financial Institution.
# - `ACH_RETURN_SETTLED` - ACH return settled by the Receiving Depository
# Financial Institution.
# - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository
# Financial Institution.
#
# @return [Symbol, Lithic::Models::Payment::Event::Type]
Expand Down Expand Up @@ -326,14 +330,18 @@ module Result
# - `ACH_ORIGINATION_SETTLED` - ACH origination has settled.
# - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to
# available balance.
# - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository
# Financial Institution.
# - `ACH_ORIGINATION_REJECTED` - ACH origination was rejected and not sent to the
# Federal Reserve.
# - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder.
# - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt.
# - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled.
# - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available
# balance.
# - `ACH_RETURN_SETTLED` - ACH receipt return settled by the Receiving Depository
# - `ACH_RETURN_INITIATED` - ACH initiated return for an ACH receipt.
# - `ACH_RETURN_PROCESSED` - ACH receipt returned by the Receiving Depository
# Financial Institution.
# - `ACH_RETURN_SETTLED` - ACH return settled by the Receiving Depository
# Financial Institution.
# - `ACH_RETURN_REJECTED` - ACH return was rejected by the Receiving Depository
# Financial Institution.
#
# @see Lithic::Models::Payment::Event#type
Expand All @@ -343,13 +351,16 @@ module Type
ACH_ORIGINATION_CANCELLED = :ACH_ORIGINATION_CANCELLED
ACH_ORIGINATION_INITIATED = :ACH_ORIGINATION_INITIATED
ACH_ORIGINATION_PROCESSED = :ACH_ORIGINATION_PROCESSED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_ORIGINATION_REJECTED = :ACH_ORIGINATION_REJECTED
ACH_ORIGINATION_RELEASED = :ACH_ORIGINATION_RELEASED
ACH_ORIGINATION_REVIEWED = :ACH_ORIGINATION_REVIEWED
ACH_ORIGINATION_SETTLED = :ACH_ORIGINATION_SETTLED
ACH_RECEIPT_PROCESSED = :ACH_RECEIPT_PROCESSED
ACH_RECEIPT_RELEASED = :ACH_RECEIPT_RELEASED
ACH_RECEIPT_SETTLED = :ACH_RECEIPT_SETTLED
ACH_RETURN_INITIATED = :ACH_RETURN_INITIATED
ACH_RETURN_PROCESSED = :ACH_RETURN_PROCESSED
ACH_RETURN_REJECTED = :ACH_RETURN_REJECTED
ACH_RETURN_SETTLED = :ACH_RETURN_SETTLED

# @!method self.values
Expand Down
Loading