diff --git a/docs/hub/_index.md b/docs/hub/_index.md index 35d63e0..0a367e9 100644 --- a/docs/hub/_index.md +++ b/docs/hub/_index.md @@ -9,7 +9,6 @@ | [`echo`](./echo.md) | 1 | | [`email`](./email.md) | 1 | | [`files`](./files.md) | 23 | -| [`internal`](./internal.md) | 1 | | [`logs`](./logs.md) | 15 | | [`membership`](./membership.md) | 25 | | [`notifications`](./notifications.md) | 117 | diff --git a/docs/hub/internal.md b/docs/hub/internal.md deleted file mode 100644 index 87fe897..0000000 --- a/docs/hub/internal.md +++ /dev/null @@ -1,7 +0,0 @@ -# HUB ยท Internal - -Access with `norbix.hub.internal`. - -| Method | Verb | Path | Scope | -| --- | --- | --- | --- | -| `internals_type_gen` | `GET` | `/internal/_typegen` | `project` | diff --git a/src/norbix_python/client.py b/src/norbix_python/client.py index 6014ef0..2d994fb 100644 --- a/src/norbix_python/client.py +++ b/src/norbix_python/client.py @@ -324,7 +324,6 @@ def __init__( self.email = hub.email self.environments = hub.environments self.files = hub.files - self.internal = hub.internal self.logs = hub.logs self.membership = hub.membership self.notifications = hub.notifications @@ -341,7 +340,6 @@ def __init__( self.Email = self.email self.Environments = self.environments self.Files = self.files - self.Internal = self.internal self.Logs = self.logs self.Membership = self.membership self.Notifications = self.notifications diff --git a/src/norbix_python/hub/__init__.py b/src/norbix_python/hub/__init__.py index 980c801..974f47a 100644 --- a/src/norbix_python/hub/__init__.py +++ b/src/norbix_python/hub/__init__.py @@ -9,7 +9,6 @@ from .email import AsyncEmailModule, EmailModule from .environments import AsyncEnvironmentsModule, EnvironmentsModule from .files import AsyncFilesModule, FilesModule -from .internal import AsyncInternalModule, InternalModule from .logs import AsyncLogsModule, LogsModule from .membership import AsyncMembershipModule, MembershipModule from .notifications import AsyncNotificationsModule, NotificationsModule @@ -31,7 +30,6 @@ def __init__(self, transport: Transport) -> None: self.email = EmailModule(transport) self.environments = EnvironmentsModule(transport) self.files = FilesModule(transport) - self.internal = InternalModule(transport) self.logs = LogsModule(transport) self.membership = MembershipModule(transport) self.notifications = NotificationsModule(transport) @@ -53,7 +51,6 @@ def __init__(self, transport: AsyncTransport) -> None: self.email = AsyncEmailModule(transport) self.environments = AsyncEnvironmentsModule(transport) self.files = AsyncFilesModule(transport) - self.internal = AsyncInternalModule(transport) self.logs = AsyncLogsModule(transport) self.membership = AsyncMembershipModule(transport) self.notifications = AsyncNotificationsModule(transport) diff --git a/src/norbix_python/hub/internal.py b/src/norbix_python/hub/internal.py deleted file mode 100644 index a34229f..0000000 --- a/src/norbix_python/hub/internal.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import Any - -from ..transport import AsyncTransport, Transport - - -class InternalModule: - def __init__(self, transport: Transport) -> None: - self._transport = transport - - def internals_type_gen(self, *, timeout: float | None = None, bearer_token: str | None = None, **request: Any) -> Any: - """GET /internal/_typegen""" - return self._transport.send( - target="hub", - path="/internal/_typegen", - method="GET", - path_params={}, - request=request, - scope="project", - timeout=timeout, - bearer_token=bearer_token, - ) - - -class AsyncInternalModule: - def __init__(self, transport: AsyncTransport) -> None: - self._transport = transport - - async def internals_type_gen(self, *, timeout: float | None = None, bearer_token: str | None = None, **request: Any) -> Any: - """GET /internal/_typegen""" - return await self._transport.send( - target="hub", - path="/internal/_typegen", - method="GET", - path_params={}, - request=request, - scope="project", - timeout=timeout, - bearer_token=bearer_token, - ) diff --git a/tests/hub/test_internal.py b/tests/hub/test_internal.py deleted file mode 100644 index ba61650..0000000 --- a/tests/hub/test_internal.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -from norbix_python import Norbix, NorbixError -from ..helpers import make_client - - -def test_hub_internal_module_surface() -> None: - client, _ = make_client() - module = client.hub.internal - assert callable(module.internals_type_gen) - - -def test_hub_internal_internals_type_gen_request_shape() -> None: - client, transport = make_client(account_id=None) - client.hub.internal.internals_type_gen() - assert transport.last_request['method'] == 'GET' - assert transport.last_request is not None - assert transport.last_request['url'].startswith('https://') diff --git a/tests/hub/test_payments.py b/tests/hub/test_payments.py index 5b1b4a8..b4a2d58 100644 --- a/tests/hub/test_payments.py +++ b/tests/hub/test_payments.py @@ -131,6 +131,20 @@ def test_hub_payments_save_payments_integration_request_shape() -> None: assert transport.last_request is not None assert transport.last_request['url'].startswith('https://') +def test_hub_payments_save_montonio_integration_leaves_out_unset_is_sandbox() -> None: + # Owner 2026-10-22: isSandbox is optional; empty = true (sandbox) on the gateway. + # The SDK must not fill in a default, or an unset field would become live mode. + import json + + client, transport = make_client(account_id=None) + client.hub.payments.save_payments_integration( + integration={"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"}, + ) + assert transport.last_request is not None + body = json.loads(transport.last_request['body']) + assert body == {"integration": {"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"}} + assert "isSandbox" not in body["integration"] + def test_hub_payments_test_payments_integration_request_shape() -> None: client, transport = make_client(account_id=None) client.hub.payments.test_payments_integration()