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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 134
configured_endpoints: 137
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,15 @@ See the httpx documentation for information about the [`proxies`](https://www.py

By default we will close the underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__) is called but you can also manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

## Status
## Versioning

This package is in beta. Its internals and interfaces are not stable and subject to change without a major semver bump;
please reach out if you rely on any undocumented behavior.
This package generally attempts to follow [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes that only affect static types, without breaking runtime behavior.
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
3. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions.

Expand Down
19 changes: 19 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ Methods:
- <code title="get /card_profiles/{card_profile_id}">client.card_profiles.<a href="./src/increase/resources/card_profiles.py">retrieve</a>(card_profile_id) -> <a href="./src/increase/types/card_profile.py">CardProfile</a></code>
- <code title="get /card_profiles">client.card_profiles.<a href="./src/increase/resources/card_profiles.py">list</a>(\*\*<a href="src/increase/types/card_profile_list_params.py">params</a>) -> <a href="./src/increase/types/card_profile.py">SyncPage[CardProfile]</a></code>

# CardPurchaseSupplements

Types:

```python
from increase.types import CardPurchaseSupplement
```

Methods:

- <code title="get /card_purchase_supplements/{card_purchase_supplement_id}">client.card_purchase_supplements.<a href="./src/increase/resources/card_purchase_supplements.py">retrieve</a>(card_purchase_supplement_id) -> <a href="./src/increase/types/card_purchase_supplement.py">CardPurchaseSupplement</a></code>
- <code title="get /card_purchase_supplements">client.card_purchase_supplements.<a href="./src/increase/resources/card_purchase_supplements.py">list</a>(\*\*<a href="src/increase/types/card_purchase_supplement_list_params.py">params</a>) -> <a href="./src/increase/types/card_purchase_supplement.py">SyncPage[CardPurchaseSupplement]</a></code>

# ExternalAccounts

Types:
Expand Down Expand Up @@ -386,6 +399,12 @@ Methods:
- <code title="get /entities/{entity_id}">client.entities.<a href="./src/increase/resources/entities/entities.py">retrieve</a>(entity_id) -> <a href="./src/increase/types/entity.py">Entity</a></code>
- <code title="get /entities">client.entities.<a href="./src/increase/resources/entities/entities.py">list</a>(\*\*<a href="src/increase/types/entity_list_params.py">params</a>) -> <a href="./src/increase/types/entity.py">SyncPage[Entity]</a></code>

## BeneficialOwners

Methods:

- <code title="post /entities/{entity_id}/beneficial_owners">client.entities.beneficial_owners.<a href="./src/increase/resources/entities/beneficial_owners.py">create</a>(entity_id, \*\*<a href="src/increase/types/entities/beneficial_owner_create_params.py">params</a>) -> <a href="./src/increase/types/entity.py">Entity</a></code>

## SupplementalDocuments

Types:
Expand Down
151 changes: 96 additions & 55 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ distro = ">= 1.7.0, < 2"

[tool.poetry.group.dev.dependencies]
pyright = "1.1.318"
mypy = "1.1.1"
mypy = "1.4.1"
black = "22.10.0"
respx = "0.19.2"
pytest = "7.1.1"
pytest-asyncio = "0.18.3"
ruff = "0.0.239"
ruff = "0.0.282"
isort = "5.10.1"
time-machine = "^2.9.0"

Expand Down
4 changes: 4 additions & 0 deletions src/increase/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Increase(SyncAPIClient):
cards: resources.Cards
card_disputes: resources.CardDisputes
card_profiles: resources.CardProfiles
card_purchase_supplements: resources.CardPurchaseSupplements
external_accounts: resources.ExternalAccounts
exports: resources.Exports
digital_wallet_tokens: resources.DigitalWalletTokens
Expand Down Expand Up @@ -167,6 +168,7 @@ def __init__(
self.cards = resources.Cards(self)
self.card_disputes = resources.CardDisputes(self)
self.card_profiles = resources.CardProfiles(self)
self.card_purchase_supplements = resources.CardPurchaseSupplements(self)
self.external_accounts = resources.ExternalAccounts(self)
self.exports = resources.Exports(self)
self.digital_wallet_tokens = resources.DigitalWalletTokens(self)
Expand Down Expand Up @@ -343,6 +345,7 @@ class AsyncIncrease(AsyncAPIClient):
cards: resources.AsyncCards
card_disputes: resources.AsyncCardDisputes
card_profiles: resources.AsyncCardProfiles
card_purchase_supplements: resources.AsyncCardPurchaseSupplements
external_accounts: resources.AsyncExternalAccounts
exports: resources.AsyncExports
digital_wallet_tokens: resources.AsyncDigitalWalletTokens
Expand Down Expand Up @@ -447,6 +450,7 @@ def __init__(
self.cards = resources.AsyncCards(self)
self.card_disputes = resources.AsyncCardDisputes(self)
self.card_profiles = resources.AsyncCardProfiles(self)
self.card_purchase_supplements = resources.AsyncCardPurchaseSupplements(self)
self.external_accounts = resources.AsyncExternalAccounts(self)
self.exports = resources.AsyncExports(self)
self.digital_wallet_tokens = resources.AsyncDigitalWalletTokens(self)
Expand Down
6 changes: 6 additions & 0 deletions src/increase/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
from .digital_wallet_tokens import DigitalWalletTokens, AsyncDigitalWalletTokens
from .bookkeeping_entry_sets import BookkeepingEntrySets, AsyncBookkeepingEntrySets
from .wire_drawdown_requests import WireDrawdownRequests, AsyncWireDrawdownRequests
from .card_purchase_supplements import (
CardPurchaseSupplements,
AsyncCardPurchaseSupplements,
)
from .inbound_ach_transfer_returns import (
InboundACHTransferReturns,
AsyncInboundACHTransferReturns,
Expand Down Expand Up @@ -71,6 +75,8 @@
"AsyncCardDisputes",
"CardProfiles",
"AsyncCardProfiles",
"CardPurchaseSupplements",
"AsyncCardPurchaseSupplements",
"ExternalAccounts",
"AsyncExternalAccounts",
"Exports",
Expand Down
192 changes: 192 additions & 0 deletions src/increase/resources/card_purchase_supplements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# File generated from our OpenAPI spec by Stainless.

from __future__ import annotations

from ..types import CardPurchaseSupplement, card_purchase_supplement_list_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform
from .._resource import SyncAPIResource, AsyncAPIResource
from ..pagination import SyncPage, AsyncPage
from .._base_client import AsyncPaginator, make_request_options

__all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"]


class CardPurchaseSupplements(SyncAPIResource):
def retrieve(
self,
card_purchase_supplement_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> CardPurchaseSupplement:
"""
Retrieve a Card Purchase Supplement

Args:
card_purchase_supplement_id: The identifier of the Card Purchase Supplement.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
f"/card_purchase_supplements/{card_purchase_supplement_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=CardPurchaseSupplement,
)

def list(
self,
*,
card_payment_id: str | NotGiven = NOT_GIVEN,
created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> SyncPage[CardPurchaseSupplement]:
"""
List Card Purchase Supplements

Args:
card_payment_id: Filter Card Purchase Supplements to ones belonging to the specified Card
Payment.

cursor: Return the page of entries after this one.

limit: Limit the size of the list that is returned. The default (and maximum) is 100
objects.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/card_purchase_supplements",
page=SyncPage[CardPurchaseSupplement],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"card_payment_id": card_payment_id,
"created_at": created_at,
"cursor": cursor,
"limit": limit,
},
card_purchase_supplement_list_params.CardPurchaseSupplementListParams,
),
),
model=CardPurchaseSupplement,
)


class AsyncCardPurchaseSupplements(AsyncAPIResource):
async def retrieve(
self,
card_purchase_supplement_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> CardPurchaseSupplement:
"""
Retrieve a Card Purchase Supplement

Args:
card_purchase_supplement_id: The identifier of the Card Purchase Supplement.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
f"/card_purchase_supplements/{card_purchase_supplement_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=CardPurchaseSupplement,
)

def list(
self,
*,
card_payment_id: str | NotGiven = NOT_GIVEN,
created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[CardPurchaseSupplement, AsyncPage[CardPurchaseSupplement]]:
"""
List Card Purchase Supplements

Args:
card_payment_id: Filter Card Purchase Supplements to ones belonging to the specified Card
Payment.

cursor: Return the page of entries after this one.

limit: Limit the size of the list that is returned. The default (and maximum) is 100
objects.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/card_purchase_supplements",
page=AsyncPage[CardPurchaseSupplement],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"card_payment_id": card_payment_id,
"created_at": created_at,
"cursor": cursor,
"limit": limit,
},
card_purchase_supplement_list_params.CardPurchaseSupplementListParams,
),
),
model=CardPurchaseSupplement,
)
10 changes: 9 additions & 1 deletion src/increase/resources/entities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# File generated from our OpenAPI spec by Stainless.

from .entities import Entities, AsyncEntities
from .beneficial_owners import BeneficialOwners, AsyncBeneficialOwners
from .supplemental_documents import SupplementalDocuments, AsyncSupplementalDocuments

__all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments", "Entities", "AsyncEntities"]
__all__ = [
"BeneficialOwners",
"AsyncBeneficialOwners",
"SupplementalDocuments",
"AsyncSupplementalDocuments",
"Entities",
"AsyncEntities",
]
Loading