Skip to content

Commit 41e5b11

Browse files
feat(api): adds Event types for additional API resources
1 parent eb1cfd7 commit 41e5b11

13 files changed

+598
-28
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 168
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aca56b6e4da5b97e586e66392dd3cf433208cb964e25081a661dd41cf456a88a.yml
3-
openapi_spec_hash: 297b9f330d31db8e5832463a0ce455ba
4-
config_hash: 99dad20b4a7d4a1390670762b9da4231
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e16df7d65a6ababc8e0ca1f2a65070893d82d3b2b046394ab708d56fe717b3ad.yml
3+
openapi_spec_hash: ee82cf8fd5bb6b86abbae304f6c43934
4+
config_hash: c6d56596249e319c59d49d8e49a190b1

src/lithic/resources/account_activity.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def with_streaming_response(self) -> AccountActivityWithStreamingResponse:
4646
def list(
4747
self,
4848
*,
49+
account_token: str | NotGiven = NOT_GIVEN,
4950
begin: Union[str, datetime] | NotGiven = NOT_GIVEN,
5051
business_account_token: str | NotGiven = NOT_GIVEN,
5152
category: Literal[
@@ -83,6 +84,8 @@ def list(
8384
Retrieve a list of transactions across all public accounts.
8485
8586
Args:
87+
account_token: Filter by account token
88+
8689
begin: Date string in RFC 3339 format. Only entries created after the specified time
8790
will be included. UTC time zone.
8891
@@ -125,6 +128,7 @@ def list(
125128
timeout=timeout,
126129
query=maybe_transform(
127130
{
131+
"account_token": account_token,
128132
"begin": begin,
129133
"business_account_token": business_account_token,
130134
"category": category,
@@ -206,6 +210,7 @@ def with_streaming_response(self) -> AsyncAccountActivityWithStreamingResponse:
206210
def list(
207211
self,
208212
*,
213+
account_token: str | NotGiven = NOT_GIVEN,
209214
begin: Union[str, datetime] | NotGiven = NOT_GIVEN,
210215
business_account_token: str | NotGiven = NOT_GIVEN,
211216
category: Literal[
@@ -243,6 +248,8 @@ def list(
243248
Retrieve a list of transactions across all public accounts.
244249
245250
Args:
251+
account_token: Filter by account token
252+
246253
begin: Date string in RFC 3339 format. Only entries created after the specified time
247254
will be included. UTC time zone.
248255
@@ -285,6 +292,7 @@ def list(
285292
timeout=timeout,
286293
query=maybe_transform(
287294
{
295+
"account_token": account_token,
288296
"begin": begin,
289297
"business_account_token": business_account_token,
290298
"category": category,

src/lithic/resources/book_transfers.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def create(
8686
"TRANSFER",
8787
],
8888
token: str | NotGiven = NOT_GIVEN,
89+
external_id: str | NotGiven = NOT_GIVEN,
8990
memo: str | NotGiven = NOT_GIVEN,
91+
on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN,
9092
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9193
# The extra values given here take precedence over values defined on the client or passed to this method.
9294
extra_headers: Headers | None = None,
@@ -99,7 +101,7 @@ def create(
99101
account and card
100102
101103
Args:
102-
amount: Amount to be transferred in the currencys smallest unit (e.g., cents for USD).
104+
amount: Amount to be transferred in the currency's smallest unit (e.g., cents for USD).
103105
This should always be a positive value.
104106
105107
category: Category of the book transfer
@@ -112,13 +114,17 @@ def create(
112114
to_financial_account_token: Globally unique identifier for the financial account or card that will receive
113115
the funds. Accepted type dependent on the program's use case.
114116
115-
type: Type of book_transfer
117+
type: Type of the book transfer
116118
117119
token: Customer-provided token that will serve as an idempotency token. This token will
118120
become the transaction token.
119121
122+
external_id: External ID defined by the customer
123+
120124
memo: Optional descriptor for the transfer.
121125
126+
on_closed_account: What to do if the financial account is closed when posting an operation
127+
122128
extra_headers: Send extra headers
123129
124130
extra_query: Add additional query parameters to the request
@@ -138,7 +144,9 @@ def create(
138144
"to_financial_account_token": to_financial_account_token,
139145
"type": type,
140146
"token": token,
147+
"external_id": external_id,
141148
"memo": memo,
149+
"on_closed_account": on_closed_account,
142150
},
143151
book_transfer_create_params.BookTransferCreateParams,
144152
),
@@ -373,7 +381,9 @@ async def create(
373381
"TRANSFER",
374382
],
375383
token: str | NotGiven = NOT_GIVEN,
384+
external_id: str | NotGiven = NOT_GIVEN,
376385
memo: str | NotGiven = NOT_GIVEN,
386+
on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN,
377387
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
378388
# The extra values given here take precedence over values defined on the client or passed to this method.
379389
extra_headers: Headers | None = None,
@@ -386,7 +396,7 @@ async def create(
386396
account and card
387397
388398
Args:
389-
amount: Amount to be transferred in the currencys smallest unit (e.g., cents for USD).
399+
amount: Amount to be transferred in the currency's smallest unit (e.g., cents for USD).
390400
This should always be a positive value.
391401
392402
category: Category of the book transfer
@@ -399,13 +409,17 @@ async def create(
399409
to_financial_account_token: Globally unique identifier for the financial account or card that will receive
400410
the funds. Accepted type dependent on the program's use case.
401411
402-
type: Type of book_transfer
412+
type: Type of the book transfer
403413
404414
token: Customer-provided token that will serve as an idempotency token. This token will
405415
become the transaction token.
406416
417+
external_id: External ID defined by the customer
418+
407419
memo: Optional descriptor for the transfer.
408420
421+
on_closed_account: What to do if the financial account is closed when posting an operation
422+
409423
extra_headers: Send extra headers
410424
411425
extra_query: Add additional query parameters to the request
@@ -425,7 +439,9 @@ async def create(
425439
"to_financial_account_token": to_financial_account_token,
426440
"type": type,
427441
"token": token,
442+
"external_id": external_id,
428443
"memo": memo,
444+
"on_closed_account": on_closed_account,
429445
},
430446
book_transfer_create_params.BookTransferCreateParams,
431447
),

src/lithic/types/account_activity_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313

1414
class AccountActivityListParams(TypedDict, total=False):
15+
account_token: str
16+
"""Filter by account token"""
17+
1518
begin: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
1619
"""Date string in RFC 3339 format.
1720

0 commit comments

Comments
 (0)