Skip to content

Commit 49ce9e8

Browse files
committed
feat(api): add bookkeeping accounts, entries, and entry sets, and several other changes
1 parent d380ad2 commit 49ce9e8

31 files changed

+1262
-12
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 127
1+
configured_endpoints: 131

api.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,43 @@ Methods:
3535
- <code title="patch /account_numbers/{account_number_id}">client.account_numbers.<a href="./src/increase/resources/account_numbers.py">update</a>(account_number_id, \*\*<a href="src/increase/types/account_number_update_params.py">params</a>) -> <a href="./src/increase/types/account_number.py">AccountNumber</a></code>
3636
- <code title="get /account_numbers">client.account_numbers.<a href="./src/increase/resources/account_numbers.py">list</a>(\*\*<a href="src/increase/types/account_number_list_params.py">params</a>) -> <a href="./src/increase/types/account_number.py">SyncPage[AccountNumber]</a></code>
3737

38+
# BookkeepingAccounts
39+
40+
Types:
41+
42+
```python
43+
from increase.types import BookkeepingAccount
44+
```
45+
46+
Methods:
47+
48+
- <code title="post /bookkeeping_accounts">client.bookkeeping_accounts.<a href="./src/increase/resources/bookkeeping_accounts.py">create</a>(\*\*<a href="src/increase/types/bookkeeping_account_create_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_account.py">BookkeepingAccount</a></code>
49+
- <code title="get /bookkeeping_accounts">client.bookkeeping_accounts.<a href="./src/increase/resources/bookkeeping_accounts.py">list</a>(\*\*<a href="src/increase/types/bookkeeping_account_list_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_account.py">SyncPage[BookkeepingAccount]</a></code>
50+
51+
# BookkeepingEntrySets
52+
53+
Types:
54+
55+
```python
56+
from increase.types import BookkeepingEntrySet
57+
```
58+
59+
Methods:
60+
61+
- <code title="post /bookkeeping_entry_sets">client.bookkeeping_entry_sets.<a href="./src/increase/resources/bookkeeping_entry_sets.py">create</a>(\*\*<a href="src/increase/types/bookkeeping_entry_set_create_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_entry_set.py">BookkeepingEntrySet</a></code>
62+
63+
# BookkeepingEntries
64+
65+
Types:
66+
67+
```python
68+
from increase.types import BookkeepingEntry
69+
```
70+
71+
Methods:
72+
73+
- <code title="get /bookkeeping_entries">client.bookkeeping_entries.<a href="./src/increase/resources/bookkeeping_entries.py">list</a>(\*\*<a href="src/increase/types/bookkeeping_entry_list_params.py">params</a>) -> <a href="./src/increase/types/bookkeeping_entry.py">SyncPage[BookkeepingEntry]</a></code>
74+
3875
# RealTimeDecisions
3976

4077
Types:

src/increase/_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
class Increase(SyncAPIClient):
4949
accounts: resources.Accounts
5050
account_numbers: resources.AccountNumbers
51+
bookkeeping_accounts: resources.BookkeepingAccounts
52+
bookkeeping_entry_sets: resources.BookkeepingEntrySets
53+
bookkeeping_entries: resources.BookkeepingEntries
5154
real_time_decisions: resources.RealTimeDecisions
5255
real_time_payments_transfers: resources.RealTimePaymentsTransfers
5356
balance_lookups: resources.BalanceLookups
@@ -150,6 +153,9 @@ def __init__(
150153

151154
self.accounts = resources.Accounts(self)
152155
self.account_numbers = resources.AccountNumbers(self)
156+
self.bookkeeping_accounts = resources.BookkeepingAccounts(self)
157+
self.bookkeeping_entry_sets = resources.BookkeepingEntrySets(self)
158+
self.bookkeeping_entries = resources.BookkeepingEntries(self)
153159
self.real_time_decisions = resources.RealTimeDecisions(self)
154160
self.real_time_payments_transfers = resources.RealTimePaymentsTransfers(self)
155161
self.balance_lookups = resources.BalanceLookups(self)
@@ -317,6 +323,9 @@ def _make_status_error(
317323
class AsyncIncrease(AsyncAPIClient):
318324
accounts: resources.AsyncAccounts
319325
account_numbers: resources.AsyncAccountNumbers
326+
bookkeeping_accounts: resources.AsyncBookkeepingAccounts
327+
bookkeeping_entry_sets: resources.AsyncBookkeepingEntrySets
328+
bookkeeping_entries: resources.AsyncBookkeepingEntries
320329
real_time_decisions: resources.AsyncRealTimeDecisions
321330
real_time_payments_transfers: resources.AsyncRealTimePaymentsTransfers
322331
balance_lookups: resources.AsyncBalanceLookups
@@ -419,6 +428,9 @@ def __init__(
419428

420429
self.accounts = resources.AsyncAccounts(self)
421430
self.account_numbers = resources.AsyncAccountNumbers(self)
431+
self.bookkeeping_accounts = resources.AsyncBookkeepingAccounts(self)
432+
self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySets(self)
433+
self.bookkeeping_entries = resources.AsyncBookkeepingEntries(self)
422434
self.real_time_decisions = resources.AsyncRealTimeDecisions(self)
423435
self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfers(self)
424436
self.balance_lookups = resources.AsyncBalanceLookups(self)

src/increase/resources/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525
from .external_accounts import ExternalAccounts, AsyncExternalAccounts
2626
from .oauth_connections import OauthConnections, AsyncOauthConnections
2727
from .account_statements import AccountStatements, AsyncAccountStatements
28+
from .bookkeeping_entries import BookkeepingEntries, AsyncBookkeepingEntries
2829
from .event_subscriptions import EventSubscriptions, AsyncEventSubscriptions
2930
from .real_time_decisions import RealTimeDecisions, AsyncRealTimeDecisions
3031
from .ach_prenotifications import ACHPrenotifications, AsyncACHPrenotifications
32+
from .bookkeeping_accounts import BookkeepingAccounts, AsyncBookkeepingAccounts
3133
from .pending_transactions import PendingTransactions, AsyncPendingTransactions
3234
from .declined_transactions import DeclinedTransactions, AsyncDeclinedTransactions
3335
from .digital_wallet_tokens import DigitalWalletTokens, AsyncDigitalWalletTokens
36+
from .bookkeeping_entry_sets import BookkeepingEntrySets, AsyncBookkeepingEntrySets
3437
from .wire_drawdown_requests import WireDrawdownRequests, AsyncWireDrawdownRequests
3538
from .inbound_ach_transfer_returns import (
3639
InboundACHTransferReturns,
@@ -50,6 +53,12 @@
5053
"AsyncAccounts",
5154
"AccountNumbers",
5255
"AsyncAccountNumbers",
56+
"BookkeepingAccounts",
57+
"AsyncBookkeepingAccounts",
58+
"BookkeepingEntrySets",
59+
"AsyncBookkeepingEntrySets",
60+
"BookkeepingEntries",
61+
"AsyncBookkeepingEntries",
5362
"RealTimeDecisions",
5463
"AsyncRealTimeDecisions",
5564
"RealTimePaymentsTransfers",
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
# File generated from our OpenAPI spec by Stainless.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal
6+
7+
from ..types import (
8+
BookkeepingAccount,
9+
bookkeeping_account_list_params,
10+
bookkeeping_account_create_params,
11+
)
12+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
13+
from .._utils import maybe_transform
14+
from .._resource import SyncAPIResource, AsyncAPIResource
15+
from ..pagination import SyncPage, AsyncPage
16+
from .._base_client import AsyncPaginator, make_request_options
17+
18+
__all__ = ["BookkeepingAccounts", "AsyncBookkeepingAccounts"]
19+
20+
21+
class BookkeepingAccounts(SyncAPIResource):
22+
def create(
23+
self,
24+
*,
25+
name: str,
26+
account_id: str | NotGiven = NOT_GIVEN,
27+
compliance_category: Literal["commingled_cash", "customer_balance"] | NotGiven = NOT_GIVEN,
28+
entity_id: str | NotGiven = NOT_GIVEN,
29+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
30+
# The extra values given here take precedence over values defined on the client or passed to this method.
31+
extra_headers: Headers | None = None,
32+
extra_query: Query | None = None,
33+
extra_body: Body | None = None,
34+
timeout: float | None | NotGiven = NOT_GIVEN,
35+
idempotency_key: str | None = None,
36+
) -> BookkeepingAccount:
37+
"""
38+
Create a Bookkeeping Account
39+
40+
Args:
41+
name: The name you choose for the account.
42+
43+
account_id: The entity, if `compliance_category` is `commingled_cash`.
44+
45+
compliance_category: The account compliance category.
46+
47+
entity_id: The entity, if `compliance_category` is `customer_balance`.
48+
49+
extra_headers: Send extra headers
50+
51+
extra_query: Add additional query parameters to the request
52+
53+
extra_body: Add additional JSON properties to the request
54+
55+
timeout: Override the client-level default timeout for this request, in seconds
56+
57+
idempotency_key: Specify a custom idempotency key for this request
58+
"""
59+
return self._post(
60+
"/bookkeeping_accounts",
61+
body=maybe_transform(
62+
{
63+
"compliance_category": compliance_category,
64+
"entity_id": entity_id,
65+
"account_id": account_id,
66+
"name": name,
67+
},
68+
bookkeeping_account_create_params.BookkeepingAccountCreateParams,
69+
),
70+
options=make_request_options(
71+
extra_headers=extra_headers,
72+
extra_query=extra_query,
73+
extra_body=extra_body,
74+
timeout=timeout,
75+
idempotency_key=idempotency_key,
76+
),
77+
cast_to=BookkeepingAccount,
78+
)
79+
80+
def list(
81+
self,
82+
*,
83+
cursor: str | NotGiven = NOT_GIVEN,
84+
limit: int | NotGiven = NOT_GIVEN,
85+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
86+
# The extra values given here take precedence over values defined on the client or passed to this method.
87+
extra_headers: Headers | None = None,
88+
extra_query: Query | None = None,
89+
extra_body: Body | None = None,
90+
timeout: float | None | NotGiven = NOT_GIVEN,
91+
) -> SyncPage[BookkeepingAccount]:
92+
"""
93+
List Bookkeeping Accounts
94+
95+
Args:
96+
cursor: Return the page of entries after this one.
97+
98+
limit: Limit the size of the list that is returned. The default (and maximum) is 100
99+
objects.
100+
101+
extra_headers: Send extra headers
102+
103+
extra_query: Add additional query parameters to the request
104+
105+
extra_body: Add additional JSON properties to the request
106+
107+
timeout: Override the client-level default timeout for this request, in seconds
108+
"""
109+
return self._get_api_list(
110+
"/bookkeeping_accounts",
111+
page=SyncPage[BookkeepingAccount],
112+
options=make_request_options(
113+
extra_headers=extra_headers,
114+
extra_query=extra_query,
115+
extra_body=extra_body,
116+
timeout=timeout,
117+
query=maybe_transform(
118+
{
119+
"cursor": cursor,
120+
"limit": limit,
121+
},
122+
bookkeeping_account_list_params.BookkeepingAccountListParams,
123+
),
124+
),
125+
model=BookkeepingAccount,
126+
)
127+
128+
129+
class AsyncBookkeepingAccounts(AsyncAPIResource):
130+
async def create(
131+
self,
132+
*,
133+
name: str,
134+
account_id: str | NotGiven = NOT_GIVEN,
135+
compliance_category: Literal["commingled_cash", "customer_balance"] | NotGiven = NOT_GIVEN,
136+
entity_id: str | NotGiven = NOT_GIVEN,
137+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
138+
# The extra values given here take precedence over values defined on the client or passed to this method.
139+
extra_headers: Headers | None = None,
140+
extra_query: Query | None = None,
141+
extra_body: Body | None = None,
142+
timeout: float | None | NotGiven = NOT_GIVEN,
143+
idempotency_key: str | None = None,
144+
) -> BookkeepingAccount:
145+
"""
146+
Create a Bookkeeping Account
147+
148+
Args:
149+
name: The name you choose for the account.
150+
151+
account_id: The entity, if `compliance_category` is `commingled_cash`.
152+
153+
compliance_category: The account compliance category.
154+
155+
entity_id: The entity, if `compliance_category` is `customer_balance`.
156+
157+
extra_headers: Send extra headers
158+
159+
extra_query: Add additional query parameters to the request
160+
161+
extra_body: Add additional JSON properties to the request
162+
163+
timeout: Override the client-level default timeout for this request, in seconds
164+
165+
idempotency_key: Specify a custom idempotency key for this request
166+
"""
167+
return await self._post(
168+
"/bookkeeping_accounts",
169+
body=maybe_transform(
170+
{
171+
"compliance_category": compliance_category,
172+
"entity_id": entity_id,
173+
"account_id": account_id,
174+
"name": name,
175+
},
176+
bookkeeping_account_create_params.BookkeepingAccountCreateParams,
177+
),
178+
options=make_request_options(
179+
extra_headers=extra_headers,
180+
extra_query=extra_query,
181+
extra_body=extra_body,
182+
timeout=timeout,
183+
idempotency_key=idempotency_key,
184+
),
185+
cast_to=BookkeepingAccount,
186+
)
187+
188+
def list(
189+
self,
190+
*,
191+
cursor: str | NotGiven = NOT_GIVEN,
192+
limit: int | NotGiven = NOT_GIVEN,
193+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
194+
# The extra values given here take precedence over values defined on the client or passed to this method.
195+
extra_headers: Headers | None = None,
196+
extra_query: Query | None = None,
197+
extra_body: Body | None = None,
198+
timeout: float | None | NotGiven = NOT_GIVEN,
199+
) -> AsyncPaginator[BookkeepingAccount, AsyncPage[BookkeepingAccount]]:
200+
"""
201+
List Bookkeeping Accounts
202+
203+
Args:
204+
cursor: Return the page of entries after this one.
205+
206+
limit: Limit the size of the list that is returned. The default (and maximum) is 100
207+
objects.
208+
209+
extra_headers: Send extra headers
210+
211+
extra_query: Add additional query parameters to the request
212+
213+
extra_body: Add additional JSON properties to the request
214+
215+
timeout: Override the client-level default timeout for this request, in seconds
216+
"""
217+
return self._get_api_list(
218+
"/bookkeeping_accounts",
219+
page=AsyncPage[BookkeepingAccount],
220+
options=make_request_options(
221+
extra_headers=extra_headers,
222+
extra_query=extra_query,
223+
extra_body=extra_body,
224+
timeout=timeout,
225+
query=maybe_transform(
226+
{
227+
"cursor": cursor,
228+
"limit": limit,
229+
},
230+
bookkeeping_account_list_params.BookkeepingAccountListParams,
231+
),
232+
),
233+
model=BookkeepingAccount,
234+
)

0 commit comments

Comments
 (0)