Skip to content
Open
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 254
openapi_spec_hash: b502688710d2e1e332c41ca7adc8aabf
openapi_spec_hash: 339463ca602a8d2afaaf82cc8570a142
config_hash: f0e1844d06c76a9e145f7986d993dda6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Error codes are as follows:
### Retries

Certain errors are automatically retried 2 times by default, with a short exponential backoff.
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout,
429 Rate Limit, and >=500 Internal errors are all retried by default.

You can use the `max_retries` option to configure or disable retry settings:
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions src/increase/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,6 @@ def _should_retry(self, response: httpx.Response) -> bool:
log.debug("Retrying due to status code %i", response.status_code)
return True

# Retry on lock timeouts.
if response.status_code == 409:
log.debug("Retrying due to status code %i", response.status_code)
return True

# Retry on rate limits.
if response.status_code == 429:
log.debug("Retrying due to status code %i", response.status_code)
Expand Down
12 changes: 10 additions & 2 deletions src/increase/resources/simulations/check_deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def adjustment(
check_deposit_id: str,
*,
amount: int | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"]
reason: Literal[
"late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid", "duplicate_entry"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -84,6 +86,8 @@ def adjustment(
usually happens for e.g., low quality images.
- `paid` - The check has already been deposited elsewhere and so this is a
duplicate.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.

extra_headers: Send extra headers

Expand Down Expand Up @@ -280,7 +284,9 @@ async def adjustment(
check_deposit_id: str,
*,
amount: int | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"]
reason: Literal[
"late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid", "duplicate_entry"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -316,6 +322,8 @@ async def adjustment(
usually happens for e.g., low quality images.
- `paid` - The check has already been deposited elsewhere and so this is a
duplicate.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.

extra_headers: Send extra headers

Expand Down
8 changes: 6 additions & 2 deletions src/increase/resources/simulations/inbound_check_deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def adjustment(
inbound_check_deposit_id: str,
*,
amount: int | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit"] | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit", "duplicate_entry"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -199,6 +199,8 @@ def adjustment(
institution has responded with a Late Return Claim.
- `wrong_payee_credit` - The check was deposited to the wrong payee and the
depositing institution has reimbursed the funds with a Wrong Payee Credit.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.

extra_headers: Send extra headers

Expand Down Expand Up @@ -384,7 +386,7 @@ async def adjustment(
inbound_check_deposit_id: str,
*,
amount: int | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit"] | Omit = omit,
reason: Literal["late_return", "wrong_payee_credit", "duplicate_entry"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -413,6 +415,8 @@ async def adjustment(
institution has responded with a Late Return Claim.
- `wrong_payee_credit` - The check was deposited to the wrong payee and the
depositing institution has reimbursed the funds with a Wrong Payee Credit.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.

extra_headers: Send extra headers

Expand Down
23 changes: 20 additions & 3 deletions src/increase/types/card_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ class ElementCardAuthenticationChallenge(BaseModel):

- `text_message` - The one-time code was sent via text message.
- `email` - The one-time code was sent via email.
- `none_available` - The one-time code was not successfully delivered.
- `none_available` - The one-time code could not be delivered because the card
has no phone number or email on file.
"""

verification_value: Optional[str] = None
Expand Down Expand Up @@ -5770,7 +5771,14 @@ class ElementCardRefundPurchaseDetails(BaseModel):
"""An identifier from the merchant for the purchase to the issuer and cardholder."""

purchase_identifier_format: Optional[
Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"]
Literal[
"free_text",
"order_number",
"rental_agreement_number",
"hotel_folio_number",
"invoice_number",
"visa_recurrent_reference_identifier",
]
] = None
"""The format of the purchase identifier.

Expand All @@ -5779,6 +5787,7 @@ class ElementCardRefundPurchaseDetails(BaseModel):
- `rental_agreement_number` - Rental agreement number
- `hotel_folio_number` - Hotel folio number
- `invoice_number` - Invoice number
- `visa_recurrent_reference_identifier` - Visa Recurrent reference identifier
"""

travel: Optional[ElementCardRefundPurchaseDetailsTravel] = None
Expand Down Expand Up @@ -7171,7 +7180,14 @@ class ElementCardSettlementPurchaseDetails(BaseModel):
"""An identifier from the merchant for the purchase to the issuer and cardholder."""

purchase_identifier_format: Optional[
Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"]
Literal[
"free_text",
"order_number",
"rental_agreement_number",
"hotel_folio_number",
"invoice_number",
"visa_recurrent_reference_identifier",
]
] = None
"""The format of the purchase identifier.

Expand All @@ -7180,6 +7196,7 @@ class ElementCardSettlementPurchaseDetails(BaseModel):
- `rental_agreement_number` - Rental agreement number
- `hotel_folio_number` - Hotel folio number
- `invoice_number` - Invoice number
- `visa_recurrent_reference_identifier` - Visa Recurrent reference identifier
"""

travel: Optional[ElementCardSettlementPurchaseDetailsTravel] = None
Expand Down
4 changes: 3 additions & 1 deletion src/increase/types/check_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class DepositAdjustment(BaseModel):
amount: int
"""The amount of the adjustment."""

reason: Literal["wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"]
reason: Literal["wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid", "duplicate_entry"]
"""The reason for the adjustment.

- `wrong_payee_credit` - The check was deposited to the wrong payee and the
Expand All @@ -97,6 +97,8 @@ class DepositAdjustment(BaseModel):
usually happens for e.g., low quality images.
- `paid` - The check has already been deposited elsewhere and so this is a
duplicate.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.
"""

transaction_id: str
Expand Down
3 changes: 3 additions & 0 deletions src/increase/types/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Event(BaseModel):
"digital_card_profile.updated",
"digital_wallet_token.created",
"digital_wallet_token.updated",
"digital_wallet_token_request.created",
"entity.created",
"entity.updated",
"event_subscription.created",
Expand Down Expand Up @@ -212,6 +213,8 @@ class Event(BaseModel):
created.
- `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
updated.
- `digital_wallet_token_request.created` - Occurs whenever a Digital Wallet
Token Request is created.
- `entity.created` - Occurs whenever an Entity is created.
- `entity.updated` - Occurs whenever an Entity is updated.
- `event_subscription.created` - Occurs whenever an Event Subscription is
Expand Down
1 change: 1 addition & 0 deletions src/increase/types/event_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class EventListParams(TypedDict, total=False):
"digital_card_profile.updated",
"digital_wallet_token.created",
"digital_wallet_token.updated",
"digital_wallet_token_request.created",
"entity.created",
"entity.updated",
"event_subscription.created",
Expand Down
3 changes: 3 additions & 0 deletions src/increase/types/event_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SelectedEventCategory(BaseModel):
"digital_card_profile.updated",
"digital_wallet_token.created",
"digital_wallet_token.updated",
"digital_wallet_token_request.created",
"entity.created",
"entity.updated",
"event_subscription.created",
Expand Down Expand Up @@ -200,6 +201,8 @@ class SelectedEventCategory(BaseModel):
created.
- `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
updated.
- `digital_wallet_token_request.created` - Occurs whenever a Digital Wallet
Token Request is created.
- `entity.created` - Occurs whenever an Entity is created.
- `entity.updated` - Occurs whenever an Entity is updated.
- `event_subscription.created` - Occurs whenever an Event Subscription is
Expand Down
3 changes: 3 additions & 0 deletions src/increase/types/event_subscription_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class SelectedEventCategory(TypedDict, total=False):
"digital_card_profile.updated",
"digital_wallet_token.created",
"digital_wallet_token.updated",
"digital_wallet_token_request.created",
"entity.created",
"entity.updated",
"event_subscription.created",
Expand Down Expand Up @@ -229,6 +230,8 @@ class SelectedEventCategory(TypedDict, total=False):
created.
- `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
updated.
- `digital_wallet_token_request.created` - Occurs whenever a Digital Wallet
Token Request is created.
- `entity.created` - Occurs whenever an Entity is created.
- `entity.updated` - Occurs whenever an Entity is updated.
- `event_subscription.created` - Occurs whenever an Event Subscription is
Expand Down
4 changes: 3 additions & 1 deletion src/increase/types/inbound_check_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ class Adjustment(BaseModel):
A positive amount is a credit to your account and a negative amount is a debit.
"""

reason: Literal["late_return", "wrong_payee_credit"]
reason: Literal["late_return", "wrong_payee_credit", "duplicate_entry"]
"""The reason for the adjustment.

- `late_return` - The return was initiated too late and the receiving
institution has responded with a Late Return Claim.
- `wrong_payee_credit` - The check was deposited to the wrong payee and the
depositing institution has reimbursed the funds with a Wrong Payee Credit.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.
"""

transaction_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class CheckDepositAdjustmentParams(TypedDict, total=False):
Deposit amount.
"""

reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"]
reason: Literal[
"late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid", "duplicate_entry"
]
"""The reason for the adjustment.

- `late_return` - The return was initiated too late and the receiving
Expand All @@ -29,4 +31,6 @@ class CheckDepositAdjustmentParams(TypedDict, total=False):
usually happens for e.g., low quality images.
- `paid` - The check has already been deposited elsewhere and so this is a
duplicate.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ class InboundCheckDepositAdjustmentParams(TypedDict, total=False):
Defaults to the amount of the Inbound Check Deposit.
"""

reason: Literal["late_return", "wrong_payee_credit"]
reason: Literal["late_return", "wrong_payee_credit", "duplicate_entry"]
"""The reason for the adjustment. Defaults to `wrong_payee_credit`.

- `late_return` - The return was initiated too late and the receiving
institution has responded with a Late Return Claim.
- `wrong_payee_credit` - The check was deposited to the wrong payee and the
depositing institution has reimbursed the funds with a Wrong Payee Credit.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.
"""
26 changes: 23 additions & 3 deletions src/increase/types/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,14 @@ class SourceCardRefundPurchaseDetails(BaseModel):
"""An identifier from the merchant for the purchase to the issuer and cardholder."""

purchase_identifier_format: Optional[
Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"]
Literal[
"free_text",
"order_number",
"rental_agreement_number",
"hotel_folio_number",
"invoice_number",
"visa_recurrent_reference_identifier",
]
] = None
"""The format of the purchase identifier.

Expand All @@ -2417,6 +2424,7 @@ class SourceCardRefundPurchaseDetails(BaseModel):
- `rental_agreement_number` - Rental agreement number
- `hotel_folio_number` - Hotel folio number
- `invoice_number` - Invoice number
- `visa_recurrent_reference_identifier` - Visa Recurrent reference identifier
"""

travel: Optional[SourceCardRefundPurchaseDetailsTravel] = None
Expand Down Expand Up @@ -3532,7 +3540,14 @@ class SourceCardSettlementPurchaseDetails(BaseModel):
"""An identifier from the merchant for the purchase to the issuer and cardholder."""

purchase_identifier_format: Optional[
Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"]
Literal[
"free_text",
"order_number",
"rental_agreement_number",
"hotel_folio_number",
"invoice_number",
"visa_recurrent_reference_identifier",
]
] = None
"""The format of the purchase identifier.

Expand All @@ -3541,6 +3556,7 @@ class SourceCardSettlementPurchaseDetails(BaseModel):
- `rental_agreement_number` - Rental agreement number
- `hotel_folio_number` - Hotel folio number
- `invoice_number` - Invoice number
- `visa_recurrent_reference_identifier` - Visa Recurrent reference identifier
"""

travel: Optional[SourceCardSettlementPurchaseDetailsTravel] = None
Expand Down Expand Up @@ -4394,7 +4410,9 @@ class SourceInboundCheckAdjustment(BaseModel):
A positive amount is a credit to your account and a negative amount is a debit.
"""

reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"]
reason: Literal[
"late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid", "duplicate_entry"
]
"""The reason for the adjustment.

- `late_return` - The return was initiated too late and the receiving
Expand All @@ -4407,6 +4425,8 @@ class SourceInboundCheckAdjustment(BaseModel):
usually happens for e.g., low quality images.
- `paid` - The check has already been deposited elsewhere and so this is a
duplicate.
- `duplicate_entry` - A previous adjustment for the check was applied twice and
the duplicate has been reversed.
"""

if TYPE_CHECKING:
Expand Down
3 changes: 3 additions & 0 deletions src/increase/types/unwrap_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class UnwrapWebhookEvent(BaseModel):
"digital_card_profile.updated",
"digital_wallet_token.created",
"digital_wallet_token.updated",
"digital_wallet_token_request.created",
"entity.created",
"entity.updated",
"event_subscription.created",
Expand Down Expand Up @@ -212,6 +213,8 @@ class UnwrapWebhookEvent(BaseModel):
created.
- `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
updated.
- `digital_wallet_token_request.created` - Occurs whenever a Digital Wallet
Token Request is created.
- `entity.created` - Occurs whenever an Entity is created.
- `entity.updated` - Occurs whenever an Entity is updated.
- `event_subscription.created` - Occurs whenever an Event Subscription is
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/test_swift_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
instructed_currency="USD",
source_account_number_id="account_number_v18nkfqm6afpsrvy82b2",
unstructured_remittance_information="New Swift transfer",
intermediary_bank_identification_code="SEWBFL97",
intermediary_bank_identification_code="SEWBFL3A",
require_approval=True,
routing_number="sq",
)
Expand Down Expand Up @@ -343,7 +343,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
instructed_currency="USD",
source_account_number_id="account_number_v18nkfqm6afpsrvy82b2",
unstructured_remittance_information="New Swift transfer",
intermediary_bank_identification_code="SEWBFL97",
intermediary_bank_identification_code="SEWBFL3A",
require_approval=True,
routing_number="sq",
)
Expand Down
Loading
Loading