Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.22.2"
".": "0.23.0"
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 0.23.0 (2023-11-08)

Full Changelog: [v0.22.2...v0.23.0](https://github.com/lithic-com/lithic-python/compare/v0.22.2...v0.23.0)

### Features

* **client:** support passing httpx.Timeout to method timeout argument ([#234](https://github.com/lithic-com/lithic-python/issues/234)) ([d70cab3](https://github.com/lithic-com/lithic-python/commit/d70cab37a0ef4a4cb76bce9ceb27a0591de65044))


### Bug Fixes

* **api:** correct type for other fees details ([#238](https://github.com/lithic-com/lithic-python/issues/238)) ([3e4efea](https://github.com/lithic-com/lithic-python/commit/3e4efea1d64c2dd51e9884dc7fd270d851424d41))


### Chores

* **docs:** fix github links ([#237](https://github.com/lithic-com/lithic-python/issues/237)) ([d747b8c](https://github.com/lithic-com/lithic-python/commit/d747b8c91d76843003394ccadca00f191fc19f81))
* **internal:** fix some typos ([#236](https://github.com/lithic-com/lithic-python/issues/236)) ([ac40586](https://github.com/lithic-com/lithic-python/commit/ac4058660e21d2a5248fb4f354854be495f533ee))

## 0.22.2 (2023-11-06)

Full Changelog: [v0.22.1...v0.22.2](https://github.com/lithic-com/lithic-python/compare/v0.22.1...v0.22.2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ card = response.parse() # get the object that `cards.create()` would have retur
print(card.token)
```

These methods return an [`APIResponse`](https://github.com/lithic-com/lithic-python/src/lithic/_response.py) object.
These methods return an [`APIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_response.py) object.

### Configuring the HTTP client

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lithic"
version = "0.22.2"
version = "0.23.0"
description = "Client library for the lithic API"
readme = "README.md"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lithic/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ def make_request_options(
extra_query: Query | None = None,
extra_body: Body | None = None,
idempotency_key: str | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
post_parser: PostParser | NotGiven = NOT_GIVEN,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""
Expand Down
4 changes: 2 additions & 2 deletions src/lithic/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def api_status(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> APIStatus:
"""API status check"""
return self.get(
Expand Down Expand Up @@ -584,7 +584,7 @@ async def api_status(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> APIStatus:
"""API status check"""
return await self.get(
Expand Down
6 changes: 3 additions & 3 deletions src/lithic/_utils/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Params(TypedDict, total=False):
return cast(_T, transformed)


def _get_annoted_type(type_: type) -> type | None:
def _get_annotated_type(type_: type) -> type | None:
"""If the given type is an `Annotated` type then it is returned, if not `None` is returned.

This also unwraps the type when applicable, e.g. `Required[Annotated[T, ...]]`
Expand All @@ -115,7 +115,7 @@ def _maybe_transform_key(key: str, type_: type) -> str:

Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata.
"""
annotated_type = _get_annoted_type(type_)
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
# no `Annotated` definition for this type, no transformation needed
return key
Expand Down Expand Up @@ -174,7 +174,7 @@ def _transform_recursive(


def _transform_value(data: object, type_: type) -> object:
annotated_type = _get_annoted_type(type_)
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
return data

Expand Down
2 changes: 1 addition & 1 deletion src/lithic/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless.

__title__ = "lithic"
__version__ = "0.22.2" # x-release-please-version
__version__ = "0.23.0" # x-release-please-version
42 changes: 22 additions & 20 deletions src/lithic/resources/account_holders.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from typing import TYPE_CHECKING, List, overload
from typing_extensions import Literal

import httpx

from ..types import (
AccountHolder,
AccountHolderDocument,
Expand Down Expand Up @@ -53,7 +55,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -135,7 +137,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -191,7 +193,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -277,7 +279,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
return self._post(
Expand Down Expand Up @@ -324,7 +326,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolder:
"""
Get an Individual or Business Account Holder and/or their KYC or KYB evaluation
Expand Down Expand Up @@ -359,7 +361,7 @@ def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolderUpdateResponse:
"""
Expand Down Expand Up @@ -417,7 +419,7 @@ def list_documents(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolderListDocumentsResponse:
"""
Retrieve the status of account holder document uploads, or retrieve the upload
Expand Down Expand Up @@ -465,7 +467,7 @@ def resubmit(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolder:
"""Resubmit a KYC submission.
Expand Down Expand Up @@ -527,7 +529,7 @@ def retrieve_document(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolderDocument:
"""
Check the status of an account holder document upload, or retrieve the upload
Expand Down Expand Up @@ -572,7 +574,7 @@ def upload_document(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolderDocument:
"""
Expand Down Expand Up @@ -650,7 +652,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -732,7 +734,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -788,7 +790,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
"""
Expand Down Expand Up @@ -874,7 +876,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = 300,
timeout: float | httpx.Timeout | None | NotGiven = 300,
idempotency_key: str | None = None,
) -> AccountHolder:
return await self._post(
Expand Down Expand Up @@ -921,7 +923,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolder:
"""
Get an Individual or Business Account Holder and/or their KYC or KYB evaluation
Expand Down Expand Up @@ -956,7 +958,7 @@ async def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolderUpdateResponse:
"""
Expand Down Expand Up @@ -1014,7 +1016,7 @@ async def list_documents(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolderListDocumentsResponse:
"""
Retrieve the status of account holder document uploads, or retrieve the upload
Expand Down Expand Up @@ -1062,7 +1064,7 @@ async def resubmit(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolder:
"""Resubmit a KYC submission.
Expand Down Expand Up @@ -1124,7 +1126,7 @@ async def retrieve_document(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AccountHolderDocument:
"""
Check the status of an account holder document upload, or retrieve the upload
Expand Down Expand Up @@ -1169,7 +1171,7 @@ async def upload_document(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> AccountHolderDocument:
"""
Expand Down
14 changes: 8 additions & 6 deletions src/lithic/resources/accounts/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from datetime import datetime
from typing_extensions import Literal

import httpx

from ...types import Account, account_list_params, account_update_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import maybe_transform
Expand Down Expand Up @@ -44,7 +46,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Account:
"""
Get account configuration such as spend limits.
Expand Down Expand Up @@ -80,7 +82,7 @@ def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> Account:
"""Update account configuration such as spend limits and verification address.
Expand Down Expand Up @@ -156,7 +158,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[Account]:
"""List account configurations.

Expand Down Expand Up @@ -226,7 +228,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Account:
"""
Get account configuration such as spend limits.
Expand Down Expand Up @@ -262,7 +264,7 @@ async def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
) -> Account:
"""Update account configuration such as spend limits and verification address.
Expand Down Expand Up @@ -338,7 +340,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[Account, AsyncCursorPage[Account]]:
"""List account configurations.

Expand Down
Loading