feat(abonnement): client.change_subscription (PUT /v1/subscription) (#109)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-07-05 20:28:11 +02:00
parent ee1f64a53b
commit 3645c098c2
2 changed files with 25 additions and 0 deletions
+10
View File
@@ -155,3 +155,13 @@ def get_payment_info_url(sub_handle: str, accept_url: str, cancel_url: str) -> s
def get_plan(plan_handle: str) -> dict:
return _call("GET", f"/v1/plan/{plan_handle}")
def change_subscription(
sub_handle: str, plan_handle: str, timing: str = "renewal"
) -> dict:
return _call(
"PUT",
f"/v1/subscription/{sub_handle}",
json={"timing": timing, "plan": plan_handle},
)