robosystems-client 0.2.11__py3-none-any.whl → 0.2.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (61) hide show
  1. robosystems_client/api/auth/register_user.py +36 -8
  2. robosystems_client/api/billing/{cancel_subscription.py → cancel_org_subscription.py} +34 -9
  3. robosystems_client/api/billing/create_checkout_session.py +28 -20
  4. robosystems_client/api/billing/get_org_billing_customer.py +189 -0
  5. robosystems_client/api/billing/{get_subscription.py → get_org_subscription.py} +30 -5
  6. robosystems_client/api/billing/{get_upcoming_invoice.py → get_org_upcoming_invoice.py} +68 -22
  7. robosystems_client/api/billing/{list_invoices.py → list_org_invoices.py} +38 -9
  8. robosystems_client/api/billing/{list_subscriptions.py → list_org_subscriptions.py} +64 -22
  9. robosystems_client/api/billing/{update_payment_method.py → update_org_payment_method.py} +34 -9
  10. robosystems_client/api/org/__init__.py +1 -0
  11. robosystems_client/api/org/create_org.py +174 -0
  12. robosystems_client/api/{billing/get_billing_customer.py → org/get_org.py} +50 -28
  13. robosystems_client/api/org/list_org_graphs.py +170 -0
  14. robosystems_client/api/{user/get_user_limits.py → org/list_user_orgs.py} +21 -25
  15. robosystems_client/api/org/update_org.py +187 -0
  16. robosystems_client/api/org_members/__init__.py +1 -0
  17. robosystems_client/api/org_members/invite_org_member.py +207 -0
  18. robosystems_client/api/org_members/list_org_members.py +165 -0
  19. robosystems_client/api/org_members/remove_org_member.py +176 -0
  20. robosystems_client/api/org_members/update_org_member_role.py +200 -0
  21. robosystems_client/api/org_usage/__init__.py +1 -0
  22. robosystems_client/api/org_usage/get_org_limits.py +165 -0
  23. robosystems_client/api/org_usage/get_org_usage.py +186 -0
  24. robosystems_client/api/service_offerings/get_service_offerings.py +32 -8
  25. robosystems_client/api/usage/get_graph_usage_analytics.py +4 -4
  26. robosystems_client/models/__init__.py +44 -6
  27. robosystems_client/models/auth_response.py +35 -0
  28. robosystems_client/models/{user_usage_response_graphs.py → auth_response_org_type_0.py} +6 -6
  29. robosystems_client/models/billing_customer.py +8 -8
  30. robosystems_client/models/checkout_response.py +65 -22
  31. robosystems_client/models/create_org_request.py +79 -0
  32. robosystems_client/models/graph_subscription_tier.py +40 -48
  33. robosystems_client/models/graph_subscriptions.py +17 -5
  34. robosystems_client/models/invite_member_request.py +93 -0
  35. robosystems_client/models/list_org_graphs_response_200_item.py +44 -0
  36. robosystems_client/models/org_detail_response.py +174 -0
  37. robosystems_client/models/org_detail_response_graphs_item.py +44 -0
  38. robosystems_client/models/org_detail_response_limits_type_0.py +44 -0
  39. robosystems_client/models/org_detail_response_members_item.py +44 -0
  40. robosystems_client/models/org_limits_response.py +98 -0
  41. robosystems_client/models/org_limits_response_current_usage.py +44 -0
  42. robosystems_client/models/org_list_response.py +82 -0
  43. robosystems_client/models/org_member_list_response.py +90 -0
  44. robosystems_client/models/org_member_response.py +104 -0
  45. robosystems_client/models/org_response.py +121 -0
  46. robosystems_client/models/org_role.py +10 -0
  47. robosystems_client/models/org_type.py +10 -0
  48. robosystems_client/models/org_usage_response.py +146 -0
  49. robosystems_client/models/org_usage_response_daily_trend_item.py +44 -0
  50. robosystems_client/models/org_usage_response_graph_details_item.py +44 -0
  51. robosystems_client/models/org_usage_summary.py +158 -0
  52. robosystems_client/models/repository_subscriptions.py +15 -4
  53. robosystems_client/models/service_offerings_response.py +15 -0
  54. robosystems_client/models/update_member_role_request.py +62 -0
  55. robosystems_client/models/update_org_request.py +103 -0
  56. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/METADATA +1 -1
  57. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/RECORD +59 -27
  58. robosystems_client/models/user_limits_response.py +0 -95
  59. robosystems_client/models/user_usage_response.py +0 -90
  60. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/WHEEL +0 -0
  61. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/licenses/LICENSE +0 -0
@@ -83,8 +83,15 @@ def sync_detailed(
83
83
  ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
84
84
  """Register New User
85
85
 
86
- Register a new user account with email and password. Security controls vary by environment: CAPTCHA
87
- and email verification are disabled in development for API testing, but required in production.
86
+ Register a new user account with email and password.
87
+
88
+ **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal
89
+ organization is automatically created for you. All resources (graphs, subscriptions, billing) belong
90
+ to organizations, not individual users. You can later upgrade your personal org to a team or
91
+ enterprise organization.
92
+
93
+ **Security Controls**: CAPTCHA and email verification are disabled in development for API testing,
94
+ but required in production.
88
95
 
89
96
  Args:
90
97
  body (RegisterRequest): Registration request model.
@@ -115,8 +122,15 @@ def sync(
115
122
  ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
116
123
  """Register New User
117
124
 
118
- Register a new user account with email and password. Security controls vary by environment: CAPTCHA
119
- and email verification are disabled in development for API testing, but required in production.
125
+ Register a new user account with email and password.
126
+
127
+ **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal
128
+ organization is automatically created for you. All resources (graphs, subscriptions, billing) belong
129
+ to organizations, not individual users. You can later upgrade your personal org to a team or
130
+ enterprise organization.
131
+
132
+ **Security Controls**: CAPTCHA and email verification are disabled in development for API testing,
133
+ but required in production.
120
134
 
121
135
  Args:
122
136
  body (RegisterRequest): Registration request model.
@@ -142,8 +156,15 @@ async def asyncio_detailed(
142
156
  ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
143
157
  """Register New User
144
158
 
145
- Register a new user account with email and password. Security controls vary by environment: CAPTCHA
146
- and email verification are disabled in development for API testing, but required in production.
159
+ Register a new user account with email and password.
160
+
161
+ **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal
162
+ organization is automatically created for you. All resources (graphs, subscriptions, billing) belong
163
+ to organizations, not individual users. You can later upgrade your personal org to a team or
164
+ enterprise organization.
165
+
166
+ **Security Controls**: CAPTCHA and email verification are disabled in development for API testing,
167
+ but required in production.
147
168
 
148
169
  Args:
149
170
  body (RegisterRequest): Registration request model.
@@ -172,8 +193,15 @@ async def asyncio(
172
193
  ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
173
194
  """Register New User
174
195
 
175
- Register a new user account with email and password. Security controls vary by environment: CAPTCHA
176
- and email verification are disabled in development for API testing, but required in production.
196
+ Register a new user account with email and password.
197
+
198
+ **Organization Creation**: RoboSystems is an org-centric platform. When you register, a personal
199
+ organization is automatically created for you. All resources (graphs, subscriptions, billing) belong
200
+ to organizations, not individual users. You can later upgrade your personal org to a team or
201
+ enterprise organization.
202
+
203
+ **Security Controls**: CAPTCHA and email verification are disabled in development for API testing,
204
+ but required in production.
177
205
 
178
206
  Args:
179
207
  body (RegisterRequest): Registration request model.
@@ -11,11 +11,12 @@ from ...types import Response
11
11
 
12
12
 
13
13
  def _get_kwargs(
14
+ org_id: str,
14
15
  subscription_id: str,
15
16
  ) -> dict[str, Any]:
16
17
  _kwargs: dict[str, Any] = {
17
18
  "method": "post",
18
- "url": f"/v1/billing/subscriptions/{subscription_id}/cancel",
19
+ "url": f"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel",
19
20
  }
20
21
 
21
22
  return _kwargs
@@ -52,17 +53,22 @@ def _build_response(
52
53
 
53
54
 
54
55
  def sync_detailed(
56
+ org_id: str,
55
57
  subscription_id: str,
56
58
  *,
57
59
  client: AuthenticatedClient,
58
60
  ) -> Response[Union[GraphSubscriptionResponse, HTTPValidationError]]:
59
- """Cancel Subscription
61
+ """Cancel Organization Subscription
60
62
 
61
- Cancel a subscription.
63
+ Cancel an organization subscription.
62
64
 
63
65
  The subscription will remain active until the end of the current billing period.
64
66
 
67
+ **Requirements:**
68
+ - User must be an OWNER of the organization
69
+
65
70
  Args:
71
+ org_id (str):
66
72
  subscription_id (str):
67
73
 
68
74
  Raises:
@@ -74,6 +80,7 @@ def sync_detailed(
74
80
  """
75
81
 
76
82
  kwargs = _get_kwargs(
83
+ org_id=org_id,
77
84
  subscription_id=subscription_id,
78
85
  )
79
86
 
@@ -85,17 +92,22 @@ def sync_detailed(
85
92
 
86
93
 
87
94
  def sync(
95
+ org_id: str,
88
96
  subscription_id: str,
89
97
  *,
90
98
  client: AuthenticatedClient,
91
99
  ) -> Optional[Union[GraphSubscriptionResponse, HTTPValidationError]]:
92
- """Cancel Subscription
100
+ """Cancel Organization Subscription
93
101
 
94
- Cancel a subscription.
102
+ Cancel an organization subscription.
95
103
 
96
104
  The subscription will remain active until the end of the current billing period.
97
105
 
106
+ **Requirements:**
107
+ - User must be an OWNER of the organization
108
+
98
109
  Args:
110
+ org_id (str):
99
111
  subscription_id (str):
100
112
 
101
113
  Raises:
@@ -107,23 +119,29 @@ def sync(
107
119
  """
108
120
 
109
121
  return sync_detailed(
122
+ org_id=org_id,
110
123
  subscription_id=subscription_id,
111
124
  client=client,
112
125
  ).parsed
113
126
 
114
127
 
115
128
  async def asyncio_detailed(
129
+ org_id: str,
116
130
  subscription_id: str,
117
131
  *,
118
132
  client: AuthenticatedClient,
119
133
  ) -> Response[Union[GraphSubscriptionResponse, HTTPValidationError]]:
120
- """Cancel Subscription
134
+ """Cancel Organization Subscription
121
135
 
122
- Cancel a subscription.
136
+ Cancel an organization subscription.
123
137
 
124
138
  The subscription will remain active until the end of the current billing period.
125
139
 
140
+ **Requirements:**
141
+ - User must be an OWNER of the organization
142
+
126
143
  Args:
144
+ org_id (str):
127
145
  subscription_id (str):
128
146
 
129
147
  Raises:
@@ -135,6 +153,7 @@ async def asyncio_detailed(
135
153
  """
136
154
 
137
155
  kwargs = _get_kwargs(
156
+ org_id=org_id,
138
157
  subscription_id=subscription_id,
139
158
  )
140
159
 
@@ -144,17 +163,22 @@ async def asyncio_detailed(
144
163
 
145
164
 
146
165
  async def asyncio(
166
+ org_id: str,
147
167
  subscription_id: str,
148
168
  *,
149
169
  client: AuthenticatedClient,
150
170
  ) -> Optional[Union[GraphSubscriptionResponse, HTTPValidationError]]:
151
- """Cancel Subscription
171
+ """Cancel Organization Subscription
152
172
 
153
- Cancel a subscription.
173
+ Cancel an organization subscription.
154
174
 
155
175
  The subscription will remain active until the end of the current billing period.
156
176
 
177
+ **Requirements:**
178
+ - User must be an OWNER of the organization
179
+
157
180
  Args:
181
+ org_id (str):
158
182
  subscription_id (str):
159
183
 
160
184
  Raises:
@@ -167,6 +191,7 @@ async def asyncio(
167
191
 
168
192
  return (
169
193
  await asyncio_detailed(
194
+ org_id=org_id,
170
195
  subscription_id=subscription_id,
171
196
  client=client,
172
197
  )
@@ -69,19 +69,21 @@ def sync_detailed(
69
69
 
70
70
  Create a Stripe checkout session for collecting payment method.
71
71
 
72
- This endpoint is used when a user needs to add a payment method before
72
+ This endpoint is used when an organization owner needs to add a payment method before
73
73
  provisioning resources. It creates a pending subscription and redirects
74
- the user to Stripe Checkout to collect payment details.
74
+ to Stripe Checkout to collect payment details.
75
75
 
76
76
  **Flow:**
77
- 1. User tries to create a graph but has no payment method
77
+ 1. Owner tries to create a graph but org has no payment method
78
78
  2. Frontend calls this endpoint with graph configuration
79
- 3. Backend creates a subscription in PENDING_PAYMENT status
79
+ 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
80
80
  4. Returns Stripe Checkout URL
81
81
  5. User completes payment on Stripe
82
82
  6. Webhook activates subscription and provisions resource
83
83
 
84
- **Enterprise customers** (with invoice_billing_enabled) should not call this endpoint.
84
+ **Requirements:**
85
+ - User must be an OWNER of their organization
86
+ - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
85
87
 
86
88
  Args:
87
89
  body (CreateCheckoutRequest): Request to create a checkout session for payment collection.
@@ -114,19 +116,21 @@ def sync(
114
116
 
115
117
  Create a Stripe checkout session for collecting payment method.
116
118
 
117
- This endpoint is used when a user needs to add a payment method before
119
+ This endpoint is used when an organization owner needs to add a payment method before
118
120
  provisioning resources. It creates a pending subscription and redirects
119
- the user to Stripe Checkout to collect payment details.
121
+ to Stripe Checkout to collect payment details.
120
122
 
121
123
  **Flow:**
122
- 1. User tries to create a graph but has no payment method
124
+ 1. Owner tries to create a graph but org has no payment method
123
125
  2. Frontend calls this endpoint with graph configuration
124
- 3. Backend creates a subscription in PENDING_PAYMENT status
126
+ 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
125
127
  4. Returns Stripe Checkout URL
126
128
  5. User completes payment on Stripe
127
129
  6. Webhook activates subscription and provisions resource
128
130
 
129
- **Enterprise customers** (with invoice_billing_enabled) should not call this endpoint.
131
+ **Requirements:**
132
+ - User must be an OWNER of their organization
133
+ - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
130
134
 
131
135
  Args:
132
136
  body (CreateCheckoutRequest): Request to create a checkout session for payment collection.
@@ -154,19 +158,21 @@ async def asyncio_detailed(
154
158
 
155
159
  Create a Stripe checkout session for collecting payment method.
156
160
 
157
- This endpoint is used when a user needs to add a payment method before
161
+ This endpoint is used when an organization owner needs to add a payment method before
158
162
  provisioning resources. It creates a pending subscription and redirects
159
- the user to Stripe Checkout to collect payment details.
163
+ to Stripe Checkout to collect payment details.
160
164
 
161
165
  **Flow:**
162
- 1. User tries to create a graph but has no payment method
166
+ 1. Owner tries to create a graph but org has no payment method
163
167
  2. Frontend calls this endpoint with graph configuration
164
- 3. Backend creates a subscription in PENDING_PAYMENT status
168
+ 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
165
169
  4. Returns Stripe Checkout URL
166
170
  5. User completes payment on Stripe
167
171
  6. Webhook activates subscription and provisions resource
168
172
 
169
- **Enterprise customers** (with invoice_billing_enabled) should not call this endpoint.
173
+ **Requirements:**
174
+ - User must be an OWNER of their organization
175
+ - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
170
176
 
171
177
  Args:
172
178
  body (CreateCheckoutRequest): Request to create a checkout session for payment collection.
@@ -197,19 +203,21 @@ async def asyncio(
197
203
 
198
204
  Create a Stripe checkout session for collecting payment method.
199
205
 
200
- This endpoint is used when a user needs to add a payment method before
206
+ This endpoint is used when an organization owner needs to add a payment method before
201
207
  provisioning resources. It creates a pending subscription and redirects
202
- the user to Stripe Checkout to collect payment details.
208
+ to Stripe Checkout to collect payment details.
203
209
 
204
210
  **Flow:**
205
- 1. User tries to create a graph but has no payment method
211
+ 1. Owner tries to create a graph but org has no payment method
206
212
  2. Frontend calls this endpoint with graph configuration
207
- 3. Backend creates a subscription in PENDING_PAYMENT status
213
+ 3. Backend creates a subscription in PENDING_PAYMENT status for the user's org
208
214
  4. Returns Stripe Checkout URL
209
215
  5. User completes payment on Stripe
210
216
  6. Webhook activates subscription and provisions resource
211
217
 
212
- **Enterprise customers** (with invoice_billing_enabled) should not call this endpoint.
218
+ **Requirements:**
219
+ - User must be an OWNER of their organization
220
+ - Enterprise customers (with invoice_billing_enabled) should not call this endpoint.
213
221
 
214
222
  Args:
215
223
  body (CreateCheckoutRequest): Request to create a checkout session for payment collection.
@@ -0,0 +1,189 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.billing_customer import BillingCustomer
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ org_id: str,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "get",
18
+ "url": f"/v1/billing/customer/{org_id}",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(
25
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
26
+ ) -> Optional[Union[BillingCustomer, HTTPValidationError]]:
27
+ if response.status_code == 200:
28
+ response_200 = BillingCustomer.from_dict(response.json())
29
+
30
+ return response_200
31
+
32
+ if response.status_code == 422:
33
+ response_422 = HTTPValidationError.from_dict(response.json())
34
+
35
+ return response_422
36
+
37
+ if client.raise_on_unexpected_status:
38
+ raise errors.UnexpectedStatus(response.status_code, response.content)
39
+ else:
40
+ return None
41
+
42
+
43
+ def _build_response(
44
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
45
+ ) -> Response[Union[BillingCustomer, HTTPValidationError]]:
46
+ return Response(
47
+ status_code=HTTPStatus(response.status_code),
48
+ content=response.content,
49
+ headers=response.headers,
50
+ parsed=_parse_response(client=client, response=response),
51
+ )
52
+
53
+
54
+ def sync_detailed(
55
+ org_id: str,
56
+ *,
57
+ client: AuthenticatedClient,
58
+ ) -> Response[Union[BillingCustomer, HTTPValidationError]]:
59
+ """Get Organization Customer Info
60
+
61
+ Get billing customer information for an organization including payment methods on file.
62
+
63
+ Returns customer details, payment methods, and whether invoice billing is enabled.
64
+
65
+ **Requirements:**
66
+ - User must be a member of the organization
67
+ - Sensitive payment details are only visible to owners
68
+
69
+ Args:
70
+ org_id (str):
71
+
72
+ Raises:
73
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
74
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
75
+
76
+ Returns:
77
+ Response[Union[BillingCustomer, HTTPValidationError]]
78
+ """
79
+
80
+ kwargs = _get_kwargs(
81
+ org_id=org_id,
82
+ )
83
+
84
+ response = client.get_httpx_client().request(
85
+ **kwargs,
86
+ )
87
+
88
+ return _build_response(client=client, response=response)
89
+
90
+
91
+ def sync(
92
+ org_id: str,
93
+ *,
94
+ client: AuthenticatedClient,
95
+ ) -> Optional[Union[BillingCustomer, HTTPValidationError]]:
96
+ """Get Organization Customer Info
97
+
98
+ Get billing customer information for an organization including payment methods on file.
99
+
100
+ Returns customer details, payment methods, and whether invoice billing is enabled.
101
+
102
+ **Requirements:**
103
+ - User must be a member of the organization
104
+ - Sensitive payment details are only visible to owners
105
+
106
+ Args:
107
+ org_id (str):
108
+
109
+ Raises:
110
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
112
+
113
+ Returns:
114
+ Union[BillingCustomer, HTTPValidationError]
115
+ """
116
+
117
+ return sync_detailed(
118
+ org_id=org_id,
119
+ client=client,
120
+ ).parsed
121
+
122
+
123
+ async def asyncio_detailed(
124
+ org_id: str,
125
+ *,
126
+ client: AuthenticatedClient,
127
+ ) -> Response[Union[BillingCustomer, HTTPValidationError]]:
128
+ """Get Organization Customer Info
129
+
130
+ Get billing customer information for an organization including payment methods on file.
131
+
132
+ Returns customer details, payment methods, and whether invoice billing is enabled.
133
+
134
+ **Requirements:**
135
+ - User must be a member of the organization
136
+ - Sensitive payment details are only visible to owners
137
+
138
+ Args:
139
+ org_id (str):
140
+
141
+ Raises:
142
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
144
+
145
+ Returns:
146
+ Response[Union[BillingCustomer, HTTPValidationError]]
147
+ """
148
+
149
+ kwargs = _get_kwargs(
150
+ org_id=org_id,
151
+ )
152
+
153
+ response = await client.get_async_httpx_client().request(**kwargs)
154
+
155
+ return _build_response(client=client, response=response)
156
+
157
+
158
+ async def asyncio(
159
+ org_id: str,
160
+ *,
161
+ client: AuthenticatedClient,
162
+ ) -> Optional[Union[BillingCustomer, HTTPValidationError]]:
163
+ """Get Organization Customer Info
164
+
165
+ Get billing customer information for an organization including payment methods on file.
166
+
167
+ Returns customer details, payment methods, and whether invoice billing is enabled.
168
+
169
+ **Requirements:**
170
+ - User must be a member of the organization
171
+ - Sensitive payment details are only visible to owners
172
+
173
+ Args:
174
+ org_id (str):
175
+
176
+ Raises:
177
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
178
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
179
+
180
+ Returns:
181
+ Union[BillingCustomer, HTTPValidationError]
182
+ """
183
+
184
+ return (
185
+ await asyncio_detailed(
186
+ org_id=org_id,
187
+ client=client,
188
+ )
189
+ ).parsed
@@ -11,11 +11,12 @@ from ...types import Response
11
11
 
12
12
 
13
13
  def _get_kwargs(
14
+ org_id: str,
14
15
  subscription_id: str,
15
16
  ) -> dict[str, Any]:
16
17
  _kwargs: dict[str, Any] = {
17
18
  "method": "get",
18
- "url": f"/v1/billing/subscriptions/{subscription_id}",
19
+ "url": f"/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}",
19
20
  }
20
21
 
21
22
  return _kwargs
@@ -52,15 +53,20 @@ def _build_response(
52
53
 
53
54
 
54
55
  def sync_detailed(
56
+ org_id: str,
55
57
  subscription_id: str,
56
58
  *,
57
59
  client: AuthenticatedClient,
58
60
  ) -> Response[Union[GraphSubscriptionResponse, HTTPValidationError]]:
59
- """Get Subscription Details
61
+ """Get Organization Subscription Details
60
62
 
61
63
  Get detailed information about a specific subscription.
62
64
 
65
+ **Requirements:**
66
+ - User must be a member of the organization
67
+
63
68
  Args:
69
+ org_id (str):
64
70
  subscription_id (str):
65
71
 
66
72
  Raises:
@@ -72,6 +78,7 @@ def sync_detailed(
72
78
  """
73
79
 
74
80
  kwargs = _get_kwargs(
81
+ org_id=org_id,
75
82
  subscription_id=subscription_id,
76
83
  )
77
84
 
@@ -83,15 +90,20 @@ def sync_detailed(
83
90
 
84
91
 
85
92
  def sync(
93
+ org_id: str,
86
94
  subscription_id: str,
87
95
  *,
88
96
  client: AuthenticatedClient,
89
97
  ) -> Optional[Union[GraphSubscriptionResponse, HTTPValidationError]]:
90
- """Get Subscription Details
98
+ """Get Organization Subscription Details
91
99
 
92
100
  Get detailed information about a specific subscription.
93
101
 
102
+ **Requirements:**
103
+ - User must be a member of the organization
104
+
94
105
  Args:
106
+ org_id (str):
95
107
  subscription_id (str):
96
108
 
97
109
  Raises:
@@ -103,21 +115,27 @@ def sync(
103
115
  """
104
116
 
105
117
  return sync_detailed(
118
+ org_id=org_id,
106
119
  subscription_id=subscription_id,
107
120
  client=client,
108
121
  ).parsed
109
122
 
110
123
 
111
124
  async def asyncio_detailed(
125
+ org_id: str,
112
126
  subscription_id: str,
113
127
  *,
114
128
  client: AuthenticatedClient,
115
129
  ) -> Response[Union[GraphSubscriptionResponse, HTTPValidationError]]:
116
- """Get Subscription Details
130
+ """Get Organization Subscription Details
117
131
 
118
132
  Get detailed information about a specific subscription.
119
133
 
134
+ **Requirements:**
135
+ - User must be a member of the organization
136
+
120
137
  Args:
138
+ org_id (str):
121
139
  subscription_id (str):
122
140
 
123
141
  Raises:
@@ -129,6 +147,7 @@ async def asyncio_detailed(
129
147
  """
130
148
 
131
149
  kwargs = _get_kwargs(
150
+ org_id=org_id,
132
151
  subscription_id=subscription_id,
133
152
  )
134
153
 
@@ -138,15 +157,20 @@ async def asyncio_detailed(
138
157
 
139
158
 
140
159
  async def asyncio(
160
+ org_id: str,
141
161
  subscription_id: str,
142
162
  *,
143
163
  client: AuthenticatedClient,
144
164
  ) -> Optional[Union[GraphSubscriptionResponse, HTTPValidationError]]:
145
- """Get Subscription Details
165
+ """Get Organization Subscription Details
146
166
 
147
167
  Get detailed information about a specific subscription.
148
168
 
169
+ **Requirements:**
170
+ - User must be a member of the organization
171
+
149
172
  Args:
173
+ org_id (str):
150
174
  subscription_id (str):
151
175
 
152
176
  Raises:
@@ -159,6 +183,7 @@ async def asyncio(
159
183
 
160
184
  return (
161
185
  await asyncio_detailed(
186
+ org_id=org_id,
162
187
  subscription_id=subscription_id,
163
188
  client=client,
164
189
  )