Skip to content

Commit 246c60f

Browse files
feat(api): add models for merchant_lock_parameters and conditional_3ds_action_parameters
1 parent bd10a35 commit 246c60f

37 files changed

Lines changed: 1168 additions & 15107 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 165
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-80f2056989855259782c8e23b9b95530b708b87669d2ba82594ecfee843b4db3.yml
33
openapi_spec_hash: 160aa2f0e95a7be3ad9d68390ae9aa7c
4-
config_hash: 1a83dceb58f6f525b19a5775018db7e8
4+
config_hash: a5d12cd64a37624cbe350cd7b2380693

lib/lithic.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@
8383
require_relative "lithic/models/api_status"
8484
require_relative "lithic/models/auth_rules/auth_rule"
8585
require_relative "lithic/models/auth_rules/auth_rule_condition"
86+
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
8687
require_relative "lithic/models/auth_rules/conditional_attribute"
8788
require_relative "lithic/models/auth_rules/conditional_block_parameters"
89+
require_relative "lithic/models/auth_rules/merchant_lock_parameters"
8890
require_relative "lithic/models/auth_rules/rule_stats"
8991
require_relative "lithic/models/auth_rules/v2/backtest_create_params"
9092
require_relative "lithic/models/auth_rules/v2/backtest_create_response"
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
class Conditional3DSActionParameters < Lithic::Internal::Type::BaseModel
7+
# @!attribute action
8+
# The action to take if the conditions are met.
9+
#
10+
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Action]
11+
required :action, enum: -> { Lithic::AuthRules::Conditional3DSActionParameters::Action }
12+
13+
# @!attribute conditions
14+
#
15+
# @return [Array<Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition>]
16+
required :conditions,
17+
-> {
18+
Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::Conditional3DSActionParameters::Condition]
19+
}
20+
21+
# @!method initialize(action:, conditions:)
22+
# @param action [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Action] The action to take if the conditions are met.
23+
#
24+
# @param conditions [Array<Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition>]
25+
26+
# The action to take if the conditions are met.
27+
#
28+
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters#action
29+
module Action
30+
extend Lithic::Internal::Type::Enum
31+
32+
DECLINE = :DECLINE
33+
CHALLENGE = :CHALLENGE
34+
35+
# @!method self.values
36+
# @return [Array<Symbol>]
37+
end
38+
39+
class Condition < Lithic::Internal::Type::BaseModel
40+
# @!attribute attribute
41+
# The attribute to target.
42+
#
43+
# The following attributes may be targeted:
44+
#
45+
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
46+
# business by the types of goods or services it provides.
47+
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
48+
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
49+
# Netherlands Antilles.
50+
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
51+
# the transaction.
52+
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
53+
# (merchant).
54+
# - `DESCRIPTOR`: Short description of card acceptor.
55+
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
56+
# fee field in the settlement/cardholder billing currency. This is the amount
57+
# the issuer should authorize against unless the issuer is paying the acquirer
58+
# fee on behalf of the cardholder.
59+
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
60+
# given authentication. Scores are on a range of 0-999, with 0 representing the
61+
# lowest risk and 999 representing the highest risk. For Visa transactions,
62+
# where the raw score has a range of 0-99, Lithic will normalize the score by
63+
# multiplying the raw score by 10x.
64+
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
65+
#
66+
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Attribute, nil]
67+
optional :attribute,
68+
enum: -> {
69+
Lithic::AuthRules::Conditional3DSActionParameters::Condition::Attribute
70+
}
71+
72+
# @!attribute operation
73+
# The operation to apply to the attribute
74+
#
75+
# @return [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Operation, nil]
76+
optional :operation,
77+
enum: -> {
78+
Lithic::AuthRules::Conditional3DSActionParameters::Condition::Operation
79+
}
80+
81+
# @!attribute value
82+
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
83+
#
84+
# @return [String, Integer, Array<String>, nil]
85+
optional :value, union: -> { Lithic::AuthRules::Conditional3DSActionParameters::Condition::Value }
86+
87+
# @!method initialize(attribute: nil, operation: nil, value: nil)
88+
# Some parameter documentations has been truncated, see
89+
# {Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition} for more
90+
# details.
91+
#
92+
# @param attribute [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Attribute] The attribute to target.
93+
#
94+
# @param operation [Symbol, Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Operation] The operation to apply to the attribute
95+
#
96+
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
97+
98+
# The attribute to target.
99+
#
100+
# The following attributes may be targeted:
101+
#
102+
# - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
103+
# business by the types of goods or services it provides.
104+
# - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
105+
# ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
106+
# Netherlands Antilles.
107+
# - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
108+
# the transaction.
109+
# - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
110+
# (merchant).
111+
# - `DESCRIPTOR`: Short description of card acceptor.
112+
# - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
113+
# fee field in the settlement/cardholder billing currency. This is the amount
114+
# the issuer should authorize against unless the issuer is paying the acquirer
115+
# fee on behalf of the cardholder.
116+
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
117+
# given authentication. Scores are on a range of 0-999, with 0 representing the
118+
# lowest risk and 999 representing the highest risk. For Visa transactions,
119+
# where the raw score has a range of 0-99, Lithic will normalize the score by
120+
# multiplying the raw score by 10x.
121+
# - `MESSAGE_CATEGORY`: The category of the authentication being processed.
122+
#
123+
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#attribute
124+
module Attribute
125+
extend Lithic::Internal::Type::Enum
126+
127+
MCC = :MCC
128+
COUNTRY = :COUNTRY
129+
CURRENCY = :CURRENCY
130+
MERCHANT_ID = :MERCHANT_ID
131+
DESCRIPTOR = :DESCRIPTOR
132+
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
133+
RISK_SCORE = :RISK_SCORE
134+
MESSAGE_CATEGORY = :MESSAGE_CATEGORY
135+
136+
# @!method self.values
137+
# @return [Array<Symbol>]
138+
end
139+
140+
# The operation to apply to the attribute
141+
#
142+
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#operation
143+
module Operation
144+
extend Lithic::Internal::Type::Enum
145+
146+
IS_ONE_OF = :IS_ONE_OF
147+
IS_NOT_ONE_OF = :IS_NOT_ONE_OF
148+
MATCHES = :MATCHES
149+
DOES_NOT_MATCH = :DOES_NOT_MATCH
150+
IS_GREATER_THAN = :IS_GREATER_THAN
151+
IS_LESS_THAN = :IS_LESS_THAN
152+
153+
# @!method self.values
154+
# @return [Array<Symbol>]
155+
end
156+
157+
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
158+
#
159+
# @see Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition#value
160+
module Value
161+
extend Lithic::Internal::Type::Union
162+
163+
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
164+
variant String
165+
166+
# A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN`
167+
variant Integer
168+
169+
# An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
170+
variant -> { Lithic::Models::AuthRules::Conditional3DSActionParameters::Condition::Value::StringArray }
171+
172+
# @!method self.variants
173+
# @return [Array(String, Integer, Array<String>)]
174+
175+
# @type [Lithic::Internal::Type::Converter]
176+
StringArray = Lithic::Internal::Type::ArrayOf[String]
177+
end
178+
end
179+
end
180+
end
181+
end
182+
end
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
class MerchantLockParameters < Lithic::Internal::Type::BaseModel
7+
# @!attribute merchants
8+
# A list of merchant locks defining specific merchants or groups of merchants
9+
# (based on descriptors or IDs) that the lock applies to.
10+
#
11+
# @return [Array<Lithic::Models::AuthRules::MerchantLockParameters::Merchant>]
12+
required :merchants,
13+
-> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::MerchantLockParameters::Merchant] }
14+
15+
# @!method initialize(merchants:)
16+
# Some parameter documentations has been truncated, see
17+
# {Lithic::Models::AuthRules::MerchantLockParameters} for more details.
18+
#
19+
# @param merchants [Array<Lithic::Models::AuthRules::MerchantLockParameters::Merchant>] A list of merchant locks defining specific merchants or groups of merchants (bas
20+
21+
class Merchant < Lithic::Internal::Type::BaseModel
22+
# @!attribute comment
23+
# A comment or explanation about the merchant, used internally for rule management
24+
# purposes.
25+
#
26+
# @return [String, nil]
27+
optional :comment, String
28+
29+
# @!attribute descriptor
30+
# Short description of the merchant, often used to provide more human-readable
31+
# context about the transaction merchant. This is typically the name or label
32+
# shown on transaction summaries.
33+
#
34+
# @return [String, nil]
35+
optional :descriptor, String
36+
37+
# @!attribute merchant_id
38+
# Unique alphanumeric identifier for the payment card acceptor (merchant). This
39+
# attribute specifies the merchant entity that will be locked or referenced for
40+
# authorization rules.
41+
#
42+
# @return [String, nil]
43+
optional :merchant_id, String
44+
45+
# @!method initialize(comment: nil, descriptor: nil, merchant_id: nil)
46+
# Some parameter documentations has been truncated, see
47+
# {Lithic::Models::AuthRules::MerchantLockParameters::Merchant} for more details.
48+
#
49+
# Represents a specific merchant lock based on their ID or descriptor. Each
50+
# merchant object allows transaction rules to work at a granular level and
51+
# requires at least one of merchant_id or descriptor.
52+
#
53+
# @param comment [String] A comment or explanation about the merchant, used internally for rule management
54+
#
55+
# @param descriptor [String] Short description of the merchant, often used to provide more human-readable con
56+
#
57+
# @param merchant_id [String] Unique alphanumeric identifier for the payment card acceptor (merchant). This at
58+
end
59+
end
60+
end
61+
end
62+
end

0 commit comments

Comments
 (0)