Skip to content

Commit 97f0128

Browse files
feat(api): add WIRE_DRAWDOWN_REQUEST transfer type
docs(api): clarify description of token / retry_token when it serves as idempotency key feat(api): remove unnecessary X-Lithic-Pagination header
1 parent b87046c commit 97f0128

File tree

10 files changed

+32
-22
lines changed

10 files changed

+32
-22
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: 175
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1916ba0e95ce59f0feeebd6f3d2130990c812be7eabcda6e23c5fa096db912c7.yml
3-
openapi_spec_hash: b465e7cb5c2dee36b5bdc6d540b2a530
4-
config_hash: a8a802e2c916a5d36a025bf64ab55ee7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-854de7cc8f79e150ffe98f038ce9f39367010b2bdfffc9992be2738697dc4880.yml
3+
openapi_spec_hash: fd471b20f3eda1e00cdebf028cbfe867
4+
config_hash: 9dddee5f7af579864599849cb28a0770

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -338,20 +338,6 @@ On timeout, an `APITimeoutError` is thrown.
338338

339339
Note that requests that time out are [retried twice by default](#retries).
340340

341-
## Default Headers
342-
343-
We automatically send the `X-Lithic-Pagination` header set to `cursor`.
344-
345-
If you need to, you can override it by setting default headers per-request or on the client object.
346-
347-
```python
348-
from lithic import Lithic
349-
350-
client = Lithic(
351-
default_headers={"X-Lithic-Pagination": "My-Custom-Value"},
352-
)
353-
```
354-
355341
## Advanced
356342

357343
### Logging

src/lithic/_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ def default_headers(self) -> dict[str, str | Omit]:
417417
return {
418418
**super().default_headers,
419419
"X-Stainless-Async": "false",
420-
"X-Lithic-Pagination": "cursor",
421420
**self._custom_headers,
422421
}
423422

@@ -827,7 +826,6 @@ def default_headers(self) -> dict[str, str | Omit]:
827826
return {
828827
**super().default_headers,
829828
"X-Stainless-Async": f"async:{get_async_library()}",
830-
"X-Lithic-Pagination": "cursor",
831829
**self._custom_headers,
832830
}
833831

src/lithic/resources/book_transfers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ def retry(
318318
Retry a book transfer that has been declined
319319
320320
Args:
321-
retry_token: Globally unique identifier for the retry.
321+
retry_token: Customer-provided token that will serve as an idempotency token. This token will
322+
become the transaction token.
322323
323324
extra_headers: Send extra headers
324325
@@ -672,7 +673,8 @@ async def retry(
672673
Retry a book transfer that has been declined
673674
674675
Args:
675-
retry_token: Globally unique identifier for the retry.
676+
retry_token: Customer-provided token that will serve as an idempotency token. This token will
677+
become the transaction token.
676678
677679
extra_headers: Send extra headers
678680

src/lithic/resources/external_payments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def create(
7474
Create external payment
7575
7676
Args:
77+
token: Customer-provided token that will serve as an idempotency token. This token will
78+
become the transaction token.
79+
7780
extra_headers: Send extra headers
7881
7982
extra_query: Add additional query parameters to the request
@@ -449,6 +452,9 @@ async def create(
449452
Create external payment
450453
451454
Args:
455+
token: Customer-provided token that will serve as an idempotency token. This token will
456+
become the transaction token.
457+
452458
extra_headers: Send extra headers
453459
454460
extra_query: Add additional query parameters to the request

src/lithic/resources/management_operations.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def create(
103103
Create management operation
104104
105105
Args:
106+
token: Customer-provided token that will serve as an idempotency token. This token will
107+
become the transaction token.
108+
106109
on_closed_account: What to do if the financial account is closed when posting an operation
107110
108111
extra_headers: Send extra headers
@@ -380,6 +383,9 @@ async def create(
380383
Create management operation
381384
382385
Args:
386+
token: Customer-provided token that will serve as an idempotency token. This token will
387+
become the transaction token.
388+
383389
on_closed_account: What to do if the financial account is closed when posting an operation
384390
385391
extra_headers: Send extra headers

src/lithic/types/book_transfer_retry_params.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99

1010
class BookTransferRetryParams(TypedDict, total=False):
1111
retry_token: Required[str]
12-
"""Globally unique identifier for the retry."""
12+
"""Customer-provided token that will serve as an idempotency token.
13+
14+
This token will become the transaction token.
15+
"""

src/lithic/types/external_payment_create_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class ExternalPaymentCreateParams(TypedDict, total=False):
2727
payment_type: Required[Literal["DEPOSIT", "WITHDRAWAL"]]
2828

2929
token: str
30+
"""Customer-provided token that will serve as an idempotency token.
31+
32+
This token will become the transaction token.
33+
"""
3034

3135
memo: str
3236

src/lithic/types/management_operation_create_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class ManagementOperationCreateParams(TypedDict, total=False):
6161
financial_account_token: Required[str]
6262

6363
token: str
64+
"""Customer-provided token that will serve as an idempotency token.
65+
66+
This token will become the transaction token.
67+
"""
6468

6569
memo: str
6670

src/lithic/types/payment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ class Payment(BaseModel):
253253
"WIRE_INBOUND_ADMIN",
254254
"WIRE_OUTBOUND_PAYMENT",
255255
"WIRE_OUTBOUND_ADMIN",
256+
"WIRE_DRAWDOWN_REQUEST",
256257
]
257258
] = None
258259

0 commit comments

Comments
 (0)