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.9.0"
".": "0.10.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: 190
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-5bb8d2bedef02f07498de3f252fa6da1393d2fb59f727b05828804cea9aded30.yml
openapi_spec_hash: d1f260252b3bb7ebc77fa7134db6c65d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-8aac2690599ec7343fab3957433e94ebf63ac1186c753e00dff85b32f4d6e88c.yml
openapi_spec_hash: 84da9d0725e41cb5661c6ed6661ce101
config_hash: 400b9afe0f7f7b7d96177d05950775f9
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.10.0 (2026-03-20)

Full Changelog: [v0.9.0...v0.10.0](https://github.com/lithic-com/lithic-ruby/compare/v0.9.0...v0.10.0)

### Features

* **api:** Add CARD_AGE and ACCOUNT_AGE attributes to authorization rules ([b5bc545](https://github.com/lithic-com/lithic-ruby/commit/b5bc54552df7e04862780f15b0dc96d2732ad038))
* **api:** add override_company_name parameter to external payment create ([73612ab](https://github.com/lithic-com/lithic-ruby/commit/73612ab7a4e46f5572f7d12839acddb7beeb4b75))
* **api:** Add service and merchant location fields ([d0111e3](https://github.com/lithic-com/lithic-ruby/commit/d0111e33b4f6ca04b75f07440f3fc11e0406bbcd))


### Chores

* **tests:** bump steady to v0.19.4 ([ecee69a](https://github.com/lithic-com/lithic-ruby/commit/ecee69aa012a80f970784d78a9298db6155dd991))
* **tests:** bump steady to v0.19.5 ([8a046d1](https://github.com/lithic-com/lithic-ruby/commit/8a046d1ed8d6b7409244efb552809b28937ebed8))


### Refactors

* **tests:** switch from prism to steady ([74cea9d](https://github.com/lithic-com/lithic-ruby/commit/74cea9d46211777e8e1de61ef24f52b0412564cd))

## 0.9.0 (2026-03-17)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/lithic-com/lithic-ruby/compare/v0.8.0...v0.9.0)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $ bundle exec rake

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.

```sh
$ ./scripts/mock
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
lithic (0.9.0)
lithic (0.10.0)
cgi
connection_pool

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.9.0"
gem "lithic", "~> 0.10.0"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
require_relative "lithic/client"
require_relative "lithic/internal/cursor_page"
require_relative "lithic/internal/single_page"
require_relative "lithic/models/merchant"
require_relative "lithic/models/transaction"
require_relative "lithic/models/auth_rules/v2/backtest_results"
require_relative "lithic/models/book_transfer_response"
Expand Down Expand Up @@ -348,7 +349,6 @@
require_relative "lithic/models/management_operation_retrieve_params"
require_relative "lithic/models/management_operation_reverse_params"
require_relative "lithic/models/management_operation_updated_webhook_event"
require_relative "lithic/models/merchant"
require_relative "lithic/models/message_attempt"
require_relative "lithic/models/network_program"
require_relative "lithic/models/network_program_list_params"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ class Condition < Lithic::Internal::Type::BaseModel
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
# - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
# cardholder received the service, e.g. "NY". When a service location is present
# in the network data, the service location state is used. Otherwise, falls back
# to the card acceptor state.
# - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
# the service, e.g. "10001". When a service location is present in the network
# data, the service location postal code is used. Otherwise, falls back to the
# card acceptor postal code.
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
# of the authorization.
#
# @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute]
required :attribute,
Expand Down Expand Up @@ -172,6 +183,17 @@ class Condition < Lithic::Internal::Type::BaseModel
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
# - `SERVICE_LOCATION_STATE`: The state/province code (ISO 3166-2) where the
# cardholder received the service, e.g. "NY". When a service location is present
# in the network data, the service location state is used. Otherwise, falls back
# to the card acceptor state.
# - `SERVICE_LOCATION_POSTAL_CODE`: The postal code where the cardholder received
# the service, e.g. "10001". When a service location is present in the network
# data, the service location postal code is used. Otherwise, falls back to the
# card acceptor postal code.
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
# of the authorization.
#
# @see Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition#attribute
module Attribute
Expand All @@ -196,6 +218,10 @@ module Attribute
WALLET_TYPE = :WALLET_TYPE
TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR
ADDRESS_MATCH = :ADDRESS_MATCH
SERVICE_LOCATION_STATE = :SERVICE_LOCATION_STATE
SERVICE_LOCATION_POSTAL_CODE = :SERVICE_LOCATION_POSTAL_CODE
CARD_AGE = :CARD_AGE
ACCOUNT_AGE = :ACCOUNT_AGE

# @!method self.values
# @return [Array<Symbol>]
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic/models/auth_rules/rule_feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module AuthRules
# - `CARD`: The card associated with the event. Available for AUTHORIZATION and
# THREE_DS_AUTHENTICATION event stream rules.
# - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for
# THREE_DS_AUTHENTICATION event stream rules.
# AUTHORIZATION and THREE_DS_AUTHENTICATION event stream rules.
# - `IP_METADATA`: IP address metadata for the request. Available for
# THREE_DS_AUTHENTICATION event stream rules.
# - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::Bas
required :event_type, const: :"card_authorization.approval_request"

# @!attribute merchant
# Merchant information including full location details.
#
# @return [Lithic::Models::Merchant]
required :merchant, -> { Lithic::Merchant }
# @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Merchant]
required :merchant, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Merchant }

# @!attribute merchant_amount
# @deprecated
Expand All @@ -114,6 +115,16 @@ class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::Bas
# @return [String]
required :merchant_currency, String

# @!attribute service_location
# Where the cardholder received the service, when different from the card acceptor
# location. This is populated from network data elements such as Mastercard DE-122
# SE1 SF9-14 and Visa F34 DS02.
#
# @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation, nil]
required :service_location,
-> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation },
nil?: true

# @!attribute settled_amount
# @deprecated
#
Expand Down Expand Up @@ -232,7 +243,7 @@ class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::Bas
# @return [Time, nil]
optional :ttl, Time

# @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil, event_type: :"card_authorization.approval_request")
# @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil, event_type: :"card_authorization.approval_request")
# Some parameter documentations has been truncated, see
# {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent} for more details.
#
Expand All @@ -256,12 +267,14 @@ class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::Bas
#
# @param created [Time] Date and time when the transaction first occurred in UTC.
#
# @param merchant [Lithic::Models::Merchant]
# @param merchant [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Merchant] Merchant information including full location details.
#
# @param merchant_amount [Integer] Deprecated, use `amounts`. The amount that the merchant will receive, denominate
#
# @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction.
#
# @param service_location [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor
#
# @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se
#
# @param status [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Status] The type of authorization request that this request is for. Note that `CREDIT_AU
Expand Down Expand Up @@ -605,6 +618,84 @@ module Type
end
end

# @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#merchant
class Merchant < Lithic::Models::Merchant
# @!attribute phone_number
# Phone number of card acceptor.
#
# @return [String, nil]
required :phone_number, String, nil?: true

# @!attribute postal_code
# Postal code of card acceptor.
#
# @return [String, nil]
required :postal_code, String, nil?: true

# @!attribute street_address
# Street address of card acceptor.
#
# @return [String, nil]
required :street_address, String, nil?: true

# @!method initialize(phone_number:, postal_code:, street_address:)
# Merchant information including full location details.
#
# @param phone_number [String, nil] Phone number of card acceptor.
#
# @param postal_code [String, nil] Postal code of card acceptor.
#
# @param street_address [String, nil] Street address of card acceptor.
end

# @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#service_location
class ServiceLocation < Lithic::Internal::Type::BaseModel
# @!attribute city
# City of service location.
#
# @return [String, nil]
required :city, String, nil?: true

# @!attribute country
# Country code of service location, ISO 3166-1 alpha-3.
#
# @return [String, nil]
required :country, String, nil?: true

# @!attribute postal_code
# Postal code of service location.
#
# @return [String, nil]
required :postal_code, String, nil?: true

# @!attribute state
# State/province code of service location, ISO 3166-2.
#
# @return [String, nil]
required :state, String, nil?: true

# @!attribute street_address
# Street address of service location.
#
# @return [String, nil]
required :street_address, String, nil?: true

# @!method initialize(city:, country:, postal_code:, state:, street_address:)
# Where the cardholder received the service, when different from the card acceptor
# location. This is populated from network data elements such as Mastercard DE-122
# SE1 SF9-14 and Visa F34 DS02.
#
# @param city [String, nil] City of service location.
#
# @param country [String, nil] Country code of service location, ISO 3166-1 alpha-3.
#
# @param postal_code [String, nil] Postal code of service location.
#
# @param state [String, nil] State/province code of service location, ISO 3166-2.
#
# @param street_address [String, nil] Street address of service location.
end

# The type of authorization request that this request is for. Note that
# `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
# users with credit decisioning via ASA enabled.
Expand Down
15 changes: 14 additions & 1 deletion lib/lithic/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,13 @@ class ACHMethodAttributes < Lithic::Internal::Type::BaseModel
# @return [String, nil]
optional :company_id, String, nil?: true

# @!attribute override_company_name
# Value to override the configured company name with. Can only be used if allowed
# to override
#
# @return [String, nil]
optional :override_company_name, String, nil?: true

# @!attribute receipt_routing_number
# Receipt routing number
#
Expand All @@ -538,7 +545,11 @@ class ACHMethodAttributes < Lithic::Internal::Type::BaseModel
# @return [Array<String>, nil]
optional :trace_numbers, Lithic::Internal::Type::ArrayOf[String]

# @!method initialize(sec_code:, ach_hold_period: nil, addenda: nil, company_id: nil, receipt_routing_number: nil, retries: nil, return_reason_code: nil, trace_numbers: nil)
# @!method initialize(sec_code:, ach_hold_period: nil, addenda: nil, company_id: nil, override_company_name: nil, receipt_routing_number: nil, retries: nil, return_reason_code: nil, trace_numbers: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes} for more
# details.
#
# @param sec_code [Symbol, Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes::SecCode] SEC code for ACH transaction
#
# @param ach_hold_period [Integer, nil] Number of days the ACH transaction is on hold
Expand All @@ -547,6 +558,8 @@ class ACHMethodAttributes < Lithic::Internal::Type::BaseModel
#
# @param company_id [String, nil] Company ID for the ACH transaction
#
# @param override_company_name [String, nil] Value to override the configured company name with. Can only be used if allowed
#
# @param receipt_routing_number [String, nil] Receipt routing number
#
# @param retries [Integer, nil] Number of retries attempted
Expand Down
Loading