Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def _get_kwargs(
headers: dict[str, Any] = {}

_kwargs: dict[str, Any] = {
"method": "put",
"url": "/v1/graphs/{graph_id}/subscriptions/upgrade".format(
"method": "patch",
"url": "/v1/graphs/{graph_id}/subscriptions".format(
graph_id=quote(str(graph_id), safe=""),
),
}
Expand All @@ -42,6 +42,10 @@ def _parse_response(

return response_200

if response.status_code == 400:
response_400 = cast(Any, None)
return response_400

if response.status_code == 404:
response_404 = cast(Any, None)
return response_404
Expand Down Expand Up @@ -74,15 +78,23 @@ def sync_detailed(
client: AuthenticatedClient,
body: UpgradeSubscriptionRequest,
) -> Response[Any | GraphSubscriptionResponse | HTTPValidationError]:
"""Upgrade Subscription
"""Change Repository Plan

Upgrade or downgrade a shared repository subscription plan.

Changes the plan on an existing subscription (e.g., SEC starter -> advanced).
Stripe handles proration automatically.

Upgrade a subscription to a different plan.
**Only for shared repositories** - graph subscriptions do not support plan changes
(cancel and re-subscribe instead).

Works for both user graphs and shared repositories.
The subscription will be immediately updated to the new plan and pricing.
**Requirements:**
- User must be an OWNER of their organization
- Subscription must be active
- New plan must exist in the repository's manifest

Args:
graph_id (str): Graph ID or repository name
graph_id (str): Repository name (e.g., 'sec')
body (UpgradeSubscriptionRequest): Request to upgrade a subscription.

Raises:
Expand Down Expand Up @@ -111,15 +123,23 @@ def sync(
client: AuthenticatedClient,
body: UpgradeSubscriptionRequest,
) -> Any | GraphSubscriptionResponse | HTTPValidationError | None:
"""Upgrade Subscription
"""Change Repository Plan

Upgrade or downgrade a shared repository subscription plan.

Changes the plan on an existing subscription (e.g., SEC starter -> advanced).
Stripe handles proration automatically.

Upgrade a subscription to a different plan.
**Only for shared repositories** - graph subscriptions do not support plan changes
(cancel and re-subscribe instead).

Works for both user graphs and shared repositories.
The subscription will be immediately updated to the new plan and pricing.
**Requirements:**
- User must be an OWNER of their organization
- Subscription must be active
- New plan must exist in the repository's manifest

Args:
graph_id (str): Graph ID or repository name
graph_id (str): Repository name (e.g., 'sec')
body (UpgradeSubscriptionRequest): Request to upgrade a subscription.

Raises:
Expand All @@ -143,15 +163,23 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: UpgradeSubscriptionRequest,
) -> Response[Any | GraphSubscriptionResponse | HTTPValidationError]:
"""Upgrade Subscription
"""Change Repository Plan

Upgrade a subscription to a different plan.
Upgrade or downgrade a shared repository subscription plan.

Works for both user graphs and shared repositories.
The subscription will be immediately updated to the new plan and pricing.
Changes the plan on an existing subscription (e.g., SEC starter -> advanced).
Stripe handles proration automatically.

**Only for shared repositories** - graph subscriptions do not support plan changes
(cancel and re-subscribe instead).

**Requirements:**
- User must be an OWNER of their organization
- Subscription must be active
- New plan must exist in the repository's manifest

Args:
graph_id (str): Graph ID or repository name
graph_id (str): Repository name (e.g., 'sec')
body (UpgradeSubscriptionRequest): Request to upgrade a subscription.

Raises:
Expand All @@ -178,15 +206,23 @@ async def asyncio(
client: AuthenticatedClient,
body: UpgradeSubscriptionRequest,
) -> Any | GraphSubscriptionResponse | HTTPValidationError | None:
"""Upgrade Subscription
"""Change Repository Plan

Upgrade or downgrade a shared repository subscription plan.

Changes the plan on an existing subscription (e.g., SEC starter -> advanced).
Stripe handles proration automatically.

Upgrade a subscription to a different plan.
**Only for shared repositories** - graph subscriptions do not support plan changes
(cancel and re-subscribe instead).

Works for both user graphs and shared repositories.
The subscription will be immediately updated to the new plan and pricing.
**Requirements:**
- User must be an OWNER of their organization
- Subscription must be active
- New plan must exist in the repository's manifest

Args:
graph_id (str): Graph ID or repository name
graph_id (str): Repository name (e.g., 'sec')
body (UpgradeSubscriptionRequest): Request to upgrade a subscription.

Raises:
Expand Down
2 changes: 1 addition & 1 deletion robosystems_client/models/upgrade_subscription_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class UpgradeSubscriptionRequest:
"""Request to upgrade a subscription.

Attributes:
new_plan_name (str): New plan name to upgrade to
new_plan_name (str): New plan name to change to
"""

new_plan_name: str
Expand Down