Skip to content

Commit

Permalink
feat(api): updates (#610)
Browse files Browse the repository at this point in the history
- Improves documentation for `amount` properties on Transactions
- Improve documentation for `attribute` target for AuthRules v2
  • Loading branch information
stainless-app[bot] committed Oct 28, 2024
1 parent 72a96dc commit 074a4c7
Show file tree
Hide file tree
Showing 12 changed files with 638 additions and 58 deletions.
24 changes: 16 additions & 8 deletions src/lithic/resources/transactions/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Transaction:
"""
Get specific card transaction.
"""Get a specific card transaction.
All amounts are in the smallest unit of their
respective currency (e.g., cents for USD).
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -137,8 +139,10 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[Transaction]:
"""
List card transactions.
"""List card transactions.
All amounts are in the smallest unit of their respective
currency (e.g., cents for USD) and inclusive of any acquirer fees.
Args:
account_token: Filters for transactions associated with a specific account.
Expand Down Expand Up @@ -650,8 +654,10 @@ async def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Transaction:
"""
Get specific card transaction.
"""Get a specific card transaction.
All amounts are in the smallest unit of their
respective currency (e.g., cents for USD).
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -690,8 +696,10 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[Transaction, AsyncCursorPage[Transaction]]:
"""
List card transactions.
"""List card transactions.
All amounts are in the smallest unit of their respective
currency (e.g., cents for USD) and inclusive of any acquirer fees.
Args:
account_token: Filters for transactions associated with a specific account.
Expand Down
62 changes: 60 additions & 2 deletions src/lithic/types/auth_rule_migrate_v1_to_v2_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,36 @@ class AuthRuleMigrateV1ToV2ResponseItemCurrentVersionParametersConditionalBlockP
"RISK_SCORE",
]
] = None
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
Expand Down Expand Up @@ -79,7 +108,36 @@ class AuthRuleMigrateV1ToV2ResponseItemDraftVersionParametersConditionalBlockPar
"RISK_SCORE",
]
] = None
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
Expand Down
62 changes: 60 additions & 2 deletions src/lithic/types/auth_rules/v2_apply_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,36 @@ class CurrentVersionParametersConditionalBlockParametersCondition(BaseModel):
"RISK_SCORE",
]
] = None
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
Expand Down Expand Up @@ -76,7 +105,36 @@ class DraftVersionParametersConditionalBlockParametersCondition(BaseModel):
"RISK_SCORE",
]
] = None
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Optional[
Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
Expand Down
93 changes: 90 additions & 3 deletions src/lithic/types/auth_rules/v2_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,36 @@ class CreateAuthRuleRequestAccountTokensParametersConditionalBlockParametersCond
"TRANSACTION_AMOUNT",
"RISK_SCORE",
]
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
"""The operation to apply to the attribute"""
Expand Down Expand Up @@ -88,7 +117,36 @@ class CreateAuthRuleRequestCardTokensParametersConditionalBlockParametersConditi
"TRANSACTION_AMOUNT",
"RISK_SCORE",
]
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
"""The operation to apply to the attribute"""
Expand Down Expand Up @@ -129,7 +187,36 @@ class CreateAuthRuleRequestProgramLevelParametersConditionalBlockParametersCondi
"TRANSACTION_AMOUNT",
"RISK_SCORE",
]
"""The attribute to target"""
"""The attribute to target
- `MCC` - A four-digit number listed in ISO 18245. An MCC is used to classify a
business by the types of goods or services it provides.
- `COUNTRY` - Country of entity of card acceptor. Possible values are: (1) all
ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for
Netherlands Antilles.
- `CURRENCY` - 3-digit alphabetic ISO 4217 code for the merchant currency of the
transaction.
- `MERCHANT_ID` - Unique alphanumeric identifier for the payment card acceptor
(merchant).
- `DESCRIPTOR` - Short description of card acceptor.
- `LIABILITY_SHIFT` - Indicates whether chargeback liability shift to the issuer
applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or
`TOKEN_AUTHENTICATED`.
- `PAN_ENTRY_MODE` - The method by which the cardholder's primary account number
(PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`,
`ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`,
`MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`,
`UNKNOWN`, `CREDENTIAL_ON_FILE`, or `ECOMMERCE`.
- `TRANSACTION_AMOUNT` - The base transaction amount (in cents) plus the
acquirer fee field in the settlement/cardholder billing currency. This is the
amount the issuer should authorize against unless the issuer is paying the
acquirer fee on behalf of the cardholder.
- `RISK_SCORE` - Network-provided score assessing risk level associated with a
given authorization. Scores are on a range of 0-999, with 0 representing the
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
"""

operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
"""The operation to apply to the attribute"""
Expand Down
Loading

0 comments on commit 074a4c7

Please sign in to comment.