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.37"
".": "0.1.0-alpha.38"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 165
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bc4173417a899a1519326ae60cb481186c1a1c976f3d00b2b305278808db44cd.yml
openapi_spec_hash: 1c1dd981efeffb5276544baa34cf3d17
config_hash: 1a83dceb58f6f525b19a5775018db7e8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-80f2056989855259782c8e23b9b95530b708b87669d2ba82594ecfee843b4db3.yml
openapi_spec_hash: 160aa2f0e95a7be3ad9d68390ae9aa7c
config_hash: a5d12cd64a37624cbe350cd7b2380693
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.38 (2025-07-02)

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

### Features

* **api:** add models for merchant_lock_parameters and conditional_3ds_action_parameters ([246c60f](https://github.com/lithic-com/lithic-ruby/commit/246c60f3befd7dfb5a7ee1cf3d048b9a7a0ce843))

## 0.1.0-alpha.37 (2025-07-02)

Full Changelog: [v0.1.0-alpha.36...v0.1.0-alpha.37](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.36...v0.1.0-alpha.37)
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.1.0.pre.alpha.37)
lithic (0.1.0.pre.alpha.38)
connection_pool

GEM
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.37"
gem "lithic", "~> 0.1.0.pre.alpha.38"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions lib/lithic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
require_relative "lithic/models/api_status"
require_relative "lithic/models/auth_rules/auth_rule"
require_relative "lithic/models/auth_rules/auth_rule_condition"
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
require_relative "lithic/models/auth_rules/conditional_attribute"
require_relative "lithic/models/auth_rules/conditional_block_parameters"
require_relative "lithic/models/auth_rules/merchant_lock_parameters"
require_relative "lithic/models/auth_rules/rule_stats"
require_relative "lithic/models/auth_rules/v2/backtest_create_params"
require_relative "lithic/models/auth_rules/v2/backtest_create_response"
Expand Down
182 changes: 182 additions & 0 deletions lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# frozen_string_literal: true

module Lithic
module Models
module AuthRules
class Conditional3DSActionParameters < Lithic::Internal::Type::BaseModel
# @!attribute action
# The action to take if the conditions are met.
#
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Action]
required :action, enum: -> { Lithic::AuthRules::Conditional3DSActionParameters::Action }

# @!attribute conditions
#
# @return [Array<Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition>]
required :conditions,
-> {
Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::Conditional3DSActionParameters::Condition]
}

# @!method initialize(action:, conditions:)
# @param action [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Action] The action to take if the conditions are met.
#
# @param conditions [Array<Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition>]

# The action to take if the conditions are met.
#
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters#action
module Action
extend Lithic::Internal::Type::Enum

DECLINE = :DECLINE
CHALLENGE = :CHALLENGE

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

class Condition < Lithic::Internal::Type::BaseModel
# @!attribute attribute
# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authentication. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
#
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Attribute, nil]
optional :attribute,
enum: -> {
Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute
}

# @!attribute operation
# The operation to apply to the attribute
#
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Operation, nil]
optional :operation,
enum: -> {
Lithic::AuthRules::Conditional3DSActionParameters::Condition::Operation
}

# @!attribute value
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @return [String, Integer, Array<String>, nil]
optional :value, union: -> { Lithic::AuthRules::Conditional3DSActionParameters::Condition::Value }

# @!method initialize(attribute: nil, operation: nil, value: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition} for more
# details.
#
# @param attribute [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Attribute] The attribute to target.
#
# @param operation [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Operation] The operation to apply to the attribute
#
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`

# The attribute to target.
#
# The following attributes may be targeted:
#
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
# business by the types of goods or services it provides.
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
# Netherlands Antilles.
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
# the transaction.
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
# (merchant).
# - `DESCRIPTOR`: Short description of card acceptor.
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
# fee field in the settlement/cardholder billing currency. This is the amount
# the issuer should authorize against unless the issuer is paying the acquirer
# fee on behalf of the cardholder.
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
# given authentication. Scores are on a range of 0-999, with 0 representing the
# lowest risk and 999 representing the highest risk. For Visa transactions,
# where the raw score has a range of 0-99, Lithic will normalize the score by
# multiplying the raw score by 10x.
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
#
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#attribute
module Attribute
extend Lithic::Internal::Type::Enum

MCC = :MCC
COUNTRY = :COUNTRY
CURRENCY = :CURRENCY
MERCHANT_ID = :MERCHANT_ID
DESCRIPTOR = :DESCRIPTOR
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
RISK_SCORE = :RISK_SCORE
MESSAGE_CATEGORY = :MESSAGE_CATEGORY

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

# The operation to apply to the attribute
#
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#operation
module Operation
extend Lithic::Internal::Type::Enum

IS_ONE_OF = :IS_ONE_OF
IS_NOT_ONE_OF = :IS_NOT_ONE_OF
MATCHES = :MATCHES
DOES_NOT_MATCH = :DOES_NOT_MATCH
IS_GREATER_THAN = :IS_GREATER_THAN
IS_LESS_THAN = :IS_LESS_THAN

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

# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
#
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#value
module Value
extend Lithic::Internal::Type::Union

# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
variant String

# A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN`
variant Integer

# An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
variant -> { Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Value::StringArray }

# @!method self.variants
# @return [Array(String, Integer, Array<String>)]

# @type [Lithic::Internal::Type::Converter]
StringArray = Lithic::Internal::Type::ArrayOf[String]
end
end
end
end
end
end
62 changes: 62 additions & 0 deletions lib/lithic/models/auth_rules/merchant_lock_parameters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# frozen_string_literal: true

module Lithic
module Models
module AuthRules
class MerchantLockParameters < Lithic::Internal::Type::BaseModel
# @!attribute merchants
# A list of merchant locks defining specific merchants or groups of merchants
# (based on descriptors or IDs) that the lock applies to.
#
# @return [Array<Lithic::Models::AuthRules::MerchantLockParameters::Merchant>]
required :merchants,
-> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::MerchantLockParameters::Merchant] }

# @!method initialize(merchants:)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::MerchantLockParameters} for more details.
#
# @param merchants [Array<Lithic::Models::AuthRules::MerchantLockParameters::Merchant>] A list of merchant locks defining specific merchants or groups of merchants (bas

class Merchant < Lithic::Internal::Type::BaseModel
# @!attribute comment
# A comment or explanation about the merchant, used internally for rule management
# purposes.
#
# @return [String, nil]
optional :comment, String

# @!attribute descriptor
# Short description of the merchant, often used to provide more human-readable
# context about the transaction merchant. This is typically the name or label
# shown on transaction summaries.
#
# @return [String, nil]
optional :descriptor, String

# @!attribute merchant_id
# Unique alphanumeric identifier for the payment card acceptor (merchant). This
# attribute specifies the merchant entity that will be locked or referenced for
# authorization rules.
#
# @return [String, nil]
optional :merchant_id, String

# @!method initialize(comment: nil, descriptor: nil, merchant_id: nil)
# Some parameter documentations has been truncated, see
# {Lithic::Models::AuthRules::MerchantLockParameters::Merchant} for more details.
#
# Represents a specific merchant lock based on their ID or descriptor. Each
# merchant object allows transaction rules to work at a granular level and
# requires at least one of merchant_id or descriptor.
#
# @param comment [String] A comment or explanation about the merchant, used internally for rule management
#
# @param descriptor [String] Short description of the merchant, often used to provide more human-readable con
#
# @param merchant_id [String] Unique alphanumeric identifier for the payment card acceptor (merchant). This at
end
end
end
end
end
Loading