44from typing_extensions import Literal , TypeAlias
55
66from ..._models import BaseModel
7- from ..shared .velocity_limit_params import VelocityLimitParams
8-
9- __all__ = [
10- "V2ApplyResponse" ,
11- "CurrentVersion" ,
12- "CurrentVersionParameters" ,
13- "CurrentVersionParametersConditionalBlockParameters" ,
14- "CurrentVersionParametersConditionalBlockParametersCondition" ,
15- "DraftVersion" ,
16- "DraftVersionParameters" ,
17- "DraftVersionParametersConditionalBlockParameters" ,
18- "DraftVersionParametersConditionalBlockParametersCondition" ,
19- ]
20-
21-
22- class CurrentVersionParametersConditionalBlockParametersCondition (BaseModel ):
23- attribute : Optional [
24- Literal [
25- "MCC" ,
26- "COUNTRY" ,
27- "CURRENCY" ,
28- "MERCHANT_ID" ,
29- "DESCRIPTOR" ,
30- "LIABILITY_SHIFT" ,
31- "PAN_ENTRY_MODE" ,
32- "TRANSACTION_AMOUNT" ,
33- "RISK_SCORE" ,
34- "CARD_TRANSACTION_COUNT_1H" ,
35- "CARD_TRANSACTION_COUNT_24H" ,
36- ]
37- ] = None
38- """The attribute to target.
39-
40- The following attributes may be targeted:
41-
42- - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
43- business by the types of goods or services it provides.
44- - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
45- ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
46- Netherlands Antilles.
47- - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of the
48- transaction.
49- - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
50- (merchant).
51- - `DESCRIPTOR`: Short description of card acceptor.
52- - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
53- applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
54- `TOKEN_AUTHENTICATED`.
55- - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
56- (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
57- `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
58- `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
59- `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
60- - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
61- fee field in the settlement/cardholder billing currency. This is the amount
62- the issuer should authorize against unless the issuer is paying the acquirer
63- fee on behalf of the cardholder.
64- - `RISK_SCORE`: Network-provided score assessing risk level associated with a
65- given authorization. Scores are on a range of 0-999, with 0 representing the
66- lowest risk and 999 representing the highest risk. For Visa transactions,
67- where the raw score has a range of 0-99, Lithic will normalize the score by
68- multiplying the raw score by 10x.
69- - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
70- trailing hour up and until the authorization.
71- - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
72- trailing 24 hours up and until the authorization.
73- """
74-
75- operation : Optional [
76- Literal ["IS_ONE_OF" , "IS_NOT_ONE_OF" , "MATCHES" , "DOES_NOT_MATCH" , "IS_GREATER_THAN" , "IS_LESS_THAN" ]
77- ] = None
78- """The operation to apply to the attribute"""
79-
80- value : Union [str , int , List [str ], None ] = None
81- """A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
7+ from .velocity_limit_params import VelocityLimitParams
8+ from .conditional_block_parameters import ConditionalBlockParameters
829
10+ __all__ = ["V2ApplyResponse" , "CurrentVersion" , "CurrentVersionParameters" , "DraftVersion" , "DraftVersionParameters" ]
8311
84- class CurrentVersionParametersConditionalBlockParameters (BaseModel ):
85- conditions : List [CurrentVersionParametersConditionalBlockParametersCondition ]
86-
87-
88- CurrentVersionParameters : TypeAlias = Union [CurrentVersionParametersConditionalBlockParameters , VelocityLimitParams ]
12+ CurrentVersionParameters : TypeAlias = Union [ConditionalBlockParameters , VelocityLimitParams ]
8913
9014
9115class CurrentVersion (BaseModel ):
@@ -99,73 +23,7 @@ class CurrentVersion(BaseModel):
9923 """
10024
10125
102- class DraftVersionParametersConditionalBlockParametersCondition (BaseModel ):
103- attribute : Optional [
104- Literal [
105- "MCC" ,
106- "COUNTRY" ,
107- "CURRENCY" ,
108- "MERCHANT_ID" ,
109- "DESCRIPTOR" ,
110- "LIABILITY_SHIFT" ,
111- "PAN_ENTRY_MODE" ,
112- "TRANSACTION_AMOUNT" ,
113- "RISK_SCORE" ,
114- "CARD_TRANSACTION_COUNT_1H" ,
115- "CARD_TRANSACTION_COUNT_24H" ,
116- ]
117- ] = None
118- """The attribute to target.
119-
120- The following attributes may be targeted:
121-
122- - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a
123- business by the types of goods or services it provides.
124- - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all
125- ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
126- Netherlands Antilles.
127- - `CURRENCY`: 3-digit alphabetic ISO 4217 code for the merchant currency of the
128- transaction.
129- - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor
130- (merchant).
131- - `DESCRIPTOR`: Short description of card acceptor.
132- - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer
133- applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
134- `TOKEN_AUTHENTICATED`.
135- - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number
136- (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
137- `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
138- `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
139- `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
140- - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer
141- fee field in the settlement/cardholder billing currency. This is the amount
142- the issuer should authorize against unless the issuer is paying the acquirer
143- fee on behalf of the cardholder.
144- - `RISK_SCORE`: Network-provided score assessing risk level associated with a
145- given authorization. Scores are on a range of 0-999, with 0 representing the
146- lowest risk and 999 representing the highest risk. For Visa transactions,
147- where the raw score has a range of 0-99, Lithic will normalize the score by
148- multiplying the raw score by 10x.
149- - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
150- trailing hour up and until the authorization.
151- - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
152- trailing 24 hours up and until the authorization.
153- """
154-
155- operation : Optional [
156- Literal ["IS_ONE_OF" , "IS_NOT_ONE_OF" , "MATCHES" , "DOES_NOT_MATCH" , "IS_GREATER_THAN" , "IS_LESS_THAN" ]
157- ] = None
158- """The operation to apply to the attribute"""
159-
160- value : Union [str , int , List [str ], None ] = None
161- """A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
162-
163-
164- class DraftVersionParametersConditionalBlockParameters (BaseModel ):
165- conditions : List [DraftVersionParametersConditionalBlockParametersCondition ]
166-
167-
168- DraftVersionParameters : TypeAlias = Union [DraftVersionParametersConditionalBlockParameters , VelocityLimitParams ]
26+ DraftVersionParameters : TypeAlias = Union [ConditionalBlockParameters , VelocityLimitParams ]
16927
17028
17129class DraftVersion (BaseModel ):
0 commit comments