Skip to content

Commit 6dcfc0d

Browse files
feat(api): add models for merchant_lock_parameters and conditional_3ds_action_parameters
1 parent 0a93a7f commit 6dcfc0d

16 files changed

+257
-1714
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 164
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

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ Types:
8181
from lithic.types.auth_rules import (
8282
AuthRule,
8383
AuthRuleCondition,
84+
Conditional3DSActionParameters,
8485
ConditionalAttribute,
8586
ConditionalBlockParameters,
87+
MerchantLockParameters,
8688
RuleStats,
8789
VelocityLimitParams,
8890
VelocityLimitParamsPeriodWindow,

src/lithic/types/auth_rules/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@
1919
from .v2_retrieve_response import V2RetrieveResponse as V2RetrieveResponse
2020
from .conditional_attribute import ConditionalAttribute as ConditionalAttribute
2121
from .velocity_limit_params import VelocityLimitParams as VelocityLimitParams
22+
from .merchant_lock_parameters import MerchantLockParameters as MerchantLockParameters
2223
from .auth_rule_condition_param import AuthRuleConditionParam as AuthRuleConditionParam
2324
from .v2_retrieve_report_params import V2RetrieveReportParams as V2RetrieveReportParams
2425
from .v2_retrieve_report_response import V2RetrieveReportResponse as V2RetrieveReportResponse
2526
from .velocity_limit_params_param import VelocityLimitParamsParam as VelocityLimitParamsParam
2627
from .conditional_block_parameters import ConditionalBlockParameters as ConditionalBlockParameters
28+
from .merchant_lock_parameters_param import MerchantLockParametersParam as MerchantLockParametersParam
29+
from .conditional_3ds_action_parameters import Conditional3DSActionParameters as Conditional3DSActionParameters
2730
from .conditional_block_parameters_param import ConditionalBlockParametersParam as ConditionalBlockParametersParam
2831
from .velocity_limit_params_period_window import VelocityLimitParamsPeriodWindow as VelocityLimitParamsPeriodWindow
32+
from .conditional_3ds_action_parameters_param import (
33+
Conditional3DSActionParametersParam as Conditional3DSActionParametersParam,
34+
)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Union, Optional
4+
from typing_extensions import Literal
5+
6+
from ..._models import BaseModel
7+
8+
__all__ = ["Conditional3DSActionParameters", "Condition"]
9+
10+
11+
class Condition(BaseModel):
12+
attribute: Optional[
13+
Literal[
14+
"MCC",
15+
"COUNTRY",
16+
"CURRENCY",
17+
"MERCHANT_ID",
18+
"DESCRIPTOR",
19+
"TRANSACTION_AMOUNT",
20+
"RISK_SCORE",
21+
"MESSAGE_CATEGORY",
22+
]
23+
] = None
24+
"""The attribute to target.
25+
26+
The following attributes may be targeted:
27+
28+
- `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
29+
business by the types of goods or services it provides.
30+
- `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
31+
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
32+
Netherlands Antilles.
33+
- `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
34+
the transaction.
35+
- `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
36+
(merchant).
37+
- `DESCRIPTOR`: Short description of card acceptor.
38+
- `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
39+
fee field in the settlement/cardholder billing currency. This is the amount
40+
the issuer should authorize against unless the issuer is paying the acquirer
41+
fee on behalf of the cardholder.
42+
- `RISK_SCORE`: Network-provided score assessing risk level associated with a
43+
given authentication. Scores are on a range of 0-999, with 0 representing the
44+
lowest risk and 999 representing the highest risk. For Visa transactions,
45+
where the raw score has a range of 0-99, Lithic will normalize the score by
46+
multiplying the raw score by 10x.
47+
- `MESSAGE_CATEGORY`: The category of the authentication being processed.
48+
"""
49+
50+
operation: Optional[
51+
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
52+
] = None
53+
"""The operation to apply to the attribute"""
54+
55+
value: Union[str, int, List[str], None] = None
56+
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
57+
58+
59+
class Conditional3DSActionParameters(BaseModel):
60+
action: Literal["DECLINE", "CHALLENGE"]
61+
"""The action to take if the conditions are met."""
62+
63+
conditions: List[Condition]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import List, Union, Iterable
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
__all__ = ["Conditional3DSActionParametersParam", "Condition"]
9+
10+
11+
class Condition(TypedDict, total=False):
12+
attribute: Literal[
13+
"MCC",
14+
"COUNTRY",
15+
"CURRENCY",
16+
"MERCHANT_ID",
17+
"DESCRIPTOR",
18+
"TRANSACTION_AMOUNT",
19+
"RISK_SCORE",
20+
"MESSAGE_CATEGORY",
21+
]
22+
"""The attribute to target.
23+
24+
The following attributes may be targeted:
25+
26+
- `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
27+
business by the types of goods or services it provides.
28+
- `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
29+
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
30+
Netherlands Antilles.
31+
- `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of
32+
the transaction.
33+
- `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
34+
(merchant).
35+
- `DESCRIPTOR`: Short description of card acceptor.
36+
- `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
37+
fee field in the settlement/cardholder billing currency. This is the amount
38+
the issuer should authorize against unless the issuer is paying the acquirer
39+
fee on behalf of the cardholder.
40+
- `RISK_SCORE`: Network-provided score assessing risk level associated with a
41+
given authentication. Scores are on a range of 0-999, with 0 representing the
42+
lowest risk and 999 representing the highest risk. For Visa transactions,
43+
where the raw score has a range of 0-99, Lithic will normalize the score by
44+
multiplying the raw score by 10x.
45+
- `MESSAGE_CATEGORY`: The category of the authentication being processed.
46+
"""
47+
48+
operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
49+
"""The operation to apply to the attribute"""
50+
51+
value: Union[str, int, List[str]]
52+
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
53+
54+
55+
class Conditional3DSActionParametersParam(TypedDict, total=False):
56+
action: Required[Literal["DECLINE", "CHALLENGE"]]
57+
"""The action to take if the conditions are met."""
58+
59+
conditions: Required[Iterable[Condition]]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Optional
4+
5+
from ..._models import BaseModel
6+
7+
__all__ = ["MerchantLockParameters", "Merchant"]
8+
9+
10+
class Merchant(BaseModel):
11+
comment: Optional[str] = None
12+
"""
13+
A comment or explanation about the merchant, used internally for rule management
14+
purposes.
15+
"""
16+
17+
descriptor: Optional[str] = None
18+
"""
19+
Short description of the merchant, often used to provide more human-readable
20+
context about the transaction merchant. This is typically the name or label
21+
shown on transaction summaries.
22+
"""
23+
24+
merchant_id: Optional[str] = None
25+
"""Unique alphanumeric identifier for the payment card acceptor (merchant).
26+
27+
This attribute specifies the merchant entity that will be locked or referenced
28+
for authorization rules.
29+
"""
30+
31+
32+
class MerchantLockParameters(BaseModel):
33+
merchants: List[Merchant]
34+
"""
35+
A list of merchant locks defining specific merchants or groups of merchants
36+
(based on descriptors or IDs) that the lock applies to.
37+
"""
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Iterable
6+
from typing_extensions import Required, TypedDict
7+
8+
__all__ = ["MerchantLockParametersParam", "Merchant"]
9+
10+
11+
class Merchant(TypedDict, total=False):
12+
comment: str
13+
"""
14+
A comment or explanation about the merchant, used internally for rule management
15+
purposes.
16+
"""
17+
18+
descriptor: str
19+
"""
20+
Short description of the merchant, often used to provide more human-readable
21+
context about the transaction merchant. This is typically the name or label
22+
shown on transaction summaries.
23+
"""
24+
25+
merchant_id: str
26+
"""Unique alphanumeric identifier for the payment card acceptor (merchant).
27+
28+
This attribute specifies the merchant entity that will be locked or referenced
29+
for authorization rules.
30+
"""
31+
32+
33+
class MerchantLockParametersParam(TypedDict, total=False):
34+
merchants: Required[Iterable[Merchant]]
35+
"""
36+
A list of merchant locks defining specific merchants or groups of merchants
37+
(based on descriptors or IDs) that the lock applies to.
38+
"""

0 commit comments

Comments
 (0)