Skip to content

Commit 80a21e1

Browse files
vvillait88claude
andcommitted
Drop return_url / payment_methods from create_session SDK
Paired with core removing these from POST /v1/sessions. - Remove return_url and payment_methods params from create_session / acreate_session - Remove the now-unused PaymentMethod type - Drop corresponding tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fece0c6 commit 80a21e1

4 files changed

Lines changed: 0 additions & 28 deletions

File tree

agentscore/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
EntityType,
1212
Grade,
1313
OperatorVerification,
14-
PaymentMethod,
1514
Reputation,
1615
ReputationResponse,
1716
ReputationStatus,
@@ -34,7 +33,6 @@
3433
"EntityType",
3534
"Grade",
3635
"OperatorVerification",
37-
"PaymentMethod",
3836
"Reputation",
3937
"ReputationResponse",
4038
"ReputationStatus",

agentscore/client.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
CredentialCreateResponse,
1414
CredentialListResponse,
1515
DecisionPolicy,
16-
PaymentMethod,
1716
ReputationResponse,
1817
SessionCreateResponse,
1918
SessionPollResponse,
@@ -132,18 +131,12 @@ def assess(
132131
def create_session(
133132
self,
134133
context: str | None = None,
135-
return_url: str | None = None,
136-
payment_methods: list[PaymentMethod] | None = None,
137134
product_name: str | None = None,
138135
) -> SessionCreateResponse:
139136
"""Create an assessment session for deferred scoring."""
140137
body: dict[str, Any] = {}
141138
if context is not None:
142139
body["context"] = context
143-
if return_url is not None:
144-
body["return_url"] = return_url
145-
if payment_methods is not None:
146-
body["payment_methods"] = payment_methods
147140
if product_name is not None:
148141
body["product_name"] = product_name
149142
client = self._get_sync_client()
@@ -224,18 +217,12 @@ async def aassess(
224217
async def acreate_session(
225218
self,
226219
context: str | None = None,
227-
return_url: str | None = None,
228-
payment_methods: list[PaymentMethod] | None = None,
229220
product_name: str | None = None,
230221
) -> SessionCreateResponse:
231222
"""Create an assessment session for deferred scoring."""
232223
body: dict[str, Any] = {}
233224
if context is not None:
234225
body["context"] = context
235-
if return_url is not None:
236-
body["return_url"] = return_url
237-
if payment_methods is not None:
238-
body["payment_methods"] = payment_methods
239226
if product_name is not None:
240227
body["product_name"] = product_name
241228
client = self._get_async_client()

agentscore/types.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from typing import Literal, TypedDict
44

5-
PaymentMethod = Literal["tempo", "stripe"]
65
Grade = Literal["A", "B", "C", "D", "F"]
76
EntityType = Literal["agent", "service", "hybrid", "wallet", "bot", "unknown", "individual", "entity"]
87
ReputationStatus = Literal["scored", "stale", "known_unscored"]
@@ -188,8 +187,6 @@ class AssessResponse(_AssessResponseRequired, total=False):
188187

189188
class SessionCreateRequest(TypedDict, total=False):
190189
context: str
191-
return_url: str
192-
payment_methods: list[PaymentMethod]
193190
product_name: str
194191

195192

tests/test_client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -759,14 +759,10 @@ def test_create_session_with_first_class_fields():
759759
client = AgentScore(api_key=API_KEY)
760760
client.create_session(
761761
context="wine purchase verification",
762-
return_url="https://example.com/callback",
763-
payment_methods=["tempo", "stripe"],
764762
product_name="Cabernet Reserve 2022",
765763
)
766764
body = json.loads(route.calls.last.request.content)
767765
assert body["context"] == "wine purchase verification"
768-
assert body["return_url"] == "https://example.com/callback"
769-
assert body["payment_methods"] == ["tempo", "stripe"]
770766
assert body["product_name"] == "Cabernet Reserve 2022"
771767

772768

@@ -777,8 +773,6 @@ def test_create_session_omits_none_fields():
777773
client.create_session()
778774
body = json.loads(route.calls.last.request.content)
779775
assert "context" not in body
780-
assert "return_url" not in body
781-
assert "payment_methods" not in body
782776
assert "product_name" not in body
783777

784778

@@ -1032,14 +1026,10 @@ async def test_acreate_session_with_first_class_fields():
10321026
client = AgentScore(api_key=API_KEY)
10331027
await client.acreate_session(
10341028
context="wine purchase verification",
1035-
return_url="https://example.com/callback",
1036-
payment_methods=["tempo", "stripe"],
10371029
product_name="Cabernet Reserve 2022",
10381030
)
10391031
body = json.loads(route.calls.last.request.content)
10401032
assert body["context"] == "wine purchase verification"
1041-
assert body["return_url"] == "https://example.com/callback"
1042-
assert body["payment_methods"] == ["tempo", "stripe"]
10431033
assert body["product_name"] == "Cabernet Reserve 2022"
10441034
await client.aclose()
10451035

0 commit comments

Comments
 (0)