Skip to content

Commit 93ff80f

Browse files
Domantasclaude
andcommitted
test(payments): an unset isSandbox is not sent on save_payments_integration
Owner 2026-10-22: isSandbox is optional and empty = true (sandbox) on the gateway, so the SDK must leave it out when the caller did not set it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 89c5835 commit 93ff80f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎tests/hub/test_payments.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ def test_hub_payments_save_payments_integration_request_shape() -> None:
131131
assert transport.last_request is not None
132132
assert transport.last_request['url'].startswith('https://')
133133

134+
def test_hub_payments_save_montonio_integration_leaves_out_unset_is_sandbox() -> None:
135+
# Owner 2026-10-22: isSandbox is optional; empty = true (sandbox) on the gateway.
136+
# The SDK must not fill in a default, or an unset field would become live mode.
137+
import json
138+
139+
client, transport = make_client(account_id=None)
140+
client.hub.payments.save_payments_integration(
141+
integration={"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"},
142+
)
143+
assert transport.last_request is not None
144+
body = json.loads(transport.last_request['body'])
145+
assert body == {"integration": {"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"}}
146+
assert "isSandbox" not in body["integration"]
147+
134148
def test_hub_payments_test_payments_integration_request_shape() -> None:
135149
client, transport = make_client(account_id=None)
136150
client.hub.payments.test_payments_integration()

0 commit comments

Comments
 (0)