From 3105b18e5163f9adcf1ba9a6fad7da4e66679924 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:48:28 +0000 Subject: [PATCH 1/2] feat(api): api update (#938) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 177 ++++++++++++++++++++++ src/increase/types/pending_transaction.py | 13 ++ src/increase/types/transaction.py | 69 +++++++++ 4 files changed, 260 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 880ecadac..f96c3c096 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-503b3369995201c52ca638ced198ae20c73a0b26e5db67b8963e107bff5d1c2d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b83233a82025949d61c863da86f7d5cb639e8868924719a83bda389714fbf568.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index b94dd4ce5..0b6fc7b84 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -9,6 +9,9 @@ __all__ = [ "CardPayment", "Element", + "ElementCardAuthentication", + "ElementCardAuthenticationChallenge", + "ElementCardAuthenticationChallengeAttempt", "ElementCardAuthorization", "ElementCardAuthorizationNetworkDetails", "ElementCardAuthorizationNetworkDetailsVisa", @@ -63,6 +66,173 @@ ] +class ElementCardAuthenticationChallengeAttempt(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time of the Card + Authentication Challenge Attempt. + """ + + outcome: Literal["successful", "failed"] + """The outcome of the Card Authentication Challenge Attempt. + + - `successful` - The attempt was successful. + - `failed` - The attempt was unsuccessful. + """ + + +class ElementCardAuthenticationChallenge(BaseModel): + attempts: List[ElementCardAuthenticationChallengeAttempt] + """Details about the challenge verification attempts, if any happened.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card + Authentication Challenge was started. + """ + + one_time_code: str + """The one-time code used for the Card Authentication Challenge.""" + + verification_method: Literal["text_message", "email", "none_available"] + """The method used to verify the Card Authentication Challenge. + + - `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 delievered. + """ + + verification_value: Optional[str] = None + """ + E.g., the email address or phone number used for the Card Authentication + Challenge. + """ + + +class ElementCardAuthentication(BaseModel): + id: str + """The Card Authentication identifier.""" + + card_id: str + """The identifier of the Card.""" + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ + + challenge: Optional[ElementCardAuthenticationChallenge] = None + """Details about the challenge, if one was requested.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card + Authentication was attempted. + """ + + deny_reason: Optional[ + Literal[ + "group_locked", + "card_not_active", + "entity_not_active", + "transaction_not_allowed", + "webhook_denied", + "webhook_timed_out", + ] + ] = None + """The reason why this authentication attempt was denied, if it was. + + - `group_locked` - The group was locked. + - `card_not_active` - The card was not active. + - `entity_not_active` - The entity was not active. + - `transaction_not_allowed` - The transaction was not allowed. + - `webhook_denied` - The webhook was denied. + - `webhook_timed_out` - The webhook timed out. + """ + + device_channel: Optional[Literal["app", "browser", "three_ds_requestor_initiated"]] = None + """The device channel of the card authentication attempt. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: str + """The name of the merchant.""" + + purchase_amount: Optional[int] = None + """The purchase amount in minor units.""" + + purchase_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + authentication attempt's purchase currency. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + authentication attempt. + """ + + status: Literal[ + "denied", + "authenticated_with_challenge", + "authenticated_without_challenge", + "awaiting_challenge", + "validating_challenge", + "canceled", + "timed_out_awaiting_challenge", + "errored", + "exceeded_attempt_threshold", + ] + """The status of the card authentication. + + - `denied` - The authentication attempt was denied. + - `authenticated_with_challenge` - The authentication attempt was authenticated + with a challenge. + - `authenticated_without_challenge` - The authentication attempt was + authenticated without a challenge. + - `awaiting_challenge` - The authentication attempt is awaiting a challenge. + - `validating_challenge` - The authentication attempt is validating a challenge. + - `canceled` - The authentication attempt was canceled. + - `timed_out_awaiting_challenge` - The authentication attempt timed out while + awaiting a challenge. + - `errored` - The authentication attempt errored. + - `exceeded_attempt_threshold` - The authentication attempt exceeded the attempt + threshold. + """ + + type: Literal["card_authentication"] + """A constant representing the object's type. + + For this resource it will always be `card_authentication`. + """ + + class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -2653,6 +2823,13 @@ class ElementCardValidation(BaseModel): class Element(BaseModel): + card_authentication: Optional[ElementCardAuthentication] = None + """A Card Authentication object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_authentication`. + """ + card_authorization: Optional[ElementCardAuthorization] = None """A Card Authorization object. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 0a7f3fc95..0bf113134 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -21,6 +21,7 @@ "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", "SourceInboundFundsHold", + "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", "SourceWireTransferInstruction", ] @@ -548,6 +549,11 @@ class SourceInboundFundsHold(BaseModel): """ +class SourceInboundWireTransferReversal(BaseModel): + inbound_wire_transfer_id: str + """The ID of the Inbound Wire Transfer that is being reversed.""" + + class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -662,6 +668,13 @@ class Source(BaseModel): equal to `inbound_funds_hold`. """ + inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None + """An Inbound Wire Transfer Reversal object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_transfer_reversal`. + """ + other: Optional[object] = None """ If the category of this Transaction source is equal to `other`, this field will diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 23e4f1ff8..d1aecbc8e 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -47,10 +47,14 @@ "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", + "SourceInboundACHTransferReturnIntention", + "SourceInboundCheckAdjustment", + "SourceInboundCheckDepositReturnIntention", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundRealTimePaymentsTransferDecline", "SourceInboundWireReversal", "SourceInboundWireTransfer", + "SourceInboundWireTransferReversal", "SourceInterestPayment", "SourceInternalSource", "SourceRealTimePaymentsTransferAcknowledgement", @@ -1865,6 +1869,38 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" +class SourceInboundACHTransferReturnIntention(BaseModel): + inbound_ach_transfer_id: str + """The ID of the Inbound ACH Transfer that is being returned.""" + + +class SourceInboundCheckAdjustment(BaseModel): + adjusted_transaction_id: str + """The ID of the transaction that was adjusted.""" + + amount: int + """The amount of the check adjustment.""" + + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"] + """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. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + """ + + +class SourceInboundCheckDepositReturnIntention(BaseModel): + inbound_check_deposit_id: str + """The ID of the Inbound Check Deposit that is being returned.""" + + transfer_id: Optional[str] = None + """The identifier of the Check Transfer object that was deposited.""" + + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2106,6 +2142,11 @@ class SourceInboundWireTransfer(BaseModel): """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" +class SourceInboundWireTransferReversal(BaseModel): + inbound_wire_transfer_id: str + """The ID of the Inbound Wire Transfer that is being reversed.""" + + class SourceInterestPayment(BaseModel): accrued_on_account_id: str """The account on which the interest was accrued.""" @@ -2438,6 +2479,27 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ + inbound_ach_transfer_return_intention: Optional[SourceInboundACHTransferReturnIntention] = None + """An Inbound ACH Transfer Return Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_ach_transfer_return_intention`. + """ + + inbound_check_adjustment: Optional[SourceInboundCheckAdjustment] = None + """An Inbound Check Adjustment object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_check_adjustment`. + """ + + inbound_check_deposit_return_intention: Optional[SourceInboundCheckDepositReturnIntention] = None + """An Inbound Check Deposit Return Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_check_deposit_return_intention`. + """ + inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. @@ -2466,6 +2528,13 @@ class Source(BaseModel): equal to `inbound_wire_transfer`. """ + inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None + """An Inbound Wire Transfer Reversal Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_transfer_reversal`. + """ + interest_payment: Optional[SourceInterestPayment] = None """An Interest Payment object. From f9fa9825aceb90b7d200b3589b65f9335d362cd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:48:55 +0000 Subject: [PATCH 2/2] release: 0.184.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f72712c3..06ebae073 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.183.0" + ".": "0.184.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ea88cb13e..6afa02d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.184.0 (2025-01-31) + +Full Changelog: [v0.183.0...v0.184.0](https://github.com/Increase/increase-python/compare/v0.183.0...v0.184.0) + +### Features + +* **api:** api update ([#938](https://github.com/Increase/increase-python/issues/938)) ([3105b18](https://github.com/Increase/increase-python/commit/3105b18e5163f9adcf1ba9a6fad7da4e66679924)) + ## 0.183.0 (2025-01-30) Full Changelog: [v0.182.0...v0.183.0](https://github.com/Increase/increase-python/compare/v0.182.0...v0.183.0) diff --git a/pyproject.toml b/pyproject.toml index 0c27c719c..3a9ed9b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.183.0" +version = "0.184.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5664860eb..2488e14d3 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.183.0" # x-release-please-version +__version__ = "0.184.0" # x-release-please-version