Skip to content

Commit 84fcd3a

Browse files
feat(api): api update
1 parent ce854cb commit 84fcd3a

4 files changed

Lines changed: 138 additions & 36 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 232
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a089f62e0825b943563fb885786306e446f8e35f777c55c024e57447194aabf.yml
3-
openapi_spec_hash: 2d2faf76bfb1b2a3b8dac458f95abe08
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50d1961c2f7a9b49b1176da26978fbdf0acc1150d731540dcbeeea795ad63fd5.yml
3+
openapi_spec_hash: c8fee0479195a45721851f5f640e5087
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/increase/resources/exports.py

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,25 @@ def retrieve(
196196
def list(
197197
self,
198198
*,
199-
category: export_list_params.Category | Omit = omit,
199+
category: Literal[
200+
"account_statement_ofx",
201+
"account_statement_bai2",
202+
"transaction_csv",
203+
"balance_csv",
204+
"bookkeeping_account_balance_csv",
205+
"entity_csv",
206+
"vendor_csv",
207+
"dashboard_table_csv",
208+
"account_verification_letter",
209+
"funding_instructions",
210+
"form_1099_int",
211+
"form_1099_misc",
212+
]
213+
| Omit = omit,
200214
created_at: export_list_params.CreatedAt | Omit = omit,
201215
cursor: str | Omit = omit,
216+
form_1099_int: export_list_params.Form1099Int | Omit = omit,
217+
form_1099_misc: export_list_params.Form1099Misc | Omit = omit,
202218
idempotency_key: str | Omit = omit,
203219
limit: int | Omit = omit,
204220
status: export_list_params.Status | Omit = omit,
@@ -213,6 +229,27 @@ def list(
213229
List Exports
214230
215231
Args:
232+
category: Filter Exports for those with the specified category.
233+
234+
- `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of
235+
transactions and balances for a given time range and Account.
236+
- `account_statement_bai2` - Export a BAI2 file of transactions and balances for
237+
a given date and optional Account.
238+
- `transaction_csv` - Export a CSV of all transactions for a given time range.
239+
- `balance_csv` - Export a CSV of account balances for the dates in a given
240+
range.
241+
- `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account
242+
balances for the dates in a given range.
243+
- `entity_csv` - Export a CSV of entities with a given status.
244+
- `vendor_csv` - Export a CSV of vendors added to the third-party risk
245+
management dashboard.
246+
- `dashboard_table_csv` - Certain dashboard tables are available as CSV exports.
247+
This export cannot be created via the API.
248+
- `account_verification_letter` - A PDF of an account verification letter.
249+
- `funding_instructions` - A PDF of funding instructions.
250+
- `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT.
251+
- `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC.
252+
216253
cursor: Return the page of entries after this one.
217254
218255
idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
@@ -244,6 +281,8 @@ def list(
244281
"category": category,
245282
"created_at": created_at,
246283
"cursor": cursor,
284+
"form_1099_int": form_1099_int,
285+
"form_1099_misc": form_1099_misc,
247286
"idempotency_key": idempotency_key,
248287
"limit": limit,
249288
"status": status,
@@ -427,9 +466,25 @@ async def retrieve(
427466
def list(
428467
self,
429468
*,
430-
category: export_list_params.Category | Omit = omit,
469+
category: Literal[
470+
"account_statement_ofx",
471+
"account_statement_bai2",
472+
"transaction_csv",
473+
"balance_csv",
474+
"bookkeeping_account_balance_csv",
475+
"entity_csv",
476+
"vendor_csv",
477+
"dashboard_table_csv",
478+
"account_verification_letter",
479+
"funding_instructions",
480+
"form_1099_int",
481+
"form_1099_misc",
482+
]
483+
| Omit = omit,
431484
created_at: export_list_params.CreatedAt | Omit = omit,
432485
cursor: str | Omit = omit,
486+
form_1099_int: export_list_params.Form1099Int | Omit = omit,
487+
form_1099_misc: export_list_params.Form1099Misc | Omit = omit,
433488
idempotency_key: str | Omit = omit,
434489
limit: int | Omit = omit,
435490
status: export_list_params.Status | Omit = omit,
@@ -444,6 +499,27 @@ def list(
444499
List Exports
445500
446501
Args:
502+
category: Filter Exports for those with the specified category.
503+
504+
- `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of
505+
transactions and balances for a given time range and Account.
506+
- `account_statement_bai2` - Export a BAI2 file of transactions and balances for
507+
a given date and optional Account.
508+
- `transaction_csv` - Export a CSV of all transactions for a given time range.
509+
- `balance_csv` - Export a CSV of account balances for the dates in a given
510+
range.
511+
- `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account
512+
balances for the dates in a given range.
513+
- `entity_csv` - Export a CSV of entities with a given status.
514+
- `vendor_csv` - Export a CSV of vendors added to the third-party risk
515+
management dashboard.
516+
- `dashboard_table_csv` - Certain dashboard tables are available as CSV exports.
517+
This export cannot be created via the API.
518+
- `account_verification_letter` - A PDF of an account verification letter.
519+
- `funding_instructions` - A PDF of funding instructions.
520+
- `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT.
521+
- `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC.
522+
447523
cursor: Return the page of entries after this one.
448524
449525
idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
@@ -475,6 +551,8 @@ def list(
475551
"category": category,
476552
"created_at": created_at,
477553
"cursor": cursor,
554+
"form_1099_int": form_1099_int,
555+
"form_1099_misc": form_1099_misc,
478556
"idempotency_key": idempotency_key,
479557
"limit": limit,
480558
"status": status,

src/increase/types/export_list_params.py

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,55 @@
88

99
from .._utils import PropertyInfo
1010

11-
__all__ = ["ExportListParams", "Category", "CreatedAt", "Status"]
11+
__all__ = ["ExportListParams", "CreatedAt", "Form1099Int", "Form1099Misc", "Status"]
1212

1313

1414
class ExportListParams(TypedDict, total=False):
15-
category: Category
15+
category: Literal[
16+
"account_statement_ofx",
17+
"account_statement_bai2",
18+
"transaction_csv",
19+
"balance_csv",
20+
"bookkeeping_account_balance_csv",
21+
"entity_csv",
22+
"vendor_csv",
23+
"dashboard_table_csv",
24+
"account_verification_letter",
25+
"funding_instructions",
26+
"form_1099_int",
27+
"form_1099_misc",
28+
]
29+
"""Filter Exports for those with the specified category.
30+
31+
- `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of
32+
transactions and balances for a given time range and Account.
33+
- `account_statement_bai2` - Export a BAI2 file of transactions and balances for
34+
a given date and optional Account.
35+
- `transaction_csv` - Export a CSV of all transactions for a given time range.
36+
- `balance_csv` - Export a CSV of account balances for the dates in a given
37+
range.
38+
- `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account
39+
balances for the dates in a given range.
40+
- `entity_csv` - Export a CSV of entities with a given status.
41+
- `vendor_csv` - Export a CSV of vendors added to the third-party risk
42+
management dashboard.
43+
- `dashboard_table_csv` - Certain dashboard tables are available as CSV exports.
44+
This export cannot be created via the API.
45+
- `account_verification_letter` - A PDF of an account verification letter.
46+
- `funding_instructions` - A PDF of funding instructions.
47+
- `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT.
48+
- `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC.
49+
"""
1650

1751
created_at: CreatedAt
1852

1953
cursor: str
2054
"""Return the page of entries after this one."""
2155

56+
form_1099_int: Form1099Int
57+
58+
form_1099_misc: Form1099Misc
59+
2260
idempotency_key: str
2361
"""
2462
Filter records to the one with the specified `idempotency_key` you chose for
@@ -36,34 +74,6 @@ class ExportListParams(TypedDict, total=False):
3674
status: Status
3775

3876

39-
_CategoryReservedKeywords = TypedDict(
40-
"_CategoryReservedKeywords",
41-
{
42-
"in": List[
43-
Literal[
44-
"account_statement_ofx",
45-
"account_statement_bai2",
46-
"transaction_csv",
47-
"balance_csv",
48-
"bookkeeping_account_balance_csv",
49-
"entity_csv",
50-
"vendor_csv",
51-
"dashboard_table_csv",
52-
"account_verification_letter",
53-
"funding_instructions",
54-
"form_1099_int",
55-
"form_1099_misc",
56-
]
57-
],
58-
},
59-
total=False,
60-
)
61-
62-
63-
class Category(_CategoryReservedKeywords, total=False):
64-
pass
65-
66-
6777
class CreatedAt(TypedDict, total=False):
6878
after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
6979
"""
@@ -90,6 +100,16 @@ class CreatedAt(TypedDict, total=False):
90100
"""
91101

92102

103+
class Form1099Int(TypedDict, total=False):
104+
account_id: str
105+
"""Filter Form 1099-INT Exports to those for the specified Account."""
106+
107+
108+
class Form1099Misc(TypedDict, total=False):
109+
account_id: str
110+
"""Filter Form 1099-MISC Exports to those for the specified Account."""
111+
112+
93113
_StatusReservedKeywords = TypedDict(
94114
"_StatusReservedKeywords",
95115
{

tests/api_resources/test_exports.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,16 @@ def test_method_list(self, client: Increase) -> None:
151151
@parametrize
152152
def test_method_list_with_all_params(self, client: Increase) -> None:
153153
export = client.exports.list(
154-
category={"in": ["account_statement_ofx"]},
154+
category="account_statement_ofx",
155155
created_at={
156156
"after": parse_datetime("2019-12-27T18:11:19.117Z"),
157157
"before": parse_datetime("2019-12-27T18:11:19.117Z"),
158158
"on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"),
159159
"on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"),
160160
},
161161
cursor="cursor",
162+
form_1099_int={"account_id": "account_id"},
163+
form_1099_misc={"account_id": "account_id"},
162164
idempotency_key="x",
163165
limit=1,
164166
status={"in": ["pending"]},
@@ -323,14 +325,16 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None:
323325
@parametrize
324326
async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None:
325327
export = await async_client.exports.list(
326-
category={"in": ["account_statement_ofx"]},
328+
category="account_statement_ofx",
327329
created_at={
328330
"after": parse_datetime("2019-12-27T18:11:19.117Z"),
329331
"before": parse_datetime("2019-12-27T18:11:19.117Z"),
330332
"on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"),
331333
"on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"),
332334
},
333335
cursor="cursor",
336+
form_1099_int={"account_id": "account_id"},
337+
form_1099_misc={"account_id": "account_id"},
334338
idempotency_key="x",
335339
limit=1,
336340
status={"in": ["pending"]},

0 commit comments

Comments
 (0)