-
Notifications
You must be signed in to change notification settings - Fork 4
/
v2_retrieve_response.py
128 lines (94 loc) · 3.73 KB
/
v2_retrieve_response.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, TypeAlias
from ..._models import BaseModel
from ..shared.velocity_limit_params import VelocityLimitParams
__all__ = [
"V2RetrieveResponse",
"CurrentVersion",
"CurrentVersionParameters",
"CurrentVersionParametersConditionalBlockParameters",
"CurrentVersionParametersConditionalBlockParametersCondition",
"DraftVersion",
"DraftVersionParameters",
"DraftVersionParametersConditionalBlockParameters",
"DraftVersionParametersConditionalBlockParametersCondition",
]
class CurrentVersionParametersConditionalBlockParametersCondition(BaseModel):
attribute: Optional[
Literal[
"MCC",
"COUNTRY",
"CURRENCY",
"MERCHANT_ID",
"DESCRIPTOR",
"LIABILITY_SHIFT",
"PAN_ENTRY_MODE",
"TRANSACTION_AMOUNT",
"RISK_SCORE",
]
] = None
"""The attribute to target"""
operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
] = None
"""The operation to apply to the attribute"""
value: Union[str, float, List[str], None] = None
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
class CurrentVersionParametersConditionalBlockParameters(BaseModel):
conditions: List[CurrentVersionParametersConditionalBlockParametersCondition]
CurrentVersionParameters: TypeAlias = Union[CurrentVersionParametersConditionalBlockParameters, VelocityLimitParams]
class CurrentVersion(BaseModel):
parameters: CurrentVersionParameters
"""Parameters for the current version of the Auth Rule"""
version: int
"""
The version of the rule, this is incremented whenever the rule's parameters
change.
"""
class DraftVersionParametersConditionalBlockParametersCondition(BaseModel):
attribute: Optional[
Literal[
"MCC",
"COUNTRY",
"CURRENCY",
"MERCHANT_ID",
"DESCRIPTOR",
"LIABILITY_SHIFT",
"PAN_ENTRY_MODE",
"TRANSACTION_AMOUNT",
"RISK_SCORE",
]
] = None
"""The attribute to target"""
operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
] = None
"""The operation to apply to the attribute"""
value: Union[str, float, List[str], None] = None
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""
class DraftVersionParametersConditionalBlockParameters(BaseModel):
conditions: List[DraftVersionParametersConditionalBlockParametersCondition]
DraftVersionParameters: TypeAlias = Union[DraftVersionParametersConditionalBlockParameters, VelocityLimitParams]
class DraftVersion(BaseModel):
parameters: DraftVersionParameters
"""Parameters for the current version of the Auth Rule"""
version: int
"""
The version of the rule, this is incremented whenever the rule's parameters
change.
"""
class V2RetrieveResponse(BaseModel):
token: str
account_tokens: List[str]
"""Account tokens to which the Auth Rule applies."""
card_tokens: List[str]
"""Card tokens to which the Auth Rule applies."""
current_version: Optional[CurrentVersion] = None
draft_version: Optional[DraftVersion] = None
program_level: bool
"""Whether the Auth Rule applies to all authorizations on the card program."""
state: Literal["ACTIVE", "INACTIVE"]
"""The state of the Auth Rule"""
type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT"]
"""The type of Auth Rule"""