Skip to content

Commit e97240c

Browse files
committed
feat(api): make route_type an enum & add ACHTransfer.effective_date
feat(api): make route_type an enum & add ACHTransfer.effective_date
1 parent 8836a8b commit e97240c

9 files changed

+23
-13
lines changed

examples/datetime_usage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
dt = datetime.fromisoformat("2023-02-25T18:20:35+00:00")
1212

1313
# both `datetime` instances or datetime strings can be passed as a request param
14-
page = client.events.list(limit=1, created_at={"before": dt})
14+
page = client.events.list(limit=1, created_at={"after": dt})
1515
assert len(page.data) == 1
1616

17-
page = client.events.list(limit=1, created_at={"before": dt.isoformat()})
17+
page = client.events.list(limit=1, created_at={"after": dt.isoformat()})
1818
assert len(page.data) == 1

src/increase/types/ach_transfer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless.
22

33
from typing import Optional
4-
from datetime import datetime
4+
from datetime import date, datetime
55
from typing_extensions import Literal
66

77
from pydantic import Field as FieldInfo
@@ -144,6 +144,12 @@ class ACHTransfer(BaseModel):
144144
currency. For ACH transfers this is always equal to `usd`.
145145
"""
146146

147+
effective_date: Optional[date]
148+
"""
149+
The transfer effective date in
150+
[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
151+
"""
152+
147153
external_account_id: Optional[str]
148154
"""The identifier of the External Account the transfer was made to, if any."""
149155

src/increase/types/declined_transaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ class SourceCheckDecline(BaseModel):
181181
"refer_to_image",
182182
"stop_payment_requested",
183183
"returned",
184+
"duplicate_presentment",
184185
]
185186
"""Why the check was declined."""
186187

@@ -425,7 +426,7 @@ class DeclinedTransaction(BaseModel):
425426
Routes are things like cards and ACH details.
426427
"""
427428

428-
route_type: Optional[str]
429+
route_type: Optional[Literal["account_number", "card"]]
429430
"""The type of the route this Declined Transaction came through."""
430431

431432
source: Source

src/increase/types/pending_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ class PendingTransaction(BaseModel):
390390
Routes are things like cards and ACH details.
391391
"""
392392

393-
route_type: Optional[str]
393+
route_type: Optional[Literal["account_number", "card"]]
394394
"""The type of the route this Pending Transaction came through."""
395395

396396
source: Source

src/increase/types/simulations/ach_transfer_simulation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ class Transaction(BaseModel):
11931193
Routes are things like cards and ACH details.
11941194
"""
11951195

1196-
route_type: Optional[str]
1196+
route_type: Optional[Literal["account_number", "card"]]
11971197
"""The type of the route this Transaction came through."""
11981198

11991199
source: TransactionSource
@@ -1371,6 +1371,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel):
13711371
"refer_to_image",
13721372
"stop_payment_requested",
13731373
"returned",
1374+
"duplicate_presentment",
13741375
]
13751376
"""Why the check was declined."""
13761377

@@ -1617,7 +1618,7 @@ class DeclinedTransaction(BaseModel):
16171618
Routes are things like cards and ACH details.
16181619
"""
16191620

1620-
route_type: Optional[str]
1621+
route_type: Optional[Literal["account_number", "card"]]
16211622
"""The type of the route this Declined Transaction came through."""
16221623

16231624
source: DeclinedTransactionSource

src/increase/types/simulations/card_authorization_simulation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ class PendingTransaction(BaseModel):
401401
Routes are things like cards and ACH details.
402402
"""
403403

404-
route_type: Optional[str]
404+
route_type: Optional[Literal["account_number", "card"]]
405405
"""The type of the route this Pending Transaction came through."""
406406

407407
source: PendingTransactionSource
@@ -584,6 +584,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel):
584584
"refer_to_image",
585585
"stop_payment_requested",
586586
"returned",
587+
"duplicate_presentment",
587588
]
588589
"""Why the check was declined."""
589590

@@ -830,7 +831,7 @@ class DeclinedTransaction(BaseModel):
830831
Routes are things like cards and ACH details.
831832
"""
832833

833-
route_type: Optional[str]
834+
route_type: Optional[Literal["account_number", "card"]]
834835
"""The type of the route this Declined Transaction came through."""
835836

836837
source: DeclinedTransactionSource

src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ class Transaction(BaseModel):
11931193
Routes are things like cards and ACH details.
11941194
"""
11951195

1196-
route_type: Optional[str]
1196+
route_type: Optional[Literal["account_number", "card"]]
11971197
"""The type of the route this Transaction came through."""
11981198

11991199
source: TransactionSource
@@ -1371,6 +1371,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel):
13711371
"refer_to_image",
13721372
"stop_payment_requested",
13731373
"returned",
1374+
"duplicate_presentment",
13741375
]
13751376
"""Why the check was declined."""
13761377

@@ -1617,7 +1618,7 @@ class DeclinedTransaction(BaseModel):
16171618
Routes are things like cards and ACH details.
16181619
"""
16191620

1620-
route_type: Optional[str]
1621+
route_type: Optional[Literal["account_number", "card"]]
16211622
"""The type of the route this Declined Transaction came through."""
16221623

16231624
source: DeclinedTransactionSource

src/increase/types/simulations/wire_transfer_simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ class Transaction(BaseModel):
11821182
Routes are things like cards and ACH details.
11831183
"""
11841184

1185-
route_type: Optional[str]
1185+
route_type: Optional[Literal["account_number", "card"]]
11861186
"""The type of the route this Transaction came through."""
11871187

11881188
source: TransactionSource

src/increase/types/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ class Transaction(BaseModel):
11791179
Routes are things like cards and ACH details.
11801180
"""
11811181

1182-
route_type: Optional[str]
1182+
route_type: Optional[Literal["account_number", "card"]]
11831183
"""The type of the route this Transaction came through."""
11841184

11851185
source: Source

0 commit comments

Comments
 (0)