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.3.0"
".": "0.4.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: 176
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
config_hash: 9dddee5f7af579864599849cb28a0770
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6e80e52c9f20d95780f2cf4869f80ee2c4b270ff9470941dc057e79d15bda1a.yml
openapi_spec_hash: f2bb7084cd5225769302589cd1563241
config_hash: 31d71922d7838f34ae0875c9b8026d99
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## 0.4.0 (2026-01-16)

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

### Features

* **api:** Add card state attribute to tokenization rules ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))
* **api:** Add event_type to ASA request and 3DS decisioning request ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))
* **api:** Add idempotency key to cards POST and PATCH endpoints ([51321d8](https://github.com/lithic-com/lithic-ruby/commit/51321d8d84f5e1fcb4e9161dd607f01dc9d5cf5d))
* **api:** Add user defined status to ledger accounts ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))
* **api:** Expose Payment Allocation Details ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))
* **api:** make filter optional for Spend Velocity Auth Rules ([3e09d4a](https://github.com/lithic-com/lithic-ruby/commit/3e09d4a5488c83ad8122c973baf5eb4e18de29b0))


### Bug Fixes

* **api:** Correct field name from ach_hold__period to ach_hold_period ([16b6555](https://github.com/lithic-com/lithic-ruby/commit/16b65553840cfad0d39eb52d9770ca394a893c44))
* **api:** mark AppleWebPushProvisioningResponse fields required ([4105b29](https://github.com/lithic-com/lithic-ruby/commit/4105b29d27ce48c60180c5b7166e664fdd1c0e46))
* **api:** rename WIRE_DRAWDOWN_REQUEST to WIRE_INBOUND_DRAWDOWN_REQUEST ([3e09d4a](https://github.com/lithic-com/lithic-ruby/commit/3e09d4a5488c83ad8122c973baf5eb4e18de29b0))


### Chores

* configure new SDK language ([ba770b2](https://github.com/lithic-com/lithic-ruby/commit/ba770b2cd5f50ba1871c539f89036ff4538b1df2))
* **internal:** codegen related update ([ef965b2](https://github.com/lithic-com/lithic-ruby/commit/ef965b2fc0cfebc92a3d2317b7201318bcd500aa))
* **internal:** codegen related update ([143a5ea](https://github.com/lithic-com/lithic-ruby/commit/143a5ea456ee1e6db32fd923ddb68f749ceed53b))
* Rework event type generation to support spec splitting ([fdb9960](https://github.com/lithic-com/lithic-ruby/commit/fdb9960d08f95f161da8abf310509d594a0d2957))
* update code formatting ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))


### Documentation

* Update language for Google Web Push Provisioning docs ([0fe9646](https://github.com/lithic-com/lithic-ruby/commit/0fe9646694e932fddba74b91dcc7cdb1bb565d10))

## 0.3.0 (2026-01-08)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/lithic-com/lithic-ruby/compare/v0.2.0...v0.3.0)
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ GIT
PATH
remote: .
specs:
lithic (0.3.0)
lithic (0.4.0)
cgi
connection_pool

GEM
Expand Down Expand Up @@ -49,6 +50,7 @@ GEM
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
cgi (0.5.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
console (1.34.2)
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.3.0"
gem "lithic", "~> 0.4.0"
```

<!-- x-release-please-end -->
Expand Down
42 changes: 21 additions & 21 deletions lib/lithic/models/auth_rules/velocity_limit_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ module Lithic
module Models
module AuthRules
class VelocityLimitParams < Lithic::Internal::Type::BaseModel
# @!attribute filters
#
# @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
required :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters }

# @!attribute period
# Velocity over the current day since 00:00 / 12 AM in Eastern Time
#
Expand All @@ -21,6 +16,11 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel
# @return [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope]
required :scope, enum: -> { Lithic::AuthRules::VelocityLimitParams::Scope }

# @!attribute filters
#
# @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters, nil]
optional :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters }

# @!attribute limit_amount
# The maximum amount of spend velocity allowed in the period in minor units (the
# smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
Expand All @@ -39,20 +39,33 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel
# @return [Integer, nil]
optional :limit_count, Integer, nil?: true

# @!method initialize(filters:, period:, scope:, limit_amount: nil, limit_count: nil)
# @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_count: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::VelocityLimitParams} for more details.
#
# @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
#
# @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time
#
# @param scope [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope] The scope the velocity is calculated for
#
# @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
#
# @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s
#
# @param limit_count [Integer, nil] The number of spend velocity impacting transactions may not exceed this limit in

# The scope the velocity is calculated for
#
# @see Lithic::Models::AuthRules::VelocityLimitParams#scope
module Scope
extend Lithic::Internal::Type::Enum

CARD = :CARD
ACCOUNT = :ACCOUNT

# @!method self.values
# @return [Array<Symbol>]
end

# @see Lithic::Models::AuthRules::VelocityLimitParams#filters
class Filters < Lithic::Internal::Type::BaseModel
# @!attribute exclude_countries
Expand Down Expand Up @@ -133,19 +146,6 @@ module IncludePanEntryMode
# @return [Array<Symbol>]
end
end

# The scope the velocity is calculated for
#
# @see Lithic::Models::AuthRules::VelocityLimitParams#scope
module Scope
extend Lithic::Internal::Type::Enum

CARD = :CARD
ACCOUNT = :ACCOUNT

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
Expand Down
9 changes: 8 additions & 1 deletion lib/lithic/models/card_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,12 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel
# @return [Symbol, Lithic::Models::CardCreateParams::State, nil]
optional :state, enum: -> { Lithic::CardCreateParams::State }

# @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {Lithic::Models::CardCreateParams} for more details.
#
Expand Down Expand Up @@ -270,6 +275,8 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel
#
# @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values:
#
# @param idempotency_key [String]
#
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]

# Card types:
Expand Down
10 changes: 5 additions & 5 deletions lib/lithic/models/card_web_provision_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ class AppleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel
# @!attribute jws
# JWS object required for handoff to Apple's script.
#
# @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, nil]
optional :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws }
# @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws]
required :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws }

# @!attribute state
# A unique identifier for the JWS object.
#
# @return [String, nil]
optional :state, String
# @return [String]
required :state, String

# @!method initialize(jws: nil, state: nil)
# @!method initialize(jws:, state:)
# @param jws [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] JWS object required for handoff to Apple's script.
#
# @param state [String] A unique identifier for the JWS object.
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ module Type
WIRE_INBOUND_ADMIN = :WIRE_INBOUND_ADMIN
WIRE_OUTBOUND_PAYMENT = :WIRE_OUTBOUND_PAYMENT
WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN
WIRE_DRAWDOWN_REQUEST = :WIRE_DRAWDOWN_REQUEST
WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST

# @!method self.values
# @return [Array<Symbol>]
Expand Down
2 changes: 1 addition & 1 deletion lib/lithic/models/payment_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class MethodAttributes < Lithic::Internal::Type::BaseModel
# Number of days to hold the ACH payment
#
# @return [Integer, nil]
optional :ach_hold_period, Integer, api_name: :ach_hold__period
optional :ach_hold_period, Integer

# @!attribute addenda
#
Expand Down
54 changes: 32 additions & 22 deletions lib/lithic/resources/cards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,49 @@ class Cards
# Create a new virtual or physical card. Parameters `shipping_address` and
# `product_id` only apply to physical cards.
#
# @overload create(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
# @overload create(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {})
#
# @param type [Symbol, Lithic::Models::CardCreateParams::Type] Card types:
# @param type [Symbol, Lithic::Models::CardCreateParams::Type] Body param: Card types:
#
# @param account_token [String] Globally unique identifier for the account that the card will be associated with
# @param account_token [String] Body param: Globally unique identifier for the account that the card will be ass
#
# @param bulk_order_token [String] Globally unique identifier for an existing bulk order to associate this card wit
# @param bulk_order_token [String] Body param: Globally unique identifier for an existing bulk order to associate t
#
# @param card_program_token [String] For card programs with more than one BIN range. This must be configured with Lit
# @param card_program_token [String] Body param: For card programs with more than one BIN range. This must be configu
#
# @param carrier [Lithic::Models::Carrier]
# @param carrier [Lithic::Models::Carrier] Body param
#
# @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] Body param: Specifies the digital card art to be displayed in the user’s digital
#
# @param exp_month [String] Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
# @param exp_month [String] Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` i
#
# @param exp_year [String] Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided
# @param exp_year [String] Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year`
#
# @param memo [String] Friendly name to identify the card.
# @param memo [String] Body param: Friendly name to identify the card.
#
# @param pin [String] Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and `VIRTUA
# @param pin [String] Body param: Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL`
#
# @param product_id [String] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic
# @param product_id [String] Body param: Only applicable to cards of type `PHYSICAL`. This must be configured
#
# @param replacement_account_token [String] Restricted field limited to select use cases. Lithic will reach out directly if
# @param replacement_account_token [String] Body param: Restricted field limited to select use cases. Lithic will reach out
#
# @param replacement_comment [String] Additional context or information related to the card that this card will replac
# @param replacement_comment [String] Body param: Additional context or information related to the card that this card
#
# @param replacement_for [String] Globally unique identifier for the card that this card will replace. If the card
# @param replacement_for [String] Body param: Globally unique identifier for the card that this card will replace.
#
# @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Card state substatus values for the card that this card will replace:
# @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Body param: Card state substatus values for the card that this card will replace
#
# @param shipping_address [Lithic::Models::ShippingAddress]
# @param shipping_address [Lithic::Models::ShippingAddress] Body param
#
# @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Shipping method for the card. Only applies to cards of type PHYSICAL.
# @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Body param: Shipping method for the card. Only applies to cards of type PHYSICAL
#
# @param spend_limit [Integer] Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,00
# @param spend_limit [Integer] Body param: Amount (in cents) to limit approved authorizations (e.g. 100000 woul
#
# @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Spend limit duration values:
# @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Body param: Spend limit duration values:
#
# @param state [Symbol, Lithic::Models::CardCreateParams::State] Body param: Card state values:
#
# @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values:
# @param idempotency_key [String] Header param: Idempotency key for the request
#
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
#
Expand All @@ -64,7 +66,15 @@ class Cards
# @see Lithic::Models::CardCreateParams
def create(params)
parsed, options = Lithic::CardCreateParams.dump_request(params)
@client.request(method: :post, path: "v1/cards", body: parsed, model: Lithic::Card, options: options)
header_params = {idempotency_key: "idempotency-key"}
@client.request(
method: :post,
path: "v1/cards",
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
body: parsed.except(*header_params.keys),
model: Lithic::Card,
options: options
)
end

# Get card configuration such as spend limit and state.
Expand Down
10 changes: 5 additions & 5 deletions lib/lithic/resources/financial_accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class FinancialAccounts
#
# @overload create(nickname:, type:, account_token: nil, is_for_benefit_of: nil, idempotency_key: nil, request_options: {})
#
# @param nickname [String] Body param:
# @param nickname [String] Body param
#
# @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param:
# @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param
#
# @param account_token [String] Body param:
# @param account_token [String] Body param
#
# @param is_for_benefit_of [Boolean] Body param:
# @param is_for_benefit_of [Boolean] Body param
#
# @param idempotency_key [String] Header param:
# @param idempotency_key [String] Header param: Idempotency key for the request
#
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
#
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.3.0"
VERSION = "0.4.0"
end
1 change: 1 addition & 0 deletions lithic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ Gem::Specification.new do |s|
".ignore"
]
s.extra_rdoc_files = ["README.md"]
s.add_dependency "cgi"
s.add_dependency "connection_pool"
end
Loading