Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.79.0 #629

Merged
merged 2 commits into from
Nov 14, 2024
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.78.1"
".": "0.79.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 148
configured_endpoints: 150
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.79.0 (2024-11-14)

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

### Features

* **api:** adds PrimeRates API ([#628](https://github.com/lithic-com/lithic-python/issues/628)) ([f0a2272](https://github.com/lithic-com/lithic-python/commit/f0a22728c090d593b483c562c61adaa71cd0221e))

## 0.78.1 (2024-11-12)

Full Changelog: [v0.78.0...v0.78.1](https://github.com/lithic-com/lithic-python/compare/v0.78.0...v0.78.1)
Expand Down
15 changes: 14 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,20 @@ from lithic.types.credit_products import ExtendedCredit

Methods:

- <code title="get /v1/credit_products/{credit_product_id}/extended_credit">client.credit_products.extended_credit.<a href="./src/lithic/resources/credit_products/extended_credit.py">retrieve</a>(credit_product_id) -> <a href="./src/lithic/types/credit_products/extended_credit.py">ExtendedCredit</a></code>
- <code title="get /v1/credit_products/{credit_product_token}/extended_credit">client.credit_products.extended_credit.<a href="./src/lithic/resources/credit_products/extended_credit.py">retrieve</a>(credit_product_token) -> <a href="./src/lithic/types/credit_products/extended_credit.py">ExtendedCredit</a></code>

## PrimeRates

Types:

```python
from lithic.types.credit_products import PrimeRateRetrieveResponse
```

Methods:

- <code title="post /v1/credit_products/{credit_product_token}/prime_rates">client.credit_products.prime_rates.<a href="./src/lithic/resources/credit_products/prime_rates.py">create</a>(credit_product_token, \*\*<a href="src/lithic/types/credit_products/prime_rate_create_params.py">params</a>) -> None</code>
- <code title="get /v1/credit_products/{credit_product_token}/prime_rates">client.credit_products.prime_rates.<a href="./src/lithic/resources/credit_products/prime_rates.py">retrieve</a>(credit_product_token, \*\*<a href="src/lithic/types/credit_products/prime_rate_retrieve_params.py">params</a>) -> <a href="./src/lithic/types/credit_products/prime_rate_retrieve_response.py">PrimeRateRetrieveResponse</a></code>

# ExternalPayments

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.78.1"
version = "0.79.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
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. See CONTRIBUTING.md for details.

__title__ = "lithic"
__version__ = "0.78.1" # x-release-please-version
__version__ = "0.79.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/lithic/resources/credit_products/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .prime_rates import (
PrimeRates,
AsyncPrimeRates,
PrimeRatesWithRawResponse,
AsyncPrimeRatesWithRawResponse,
PrimeRatesWithStreamingResponse,
AsyncPrimeRatesWithStreamingResponse,
)
from .credit_products import (
CreditProducts,
AsyncCreditProducts,
Expand All @@ -24,6 +32,12 @@
"AsyncExtendedCreditResourceWithRawResponse",
"ExtendedCreditResourceWithStreamingResponse",
"AsyncExtendedCreditResourceWithStreamingResponse",
"PrimeRates",
"AsyncPrimeRates",
"PrimeRatesWithRawResponse",
"AsyncPrimeRatesWithRawResponse",
"PrimeRatesWithStreamingResponse",
"AsyncPrimeRatesWithStreamingResponse",
"CreditProducts",
"AsyncCreditProducts",
"CreditProductsWithRawResponse",
Expand Down
32 changes: 32 additions & 0 deletions src/lithic/resources/credit_products/credit_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from .prime_rates import (
PrimeRates,
AsyncPrimeRates,
PrimeRatesWithRawResponse,
AsyncPrimeRatesWithRawResponse,
PrimeRatesWithStreamingResponse,
AsyncPrimeRatesWithStreamingResponse,
)
from .extended_credit import (
ExtendedCreditResource,
AsyncExtendedCreditResource,
Expand All @@ -21,6 +29,10 @@ class CreditProducts(SyncAPIResource):
def extended_credit(self) -> ExtendedCreditResource:
return ExtendedCreditResource(self._client)

@cached_property
def prime_rates(self) -> PrimeRates:
return PrimeRates(self._client)

@cached_property
def with_raw_response(self) -> CreditProductsWithRawResponse:
"""
Expand All @@ -46,6 +58,10 @@ class AsyncCreditProducts(AsyncAPIResource):
def extended_credit(self) -> AsyncExtendedCreditResource:
return AsyncExtendedCreditResource(self._client)

@cached_property
def prime_rates(self) -> AsyncPrimeRates:
return AsyncPrimeRates(self._client)

@cached_property
def with_raw_response(self) -> AsyncCreditProductsWithRawResponse:
"""
Expand Down Expand Up @@ -74,6 +90,10 @@ def __init__(self, credit_products: CreditProducts) -> None:
def extended_credit(self) -> ExtendedCreditResourceWithRawResponse:
return ExtendedCreditResourceWithRawResponse(self._credit_products.extended_credit)

@cached_property
def prime_rates(self) -> PrimeRatesWithRawResponse:
return PrimeRatesWithRawResponse(self._credit_products.prime_rates)


class AsyncCreditProductsWithRawResponse:
def __init__(self, credit_products: AsyncCreditProducts) -> None:
Expand All @@ -83,6 +103,10 @@ def __init__(self, credit_products: AsyncCreditProducts) -> None:
def extended_credit(self) -> AsyncExtendedCreditResourceWithRawResponse:
return AsyncExtendedCreditResourceWithRawResponse(self._credit_products.extended_credit)

@cached_property
def prime_rates(self) -> AsyncPrimeRatesWithRawResponse:
return AsyncPrimeRatesWithRawResponse(self._credit_products.prime_rates)


class CreditProductsWithStreamingResponse:
def __init__(self, credit_products: CreditProducts) -> None:
Expand All @@ -92,6 +116,10 @@ def __init__(self, credit_products: CreditProducts) -> None:
def extended_credit(self) -> ExtendedCreditResourceWithStreamingResponse:
return ExtendedCreditResourceWithStreamingResponse(self._credit_products.extended_credit)

@cached_property
def prime_rates(self) -> PrimeRatesWithStreamingResponse:
return PrimeRatesWithStreamingResponse(self._credit_products.prime_rates)


class AsyncCreditProductsWithStreamingResponse:
def __init__(self, credit_products: AsyncCreditProducts) -> None:
Expand All @@ -100,3 +128,7 @@ def __init__(self, credit_products: AsyncCreditProducts) -> None:
@cached_property
def extended_credit(self) -> AsyncExtendedCreditResourceWithStreamingResponse:
return AsyncExtendedCreditResourceWithStreamingResponse(self._credit_products.extended_credit)

@cached_property
def prime_rates(self) -> AsyncPrimeRatesWithStreamingResponse:
return AsyncPrimeRatesWithStreamingResponse(self._credit_products.prime_rates)
20 changes: 12 additions & 8 deletions src/lithic/resources/credit_products/extended_credit.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def with_streaming_response(self) -> ExtendedCreditResourceWithStreamingResponse

def retrieve(
self,
credit_product_id: str,
credit_product_token: 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.
Expand All @@ -58,10 +58,12 @@ def retrieve(

timeout: Override the client-level default timeout for this request, in seconds
"""
if not credit_product_id:
raise ValueError(f"Expected a non-empty value for `credit_product_id` but received {credit_product_id!r}")
if not credit_product_token:
raise ValueError(
f"Expected a non-empty value for `credit_product_token` but received {credit_product_token!r}"
)
return self._get(
f"/v1/credit_products/{credit_product_id}/extended_credit",
f"/v1/credit_products/{credit_product_token}/extended_credit",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -91,7 +93,7 @@ def with_streaming_response(self) -> AsyncExtendedCreditResourceWithStreamingRes

async def retrieve(
self,
credit_product_id: str,
credit_product_token: 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.
Expand All @@ -112,10 +114,12 @@ async def retrieve(

timeout: Override the client-level default timeout for this request, in seconds
"""
if not credit_product_id:
raise ValueError(f"Expected a non-empty value for `credit_product_id` but received {credit_product_id!r}")
if not credit_product_token:
raise ValueError(
f"Expected a non-empty value for `credit_product_token` but received {credit_product_token!r}"
)
return await self._get(
f"/v1/credit_products/{credit_product_id}/extended_credit",
f"/v1/credit_products/{credit_product_token}/extended_credit",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
Loading