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
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/lithic-python'
timeout-minutes: 10
name: upload
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

test:
timeout-minutes: 10
name: test
Expand Down
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.92.0"
".": "0.93.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 156
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-9580d7ed7ee603cba3dd0db9bb1ee48094dfe2a90c1ca13a7f10ab8deaa73e2c.yml
openapi_spec_hash: 6f707e3df699aec761f20db720fb3a32
config_hash: dc221a354631e360e545ebb7435ecd35
configured_endpoints: 160
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-025f40c854a9485cf316c9058f9cc5fa37f069add30e409d49ab93f2e166f4fb.yml
openapi_spec_hash: a9391f3a54b8db5d5df40169de8c645c
config_hash: fa3481d1d8505e4157f6cebe93211bd0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.93.0 (2025-05-15)

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

### Features

* **api:** new Funding Events and Card Web Provision API's ([324431e](https://github.com/lithic-com/lithic-python/commit/324431e3c83e7d89f93306900efb800ce1d9a594))


### Chores

* **ci:** fix installation instructions ([bd69296](https://github.com/lithic-com/lithic-python/commit/bd6929642e12a8dac9a208163def5f331a8dc6a9))
* **ci:** upload sdks to package manager ([0882964](https://github.com/lithic-com/lithic-python/commit/0882964277d7cf21b177f2088c00e2c79d312b45))

## 0.92.0 (2025-05-12)

Full Changelog: [v0.91.2...v0.92.0](https://github.com/lithic-com/lithic-python/compare/v0.91.2...v0.92.0)
Expand Down
20 changes: 20 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ from lithic.types import (
SpendLimitDuration,
CardEmbedResponse,
CardProvisionResponse,
CardWebProvisionResponse,
)
```

Expand All @@ -200,6 +201,7 @@ Methods:
- <code title="post /v1/cards/{card_token}/renew">client.cards.<a href="./src/lithic/resources/cards/cards.py">renew</a>(card_token, \*\*<a href="src/lithic/types/card_renew_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /v1/cards/{card_token}/spend_limits">client.cards.<a href="./src/lithic/resources/cards/cards.py">retrieve_spend_limits</a>(card_token) -> <a href="./src/lithic/types/card_spend_limits.py">CardSpendLimits</a></code>
- <code title="post /v1/cards/search_by_pan">client.cards.<a href="./src/lithic/resources/cards/cards.py">search_by_pan</a>(\*\*<a href="src/lithic/types/card_search_by_pan_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="post /v1/cards/{card_token}/web_provision">client.cards.<a href="./src/lithic/resources/cards/cards.py">web_provision</a>(card_token, \*\*<a href="src/lithic/types/card_web_provision_params.py">params</a>) -> <a href="./src/lithic/types/card_web_provision_response.py">CardWebProvisionResponse</a></code>
- <code>client.cards.<a href="./src/lithic/resources/cards/cards.py">get_embed_html</a>(\*args) -> str</code>
- <code>client.cards.<a href="./src/lithic/resources/cards/cards.py">get_embed_url</a>(\*args) -> URL</code>

Expand Down Expand Up @@ -713,3 +715,21 @@ Methods:
- <code title="get /v1/management_operations/{management_operation_token}">client.management_operations.<a href="./src/lithic/resources/management_operations.py">retrieve</a>(management_operation_token) -> <a href="./src/lithic/types/management_operation_transaction.py">ManagementOperationTransaction</a></code>
- <code title="get /v1/management_operations">client.management_operations.<a href="./src/lithic/resources/management_operations.py">list</a>(\*\*<a href="src/lithic/types/management_operation_list_params.py">params</a>) -> <a href="./src/lithic/types/management_operation_transaction.py">SyncCursorPage[ManagementOperationTransaction]</a></code>
- <code title="post /v1/management_operations/{management_operation_token}/reverse">client.management_operations.<a href="./src/lithic/resources/management_operations.py">reverse</a>(management_operation_token, \*\*<a href="src/lithic/types/management_operation_reverse_params.py">params</a>) -> <a href="./src/lithic/types/management_operation_transaction.py">ManagementOperationTransaction</a></code>

# FundingEvents

Types:

```python
from lithic.types import (
FundingEventRetrieveResponse,
FundingEventListResponse,
FundingEventRetrieveDetailsResponse,
)
```

Methods:

- <code title="get /v1/funding_events/{funding_event_token}">client.funding_events.<a href="./src/lithic/resources/funding_events.py">retrieve</a>(funding_event_token) -> <a href="./src/lithic/types/funding_event_retrieve_response.py">FundingEventRetrieveResponse</a></code>
- <code title="get /v1/funding_events">client.funding_events.<a href="./src/lithic/resources/funding_events.py">list</a>(\*\*<a href="src/lithic/types/funding_event_list_params.py">params</a>) -> <a href="./src/lithic/types/funding_event_list_response.py">SyncCursorPage[FundingEventListResponse]</a></code>
- <code title="get /v1/funding_events/{funding_event_token}/details">client.funding_events.<a href="./src/lithic/resources/funding_events.py">retrieve_details</a>(funding_event_token) -> <a href="./src/lithic/types/funding_event_retrieve_details_response.py">FundingEventRetrieveDetailsResponse</a></code>
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.92.0"
version = "0.93.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
25 changes: 25 additions & 0 deletions scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -exuo pipefail

RESPONSE=$(curl -X POST "$URL" \
-H "Authorization: Bearer $AUTH" \
-H "Content-Type: application/json")

SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url')

if [[ "$SIGNED_URL" == "null" ]]; then
echo -e "\033[31mFailed to get signed URL.\033[0m"
exit 1
fi

UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
-H "Content-Type: application/gzip" \
--data-binary @- "$SIGNED_URL" 2>&1)

if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/lithic-python/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
fi
38 changes: 38 additions & 0 deletions src/lithic/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
card_programs,
tokenizations,
book_transfers,
funding_events,
account_holders,
credit_products,
digital_card_art,
Expand All @@ -73,6 +74,7 @@
from .resources.events.events import Events, AsyncEvents
from .resources.tokenizations import Tokenizations, AsyncTokenizations
from .resources.book_transfers import BookTransfers, AsyncBookTransfers
from .resources.funding_events import FundingEvents, AsyncFundingEvents
from .resources.account_holders import AccountHolders, AsyncAccountHolders
from .resources.reports.reports import Reports, AsyncReports
from .resources.digital_card_art import DigitalCardArtResource, AsyncDigitalCardArtResource
Expand Down Expand Up @@ -338,6 +340,12 @@ def management_operations(self) -> ManagementOperations:

return ManagementOperations(self)

@cached_property
def funding_events(self) -> FundingEvents:
from .resources.funding_events import FundingEvents

return FundingEvents(self)

@cached_property
def webhooks(self) -> webhooks.Webhooks:
from .resources.webhooks import Webhooks
Expand Down Expand Up @@ -712,6 +720,12 @@ def management_operations(self) -> AsyncManagementOperations:

return AsyncManagementOperations(self)

@cached_property
def funding_events(self) -> AsyncFundingEvents:
from .resources.funding_events import AsyncFundingEvents

return AsyncFundingEvents(self)

@cached_property
def webhooks(self) -> webhooks.AsyncWebhooks:
from .resources.webhooks import AsyncWebhooks
Expand Down Expand Up @@ -1009,6 +1023,12 @@ def management_operations(self) -> management_operations.ManagementOperationsWit

return ManagementOperationsWithRawResponse(self._client.management_operations)

@cached_property
def funding_events(self) -> funding_events.FundingEventsWithRawResponse:
from .resources.funding_events import FundingEventsWithRawResponse

return FundingEventsWithRawResponse(self._client.funding_events)


class AsyncLithicWithRawResponse:
_client: AsyncLithic
Expand Down Expand Up @@ -1164,6 +1184,12 @@ def management_operations(self) -> management_operations.AsyncManagementOperatio

return AsyncManagementOperationsWithRawResponse(self._client.management_operations)

@cached_property
def funding_events(self) -> funding_events.AsyncFundingEventsWithRawResponse:
from .resources.funding_events import AsyncFundingEventsWithRawResponse

return AsyncFundingEventsWithRawResponse(self._client.funding_events)


class LithicWithStreamedResponse:
_client: Lithic
Expand Down Expand Up @@ -1319,6 +1345,12 @@ def management_operations(self) -> management_operations.ManagementOperationsWit

return ManagementOperationsWithStreamingResponse(self._client.management_operations)

@cached_property
def funding_events(self) -> funding_events.FundingEventsWithStreamingResponse:
from .resources.funding_events import FundingEventsWithStreamingResponse

return FundingEventsWithStreamingResponse(self._client.funding_events)


class AsyncLithicWithStreamedResponse:
_client: AsyncLithic
Expand Down Expand Up @@ -1474,6 +1506,12 @@ def management_operations(self) -> management_operations.AsyncManagementOperatio

return AsyncManagementOperationsWithStreamingResponse(self._client.management_operations)

@cached_property
def funding_events(self) -> funding_events.AsyncFundingEventsWithStreamingResponse:
from .resources.funding_events import AsyncFundingEventsWithStreamingResponse

return AsyncFundingEventsWithStreamingResponse(self._client.funding_events)


Client = Lithic

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.92.0" # x-release-please-version
__version__ = "0.93.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/lithic/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@
BookTransfersWithStreamingResponse,
AsyncBookTransfersWithStreamingResponse,
)
from .funding_events import (
FundingEvents,
AsyncFundingEvents,
FundingEventsWithRawResponse,
AsyncFundingEventsWithRawResponse,
FundingEventsWithStreamingResponse,
AsyncFundingEventsWithStreamingResponse,
)
from .account_holders import (
AccountHolders,
AsyncAccountHolders,
Expand Down Expand Up @@ -341,4 +349,10 @@
"AsyncManagementOperationsWithRawResponse",
"ManagementOperationsWithStreamingResponse",
"AsyncManagementOperationsWithStreamingResponse",
"FundingEvents",
"AsyncFundingEvents",
"FundingEventsWithRawResponse",
"AsyncFundingEventsWithRawResponse",
"FundingEventsWithStreamingResponse",
"AsyncFundingEventsWithStreamingResponse",
]
Loading