|
| 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 Union, Iterable |
| 6 | +from typing_extensions import Literal, Required, TypedDict |
| 7 | + |
| 8 | +from ..._types import SequenceNotStr |
| 9 | + |
| 10 | +__all__ = ["ConditionalAuthorizationActionParametersParam", "Condition"] |
| 11 | + |
| 12 | + |
| 13 | +class Condition(TypedDict, total=False): |
| 14 | + attribute: Literal[ |
| 15 | + "MCC", |
| 16 | + "COUNTRY", |
| 17 | + "CURRENCY", |
| 18 | + "MERCHANT_ID", |
| 19 | + "DESCRIPTOR", |
| 20 | + "LIABILITY_SHIFT", |
| 21 | + "PAN_ENTRY_MODE", |
| 22 | + "TRANSACTION_AMOUNT", |
| 23 | + "CASH_AMOUNT", |
| 24 | + "RISK_SCORE", |
| 25 | + "CARD_TRANSACTION_COUNT_15M", |
| 26 | + "CARD_TRANSACTION_COUNT_1H", |
| 27 | + "CARD_TRANSACTION_COUNT_24H", |
| 28 | + "CARD_STATE", |
| 29 | + "PIN_ENTERED", |
| 30 | + "PIN_STATUS", |
| 31 | + "WALLET_TYPE", |
| 32 | + "TRANSACTION_INITIATOR", |
| 33 | + "ADDRESS_MATCH", |
| 34 | + ] |
| 35 | + """The attribute to target. |
| 36 | +
|
| 37 | + The following attributes may be targeted: |
| 38 | +
|
| 39 | + - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a |
| 40 | + business by the types of goods or services it provides. |
| 41 | + - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all |
| 42 | + ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for |
| 43 | + Netherlands Antilles. |
| 44 | + - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of |
| 45 | + the transaction. |
| 46 | + - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor |
| 47 | + (merchant). |
| 48 | + - `DESCRIPTOR`: Short description of card acceptor. |
| 49 | + - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer |
| 50 | + applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or |
| 51 | + `TOKEN_AUTHENTICATED`. |
| 52 | + - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number |
| 53 | + (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, |
| 54 | + `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, |
| 55 | + `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, |
| 56 | + `UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`. |
| 57 | + - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer |
| 58 | + fee field in the settlement/cardholder billing currency. This is the amount |
| 59 | + the issuer should authorize against unless the issuer is paying the acquirer |
| 60 | + fee on behalf of the cardholder. |
| 61 | + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This |
| 62 | + represents the amount of cash being withdrawn or advanced. |
| 63 | + - `RISK_SCORE`: Network-provided score assessing risk level associated with a |
| 64 | + given authorization. Scores are on a range of 0-999, with 0 representing the |
| 65 | + lowest risk and 999 representing the highest risk. For Visa transactions, |
| 66 | + where the raw score has a range of 0-99, Lithic will normalize the score by |
| 67 | + multiplying the raw score by 10x. |
| 68 | + - `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the |
| 69 | + trailing 15 minutes before the authorization. |
| 70 | + - `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the |
| 71 | + trailing hour up and until the authorization. |
| 72 | + - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the |
| 73 | + trailing 24 hours up and until the authorization. |
| 74 | + - `CARD_STATE`: The current state of the card associated with the transaction. |
| 75 | + Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, |
| 76 | + `PENDING_FULFILLMENT`. |
| 77 | + - `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. |
| 78 | + Valid values are `TRUE`, `FALSE`. |
| 79 | + - `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`, |
| 80 | + `OK`, `BLOCKED`. |
| 81 | + - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the |
| 82 | + source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, |
| 83 | + `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. |
| 84 | + - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates |
| 85 | + the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. |
| 86 | + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address |
| 87 | + data with the cardholder KYC data if it exists. Valid values are `MATCH`, |
| 88 | + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. |
| 89 | + """ |
| 90 | + |
| 91 | + operation: Literal[ |
| 92 | + "IS_ONE_OF", |
| 93 | + "IS_NOT_ONE_OF", |
| 94 | + "MATCHES", |
| 95 | + "DOES_NOT_MATCH", |
| 96 | + "IS_EQUAL_TO", |
| 97 | + "IS_NOT_EQUAL_TO", |
| 98 | + "IS_GREATER_THAN", |
| 99 | + "IS_GREATER_THAN_OR_EQUAL_TO", |
| 100 | + "IS_LESS_THAN", |
| 101 | + "IS_LESS_THAN_OR_EQUAL_TO", |
| 102 | + ] |
| 103 | + """The operation to apply to the attribute""" |
| 104 | + |
| 105 | + value: Union[str, int, SequenceNotStr[str]] |
| 106 | + """A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`""" |
| 107 | + |
| 108 | + |
| 109 | +class ConditionalAuthorizationActionParametersParam(TypedDict, total=False): |
| 110 | + action: Required[Literal["DECLINE", "CHALLENGE"]] |
| 111 | + """The action to take if the conditions are met.""" |
| 112 | + |
| 113 | + conditions: Required[Iterable[Condition]] |
0 commit comments