Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions src/increase/types/card_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"CardPayment",
"Element",
"ElementCardAuthorization",
"ElementCardAuthorizationCardholderAddress",
"ElementCardAuthorizationNetworkDetails",
"ElementCardAuthorizationNetworkDetailsVisa",
"ElementCardAuthorizationExpiration",
"ElementCardDecline",
"ElementCardDeclineCardholderAddress",
"ElementCardDeclineNetworkDetails",
"ElementCardDeclineNetworkDetailsVisa",
"ElementCardIncrement",
Expand All @@ -35,12 +37,51 @@
"ElementCardSettlementPurchaseDetailsTravelAncillaryService",
"ElementCardSettlementPurchaseDetailsTravelTripLeg",
"ElementCardValidation",
"ElementCardValidationCardholderAddress",
"ElementCardValidationNetworkDetails",
"ElementCardValidationNetworkDetailsVisa",
"State",
]


class ElementCardAuthorizationCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class ElementCardAuthorizationNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -148,6 +189,12 @@ class ElementCardAuthorization(BaseModel):
card_payment_id: Optional[str]
"""The ID of the Card Payment this transaction belongs to."""

cardholder_address: ElementCardAuthorizationCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
"""
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
Expand Down Expand Up @@ -269,6 +316,44 @@ class ElementCardAuthorizationExpiration(BaseModel):
"""


class ElementCardDeclineCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class ElementCardDeclineNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -376,6 +461,12 @@ class ElementCardDecline(BaseModel):
card_payment_id: Optional[str]
"""The ID of the Card Payment this transaction belongs to."""

cardholder_address: ElementCardDeclineCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
"""
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
Expand Down Expand Up @@ -1529,6 +1620,44 @@ class ElementCardSettlement(BaseModel):
"""


class ElementCardValidationCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class ElementCardValidationNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -1630,6 +1759,12 @@ class ElementCardValidation(BaseModel):
card_payment_id: Optional[str]
"""The ID of the Card Payment this transaction belongs to."""

cardholder_address: ElementCardValidationCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
"""
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
Expand Down
45 changes: 45 additions & 0 deletions src/increase/types/declined_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"Source",
"SourceACHDecline",
"SourceCardDecline",
"SourceCardDeclineCardholderAddress",
"SourceCardDeclineNetworkDetails",
"SourceCardDeclineNetworkDetailsVisa",
"SourceCheckDecline",
Expand Down Expand Up @@ -99,6 +100,44 @@ class SourceACHDecline(BaseModel):
"""


class SourceCardDeclineCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class SourceCardDeclineNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -206,6 +245,12 @@ class SourceCardDecline(BaseModel):
card_payment_id: Optional[str]
"""The ID of the Card Payment this transaction belongs to."""

cardholder_address: SourceCardDeclineCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
"""
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
Expand Down
45 changes: 45 additions & 0 deletions src/increase/types/pending_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"SourceAccountTransferInstruction",
"SourceACHTransferInstruction",
"SourceCardAuthorization",
"SourceCardAuthorizationCardholderAddress",
"SourceCardAuthorizationNetworkDetails",
"SourceCardAuthorizationNetworkDetailsVisa",
"SourceCheckDepositInstruction",
Expand Down Expand Up @@ -57,6 +58,44 @@ class SourceACHTransferInstruction(BaseModel):
"""The identifier of the ACH Transfer that led to this Pending Transaction."""


class SourceCardAuthorizationCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class SourceCardAuthorizationNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -164,6 +203,12 @@ class SourceCardAuthorization(BaseModel):
card_payment_id: Optional[str]
"""The ID of the Card Payment this transaction belongs to."""

cardholder_address: SourceCardAuthorizationCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
"""
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
Expand Down
45 changes: 45 additions & 0 deletions src/increase/types/real_time_decision.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
__all__ = [
"RealTimeDecision",
"CardAuthorization",
"CardAuthorizationCardholderAddress",
"CardAuthorizationNetworkDetails",
"CardAuthorizationNetworkDetailsVisa",
"CardAuthorizationRequestDetails",
Expand All @@ -18,6 +19,44 @@
]


class CardAuthorizationCardholderAddress(BaseModel):
actual_line1: Optional[str]
"""Line 1 of the address on file for the cardholder."""

actual_postal_code: Optional[str]
"""The postal code of the address on file for the cardholder."""

provided_line1: Optional[str]
"""
The cardholder address line 1 provided for verification in the authorization
request.
"""

provided_postal_code: Optional[str]
"""The postal code provided for verification in the authorization request."""

verification_result: Literal[
"not_checked",
"postal_code_match_address_not_checked",
"postal_code_match_address_no_match",
"postal_code_no_match_address_match",
"match",
"no_match",
]
"""The address verification result returned to the card network.

- `not_checked` - No adress was provided in the authorization request.
- `postal_code_match_address_not_checked` - Postal code matches, but the street
address was not verified
- `postal_code_match_address_no_match` - Postal code matches, but the street
address does not match
- `postal_code_no_match_address_match` - Postal code does not match, but the
street address matches
- `match` - Postal code and street address match
- `no_match` - Postal code and street address do not match
"""


class CardAuthorizationNetworkDetailsVisa(BaseModel):
electronic_commerce_indicator: Optional[
Literal[
Expand Down Expand Up @@ -148,6 +187,12 @@ class CardAuthorization(BaseModel):
card_id: str
"""The identifier of the Card that is being authorized."""

cardholder_address: CardAuthorizationCardholderAddress
"""
Cardholder address provided in the authorization request and the address on file
we verified it against.
"""

decision: Optional[Literal["approve", "decline"]]
"""Whether or not the authorization was approved.

Expand Down
Loading