Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
071bcd9
fix(stripe): add ConnectedAccountHandler to resolve missing handler e…
Shubhank-Jonnada Apr 27, 2026
e053ee3
chore(stripe): bump version to 2.1.0
Shubhank-Jonnada Apr 27, 2026
b2b4d8a
style(stripe): ruff format
Shubhank-Jonnada Apr 27, 2026
fc9d562
fix(stripe): move ConnectedAccountHandler after helper definitions to…
Shubhank-Jonnada Apr 27, 2026
4f4e283
style(stripe): ruff format
Shubhank-Jonnada Apr 27, 2026
699880f
style(stripe): fix ruff formatting with correct line-length 120 config
Shubhank-Jonnada Apr 27, 2026
dcf653f
fix(stripe): fix response.data access bug, rewrite tests as pytest un…
Shubhank-Jonnada May 12, 2026
4888d64
test(stripe): expand to 44 unit + 10 integration tests covering all 3…
Shubhank-Jonnada May 12, 2026
32eb36b
fix(stripe): resolve all validator warnings — optional inputs.get(), …
Shubhank-Jonnada May 12, 2026
838c350
fix(stripe): bump to SDK 2.0.0, switch error returns to ActionError, …
Shubhank-Jonnada May 12, 2026
235833b
test(stripe): add ConnectedAccountHandler unit tests
Shubhank-Jonnada May 12, 2026
86ff0cb
test(stripe): add e2e coverage for all 36 actions, fix create_price s…
Shubhank-Jonnada May 12, 2026
6fec9d0
fix(stripe): address review feedback from Kai
Shubhank-Jonnada May 12, 2026
9573883
style(stripe): ruff format
Shubhank-Jonnada May 12, 2026
d43cc1d
fix(stripe): move nosec comment to flagged line, re-run ruff format
Shubhank-Jonnada May 12, 2026
6728a6c
fix(stripe): add ruff.toml with line-length=120, reformat to match CI
Shubhank-Jonnada May 12, 2026
2c20308
fix(stripe): replace custom ruff.toml with standard one from tooling
Shubhank-Jonnada May 12, 2026
d9f45cb
fix(stripe): remove ruff.toml, tooling handles formatting config
Shubhank-Jonnada May 12, 2026
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
5 changes: 2 additions & 3 deletions stripe/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Stripe",
"display_name": "Stripe",
"version": "2.0.0",
"version": "3.0.0",
"description": "Stripe integration for managing customers, invoices, products, prices, subscriptions, payment methods and invoice items via the Stripe API",
"entry_point": "stripe.py",
"supports_billing": true,
Expand Down Expand Up @@ -1388,8 +1388,7 @@
},
"required": [
"product",
"currency",
"unit_amount"
"currency"
]
},
"output_schema": {
Expand Down
2 changes: 1 addition & 1 deletion stripe/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
autohive-integrations-sdk==1.0.2
autohive-integrations-sdk~=2.0.0
826 changes: 517 additions & 309 deletions stripe/stripe.py

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions stripe/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import os
import sys

import pytest

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))


def _get_env(var: str) -> str | None:
val = os.environ.get(var)
return val if val else None


@pytest.fixture
def mock_context(mocker):
from unittest.mock import AsyncMock, MagicMock
from autohive_integrations_sdk.integration import FetchResponse

ctx = MagicMock(name="ExecutionContext")
ctx.fetch = AsyncMock(return_value=FetchResponse(status=200, headers={}, data={}))
ctx.auth = {
"auth_type": "PlatformOauth2",
"credentials": {"access_token": "sk_test_fake"}, # nosec B105
}
return ctx


@pytest.fixture
def stripe_context():
import aiohttp
import json as _json
from unittest.mock import AsyncMock, MagicMock
from autohive_integrations_sdk.integration import FetchResponse

api_key = _get_env("STRIPE_TEST_API_KEY")
if not api_key:
pytest.skip("STRIPE_TEST_API_KEY not set — skipping integration tests")

async def real_fetch(url, *, method="GET", json=None, headers=None, params=None, data=None, **kwargs):
merged = dict(headers or {})
merged["Authorization"] = f"Bearer {api_key}"

async with aiohttp.ClientSession() as session:
async with session.request(method, url, headers=merged, params=params, data=data, json=json) as resp:
text = await resp.text()
body = _json.loads(text) if text.strip() else {}
return FetchResponse(status=resp.status, headers=dict(resp.headers), data=body)

ctx = MagicMock(name="ExecutionContext")
ctx.fetch = AsyncMock(side_effect=real_fetch)
ctx.auth = {
"auth_type": "PlatformOauth2",
"credentials": {"access_token": api_key},
}
return ctx
16 changes: 0 additions & 16 deletions stripe/tests/context.py

This file was deleted.

Loading
Loading