Skip to content

Commit a63cf9d

Browse files
feat(api): api update (#938)
1 parent 9a48eab commit a63cf9d

File tree

4 files changed

+260
-1
lines changed

4 files changed

+260
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 201
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-503b3369995201c52ca638ced198ae20c73a0b26e5db67b8963e107bff5d1c2d.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b83233a82025949d61c863da86f7d5cb639e8868924719a83bda389714fbf568.yml

src/increase/types/card_payment.py

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
__all__ = [
1010
"CardPayment",
1111
"Element",
12+
"ElementCardAuthentication",
13+
"ElementCardAuthenticationChallenge",
14+
"ElementCardAuthenticationChallengeAttempt",
1215
"ElementCardAuthorization",
1316
"ElementCardAuthorizationNetworkDetails",
1417
"ElementCardAuthorizationNetworkDetailsVisa",
@@ -63,6 +66,173 @@
6366
]
6467

6568

69+
class ElementCardAuthenticationChallengeAttempt(BaseModel):
70+
created_at: datetime
71+
"""
72+
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time of the Card
73+
Authentication Challenge Attempt.
74+
"""
75+
76+
outcome: Literal["successful", "failed"]
77+
"""The outcome of the Card Authentication Challenge Attempt.
78+
79+
- `successful` - The attempt was successful.
80+
- `failed` - The attempt was unsuccessful.
81+
"""
82+
83+
84+
class ElementCardAuthenticationChallenge(BaseModel):
85+
attempts: List[ElementCardAuthenticationChallengeAttempt]
86+
"""Details about the challenge verification attempts, if any happened."""
87+
88+
created_at: datetime
89+
"""
90+
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card
91+
Authentication Challenge was started.
92+
"""
93+
94+
one_time_code: str
95+
"""The one-time code used for the Card Authentication Challenge."""
96+
97+
verification_method: Literal["text_message", "email", "none_available"]
98+
"""The method used to verify the Card Authentication Challenge.
99+
100+
- `text_message` - The one-time code was sent via text message.
101+
- `email` - The one-time code was sent via email.
102+
- `none_available` - The one-time code was not successfully delievered.
103+
"""
104+
105+
verification_value: Optional[str] = None
106+
"""
107+
E.g., the email address or phone number used for the Card Authentication
108+
Challenge.
109+
"""
110+
111+
112+
class ElementCardAuthentication(BaseModel):
113+
id: str
114+
"""The Card Authentication identifier."""
115+
116+
card_id: str
117+
"""The identifier of the Card."""
118+
119+
card_payment_id: str
120+
"""The ID of the Card Payment this transaction belongs to."""
121+
122+
category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None
123+
"""The category of the card authentication attempt.
124+
125+
- `payment_authentication` - The authentication attempt is for a payment.
126+
- `non_payment_authentication` - The authentication attempt is not for a
127+
payment.
128+
"""
129+
130+
challenge: Optional[ElementCardAuthenticationChallenge] = None
131+
"""Details about the challenge, if one was requested."""
132+
133+
created_at: datetime
134+
"""
135+
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card
136+
Authentication was attempted.
137+
"""
138+
139+
deny_reason: Optional[
140+
Literal[
141+
"group_locked",
142+
"card_not_active",
143+
"entity_not_active",
144+
"transaction_not_allowed",
145+
"webhook_denied",
146+
"webhook_timed_out",
147+
]
148+
] = None
149+
"""The reason why this authentication attempt was denied, if it was.
150+
151+
- `group_locked` - The group was locked.
152+
- `card_not_active` - The card was not active.
153+
- `entity_not_active` - The entity was not active.
154+
- `transaction_not_allowed` - The transaction was not allowed.
155+
- `webhook_denied` - The webhook was denied.
156+
- `webhook_timed_out` - The webhook timed out.
157+
"""
158+
159+
device_channel: Optional[Literal["app", "browser", "three_ds_requestor_initiated"]] = None
160+
"""The device channel of the card authentication attempt.
161+
162+
- `app` - The authentication attempt was made from an app.
163+
- `browser` - The authentication attempt was made from a browser.
164+
- `three_ds_requestor_initiated` - The authentication attempt was initiated by
165+
the 3DS Requestor.
166+
"""
167+
168+
merchant_acceptor_id: str
169+
"""
170+
The merchant identifier (commonly abbreviated as MID) of the merchant the card
171+
is transacting with.
172+
"""
173+
174+
merchant_category_code: str
175+
"""
176+
The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
177+
card is transacting with.
178+
"""
179+
180+
merchant_country: str
181+
"""The country the merchant resides in."""
182+
183+
merchant_name: str
184+
"""The name of the merchant."""
185+
186+
purchase_amount: Optional[int] = None
187+
"""The purchase amount in minor units."""
188+
189+
purchase_currency: Optional[str] = None
190+
"""
191+
The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
192+
authentication attempt's purchase currency.
193+
"""
194+
195+
real_time_decision_id: Optional[str] = None
196+
"""
197+
The identifier of the Real-Time Decision sent to approve or decline this
198+
authentication attempt.
199+
"""
200+
201+
status: Literal[
202+
"denied",
203+
"authenticated_with_challenge",
204+
"authenticated_without_challenge",
205+
"awaiting_challenge",
206+
"validating_challenge",
207+
"canceled",
208+
"timed_out_awaiting_challenge",
209+
"errored",
210+
"exceeded_attempt_threshold",
211+
]
212+
"""The status of the card authentication.
213+
214+
- `denied` - The authentication attempt was denied.
215+
- `authenticated_with_challenge` - The authentication attempt was authenticated
216+
with a challenge.
217+
- `authenticated_without_challenge` - The authentication attempt was
218+
authenticated without a challenge.
219+
- `awaiting_challenge` - The authentication attempt is awaiting a challenge.
220+
- `validating_challenge` - The authentication attempt is validating a challenge.
221+
- `canceled` - The authentication attempt was canceled.
222+
- `timed_out_awaiting_challenge` - The authentication attempt timed out while
223+
awaiting a challenge.
224+
- `errored` - The authentication attempt errored.
225+
- `exceeded_attempt_threshold` - The authentication attempt exceeded the attempt
226+
threshold.
227+
"""
228+
229+
type: Literal["card_authentication"]
230+
"""A constant representing the object's type.
231+
232+
For this resource it will always be `card_authentication`.
233+
"""
234+
235+
66236
class ElementCardAuthorizationNetworkDetailsVisa(BaseModel):
67237
electronic_commerce_indicator: Optional[
68238
Literal[
@@ -2653,6 +2823,13 @@ class ElementCardValidation(BaseModel):
26532823

26542824

26552825
class Element(BaseModel):
2826+
card_authentication: Optional[ElementCardAuthentication] = None
2827+
"""A Card Authentication object.
2828+
2829+
This field will be present in the JSON response if and only if `category` is
2830+
equal to `card_authentication`.
2831+
"""
2832+
26562833
card_authorization: Optional[ElementCardAuthorization] = None
26572834
"""A Card Authorization object.
26582835

src/increase/types/pending_transaction.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"SourceCheckDepositInstruction",
2222
"SourceCheckTransferInstruction",
2323
"SourceInboundFundsHold",
24+
"SourceInboundWireTransferReversal",
2425
"SourceRealTimePaymentsTransferInstruction",
2526
"SourceWireTransferInstruction",
2627
]
@@ -548,6 +549,11 @@ class SourceInboundFundsHold(BaseModel):
548549
"""
549550

550551

552+
class SourceInboundWireTransferReversal(BaseModel):
553+
inbound_wire_transfer_id: str
554+
"""The ID of the Inbound Wire Transfer that is being reversed."""
555+
556+
551557
class SourceRealTimePaymentsTransferInstruction(BaseModel):
552558
amount: int
553559
"""The transfer amount in USD cents."""
@@ -662,6 +668,13 @@ class Source(BaseModel):
662668
equal to `inbound_funds_hold`.
663669
"""
664670

671+
inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None
672+
"""An Inbound Wire Transfer Reversal object.
673+
674+
This field will be present in the JSON response if and only if `category` is
675+
equal to `inbound_wire_transfer_reversal`.
676+
"""
677+
665678
other: Optional[object] = None
666679
"""
667680
If the category of this Transaction source is equal to `other`, this field will

src/increase/types/transaction.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
"SourceInboundACHTransferAddenda",
4848
"SourceInboundACHTransferAddendaFreeform",
4949
"SourceInboundACHTransferAddendaFreeformEntry",
50+
"SourceInboundACHTransferReturnIntention",
51+
"SourceInboundCheckAdjustment",
52+
"SourceInboundCheckDepositReturnIntention",
5053
"SourceInboundRealTimePaymentsTransferConfirmation",
5154
"SourceInboundRealTimePaymentsTransferDecline",
5255
"SourceInboundWireReversal",
5356
"SourceInboundWireTransfer",
57+
"SourceInboundWireTransferReversal",
5458
"SourceInterestPayment",
5559
"SourceInternalSource",
5660
"SourceRealTimePaymentsTransferAcknowledgement",
@@ -1865,6 +1869,38 @@ class SourceInboundACHTransfer(BaseModel):
18651869
"""The Inbound ACH Transfer's identifier."""
18661870

18671871

1872+
class SourceInboundACHTransferReturnIntention(BaseModel):
1873+
inbound_ach_transfer_id: str
1874+
"""The ID of the Inbound ACH Transfer that is being returned."""
1875+
1876+
1877+
class SourceInboundCheckAdjustment(BaseModel):
1878+
adjusted_transaction_id: str
1879+
"""The ID of the transaction that was adjusted."""
1880+
1881+
amount: int
1882+
"""The amount of the check adjustment."""
1883+
1884+
reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"]
1885+
"""The reason for the adjustment.
1886+
1887+
- `late_return` - The return was initiated too late and the receiving
1888+
institution has responded with a Late Return Claim.
1889+
- `wrong_payee_credit` - The check was deposited to the wrong payee and the
1890+
depositing institution has reimbursed the funds with a Wrong Payee Credit.
1891+
- `adjusted_amount` - The check was deposited with a different amount than what
1892+
was written on the check.
1893+
"""
1894+
1895+
1896+
class SourceInboundCheckDepositReturnIntention(BaseModel):
1897+
inbound_check_deposit_id: str
1898+
"""The ID of the Inbound Check Deposit that is being returned."""
1899+
1900+
transfer_id: Optional[str] = None
1901+
"""The identifier of the Check Transfer object that was deposited."""
1902+
1903+
18681904
class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel):
18691905
amount: int
18701906
"""The amount in the minor unit of the transfer's currency.
@@ -2106,6 +2142,11 @@ class SourceInboundWireTransfer(BaseModel):
21062142
"""The ID of the Inbound Wire Transfer object that resulted in this Transaction."""
21072143

21082144

2145+
class SourceInboundWireTransferReversal(BaseModel):
2146+
inbound_wire_transfer_id: str
2147+
"""The ID of the Inbound Wire Transfer that is being reversed."""
2148+
2149+
21092150
class SourceInterestPayment(BaseModel):
21102151
accrued_on_account_id: str
21112152
"""The account on which the interest was accrued."""
@@ -2438,6 +2479,27 @@ class Source(BaseModel):
24382479
equal to `inbound_ach_transfer`.
24392480
"""
24402481

2482+
inbound_ach_transfer_return_intention: Optional[SourceInboundACHTransferReturnIntention] = None
2483+
"""An Inbound ACH Transfer Return Intention object.
2484+
2485+
This field will be present in the JSON response if and only if `category` is
2486+
equal to `inbound_ach_transfer_return_intention`.
2487+
"""
2488+
2489+
inbound_check_adjustment: Optional[SourceInboundCheckAdjustment] = None
2490+
"""An Inbound Check Adjustment object.
2491+
2492+
This field will be present in the JSON response if and only if `category` is
2493+
equal to `inbound_check_adjustment`.
2494+
"""
2495+
2496+
inbound_check_deposit_return_intention: Optional[SourceInboundCheckDepositReturnIntention] = None
2497+
"""An Inbound Check Deposit Return Intention object.
2498+
2499+
This field will be present in the JSON response if and only if `category` is
2500+
equal to `inbound_check_deposit_return_intention`.
2501+
"""
2502+
24412503
inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None
24422504
"""An Inbound Real-Time Payments Transfer Confirmation object.
24432505
@@ -2466,6 +2528,13 @@ class Source(BaseModel):
24662528
equal to `inbound_wire_transfer`.
24672529
"""
24682530

2531+
inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None
2532+
"""An Inbound Wire Transfer Reversal Intention object.
2533+
2534+
This field will be present in the JSON response if and only if `category` is
2535+
equal to `inbound_wire_transfer_reversal`.
2536+
"""
2537+
24692538
interest_payment: Optional[SourceInterestPayment] = None
24702539
"""An Interest Payment object.
24712540

0 commit comments

Comments
 (0)