robosystems-client 0.2.11__py3-none-any.whl → 0.2.13__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.
- robosystems_client/api/agent/auto_select_agent.py +81 -9
- robosystems_client/api/agent/execute_specific_agent.py +73 -5
- robosystems_client/api/agent/get_agent_metadata.py +1 -1
- robosystems_client/api/agent/list_agents.py +1 -1
- robosystems_client/api/auth/register_user.py +36 -8
- robosystems_client/api/billing/{cancel_subscription.py → cancel_org_subscription.py} +34 -9
- robosystems_client/api/billing/create_checkout_session.py +28 -20
- robosystems_client/api/billing/get_org_billing_customer.py +189 -0
- robosystems_client/api/billing/{get_subscription.py → get_org_subscription.py} +30 -5
- robosystems_client/api/billing/{get_upcoming_invoice.py → get_org_upcoming_invoice.py} +68 -22
- robosystems_client/api/billing/{list_invoices.py → list_org_invoices.py} +38 -9
- robosystems_client/api/billing/{list_subscriptions.py → list_org_subscriptions.py} +64 -22
- robosystems_client/api/billing/{update_payment_method.py → update_org_payment_method.py} +34 -9
- robosystems_client/api/credits_/list_credit_transactions.py +4 -4
- robosystems_client/api/org/__init__.py +1 -0
- robosystems_client/api/org/create_org.py +174 -0
- robosystems_client/api/{billing/get_billing_customer.py → org/get_org.py} +50 -28
- robosystems_client/api/org/list_org_graphs.py +170 -0
- robosystems_client/api/{user/get_user_limits.py → org/list_user_orgs.py} +21 -25
- robosystems_client/api/org/update_org.py +187 -0
- robosystems_client/api/org_members/__init__.py +1 -0
- robosystems_client/api/org_members/invite_org_member.py +207 -0
- robosystems_client/api/org_members/list_org_members.py +165 -0
- robosystems_client/api/org_members/remove_org_member.py +176 -0
- robosystems_client/api/org_members/update_org_member_role.py +200 -0
- robosystems_client/api/org_usage/__init__.py +1 -0
- robosystems_client/api/org_usage/get_org_limits.py +165 -0
- robosystems_client/api/org_usage/get_org_usage.py +186 -0
- robosystems_client/api/service_offerings/get_service_offerings.py +32 -8
- robosystems_client/api/usage/get_graph_usage_analytics.py +4 -4
- robosystems_client/extensions/__init__.py +25 -0
- robosystems_client/extensions/agent_client.py +526 -0
- robosystems_client/extensions/extensions.py +3 -0
- robosystems_client/models/__init__.py +44 -6
- robosystems_client/models/auth_response.py +35 -0
- robosystems_client/models/{user_usage_response_graphs.py → auth_response_org_type_0.py} +6 -6
- robosystems_client/models/billing_customer.py +8 -8
- robosystems_client/models/checkout_response.py +65 -22
- robosystems_client/models/checkout_status_response.py +2 -1
- robosystems_client/models/create_checkout_request.py +2 -1
- robosystems_client/models/create_checkout_request_resource_config.py +4 -1
- robosystems_client/models/create_org_request.py +79 -0
- robosystems_client/models/graph_subscription_tier.py +40 -48
- robosystems_client/models/graph_subscriptions.py +17 -5
- robosystems_client/models/invite_member_request.py +93 -0
- robosystems_client/models/list_org_graphs_response_200_item.py +44 -0
- robosystems_client/models/org_detail_response.py +174 -0
- robosystems_client/models/org_detail_response_graphs_item.py +44 -0
- robosystems_client/models/org_detail_response_limits_type_0.py +44 -0
- robosystems_client/models/org_detail_response_members_item.py +44 -0
- robosystems_client/models/org_limits_response.py +98 -0
- robosystems_client/models/org_limits_response_current_usage.py +44 -0
- robosystems_client/models/org_list_response.py +82 -0
- robosystems_client/models/org_member_list_response.py +90 -0
- robosystems_client/models/org_member_response.py +104 -0
- robosystems_client/models/org_response.py +121 -0
- robosystems_client/models/org_role.py +10 -0
- robosystems_client/models/org_type.py +10 -0
- robosystems_client/models/org_usage_response.py +146 -0
- robosystems_client/models/org_usage_response_daily_trend_item.py +44 -0
- robosystems_client/models/org_usage_response_graph_details_item.py +44 -0
- robosystems_client/models/org_usage_summary.py +158 -0
- robosystems_client/models/repository_subscriptions.py +15 -4
- robosystems_client/models/service_offerings_response.py +15 -0
- robosystems_client/models/update_member_role_request.py +62 -0
- robosystems_client/models/update_org_request.py +103 -0
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.13.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.13.dist-info}/RECORD +70 -37
- robosystems_client/models/user_limits_response.py +0 -95
- robosystems_client/models/user_usage_response.py +0 -90
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.13.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,14 +5,17 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
8
9
|
from ...models.upcoming_invoice import UpcomingInvoice
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
def _get_kwargs(
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
org_id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
13
16
|
_kwargs: dict[str, Any] = {
|
|
14
17
|
"method": "get",
|
|
15
|
-
"url": "/v1/billing/invoices/upcoming",
|
|
18
|
+
"url": f"/v1/billing/invoices/{org_id}/upcoming",
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
return _kwargs
|
|
@@ -20,7 +23,7 @@ def _get_kwargs() -> dict[str, Any]:
|
|
|
20
23
|
|
|
21
24
|
def _parse_response(
|
|
22
25
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
-
) -> Optional[Union["UpcomingInvoice", None]]:
|
|
26
|
+
) -> Optional[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
24
27
|
if response.status_code == 200:
|
|
25
28
|
|
|
26
29
|
def _parse_response_200(data: object) -> Union["UpcomingInvoice", None]:
|
|
@@ -40,6 +43,11 @@ def _parse_response(
|
|
|
40
43
|
|
|
41
44
|
return response_200
|
|
42
45
|
|
|
46
|
+
if response.status_code == 422:
|
|
47
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_422
|
|
50
|
+
|
|
43
51
|
if client.raise_on_unexpected_status:
|
|
44
52
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
53
|
else:
|
|
@@ -48,7 +56,7 @@ def _parse_response(
|
|
|
48
56
|
|
|
49
57
|
def _build_response(
|
|
50
58
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
-
) -> Response[Union["UpcomingInvoice", None]]:
|
|
59
|
+
) -> Response[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
52
60
|
return Response(
|
|
53
61
|
status_code=HTTPStatus(response.status_code),
|
|
54
62
|
content=response.content,
|
|
@@ -58,24 +66,34 @@ def _build_response(
|
|
|
58
66
|
|
|
59
67
|
|
|
60
68
|
def sync_detailed(
|
|
69
|
+
org_id: str,
|
|
61
70
|
*,
|
|
62
71
|
client: AuthenticatedClient,
|
|
63
|
-
) -> Response[Union["UpcomingInvoice", None]]:
|
|
64
|
-
"""Get Upcoming Invoice
|
|
72
|
+
) -> Response[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
73
|
+
"""Get Organization Upcoming Invoice
|
|
65
74
|
|
|
66
|
-
Get preview of the next invoice.
|
|
75
|
+
Get preview of the next invoice for an organization.
|
|
67
76
|
|
|
68
77
|
Returns estimated charges for the next billing period.
|
|
69
78
|
|
|
79
|
+
**Requirements:**
|
|
80
|
+
- User must be a member of the organization
|
|
81
|
+
- Full invoice details are only visible to owners and admins
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
org_id (str):
|
|
85
|
+
|
|
70
86
|
Raises:
|
|
71
87
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
72
88
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
73
89
|
|
|
74
90
|
Returns:
|
|
75
|
-
Response[Union['UpcomingInvoice', None]]
|
|
91
|
+
Response[Union[HTTPValidationError, Union['UpcomingInvoice', None]]]
|
|
76
92
|
"""
|
|
77
93
|
|
|
78
|
-
kwargs = _get_kwargs(
|
|
94
|
+
kwargs = _get_kwargs(
|
|
95
|
+
org_id=org_id,
|
|
96
|
+
)
|
|
79
97
|
|
|
80
98
|
response = client.get_httpx_client().request(
|
|
81
99
|
**kwargs,
|
|
@@ -85,47 +103,66 @@ def sync_detailed(
|
|
|
85
103
|
|
|
86
104
|
|
|
87
105
|
def sync(
|
|
106
|
+
org_id: str,
|
|
88
107
|
*,
|
|
89
108
|
client: AuthenticatedClient,
|
|
90
|
-
) -> Optional[Union["UpcomingInvoice", None]]:
|
|
91
|
-
"""Get Upcoming Invoice
|
|
109
|
+
) -> Optional[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
110
|
+
"""Get Organization Upcoming Invoice
|
|
92
111
|
|
|
93
|
-
Get preview of the next invoice.
|
|
112
|
+
Get preview of the next invoice for an organization.
|
|
94
113
|
|
|
95
114
|
Returns estimated charges for the next billing period.
|
|
96
115
|
|
|
116
|
+
**Requirements:**
|
|
117
|
+
- User must be a member of the organization
|
|
118
|
+
- Full invoice details are only visible to owners and admins
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
org_id (str):
|
|
122
|
+
|
|
97
123
|
Raises:
|
|
98
124
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
99
125
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
126
|
|
|
101
127
|
Returns:
|
|
102
|
-
Union['UpcomingInvoice', None]
|
|
128
|
+
Union[HTTPValidationError, Union['UpcomingInvoice', None]]
|
|
103
129
|
"""
|
|
104
130
|
|
|
105
131
|
return sync_detailed(
|
|
132
|
+
org_id=org_id,
|
|
106
133
|
client=client,
|
|
107
134
|
).parsed
|
|
108
135
|
|
|
109
136
|
|
|
110
137
|
async def asyncio_detailed(
|
|
138
|
+
org_id: str,
|
|
111
139
|
*,
|
|
112
140
|
client: AuthenticatedClient,
|
|
113
|
-
) -> Response[Union["UpcomingInvoice", None]]:
|
|
114
|
-
"""Get Upcoming Invoice
|
|
141
|
+
) -> Response[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
142
|
+
"""Get Organization Upcoming Invoice
|
|
115
143
|
|
|
116
|
-
Get preview of the next invoice.
|
|
144
|
+
Get preview of the next invoice for an organization.
|
|
117
145
|
|
|
118
146
|
Returns estimated charges for the next billing period.
|
|
119
147
|
|
|
148
|
+
**Requirements:**
|
|
149
|
+
- User must be a member of the organization
|
|
150
|
+
- Full invoice details are only visible to owners and admins
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
org_id (str):
|
|
154
|
+
|
|
120
155
|
Raises:
|
|
121
156
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
122
157
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
123
158
|
|
|
124
159
|
Returns:
|
|
125
|
-
Response[Union['UpcomingInvoice', None]]
|
|
160
|
+
Response[Union[HTTPValidationError, Union['UpcomingInvoice', None]]]
|
|
126
161
|
"""
|
|
127
162
|
|
|
128
|
-
kwargs = _get_kwargs(
|
|
163
|
+
kwargs = _get_kwargs(
|
|
164
|
+
org_id=org_id,
|
|
165
|
+
)
|
|
129
166
|
|
|
130
167
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
131
168
|
|
|
@@ -133,25 +170,34 @@ async def asyncio_detailed(
|
|
|
133
170
|
|
|
134
171
|
|
|
135
172
|
async def asyncio(
|
|
173
|
+
org_id: str,
|
|
136
174
|
*,
|
|
137
175
|
client: AuthenticatedClient,
|
|
138
|
-
) -> Optional[Union["UpcomingInvoice", None]]:
|
|
139
|
-
"""Get Upcoming Invoice
|
|
176
|
+
) -> Optional[Union[HTTPValidationError, Union["UpcomingInvoice", None]]]:
|
|
177
|
+
"""Get Organization Upcoming Invoice
|
|
140
178
|
|
|
141
|
-
Get preview of the next invoice.
|
|
179
|
+
Get preview of the next invoice for an organization.
|
|
142
180
|
|
|
143
181
|
Returns estimated charges for the next billing period.
|
|
144
182
|
|
|
183
|
+
**Requirements:**
|
|
184
|
+
- User must be a member of the organization
|
|
185
|
+
- Full invoice details are only visible to owners and admins
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
org_id (str):
|
|
189
|
+
|
|
145
190
|
Raises:
|
|
146
191
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
147
192
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
148
193
|
|
|
149
194
|
Returns:
|
|
150
|
-
Union['UpcomingInvoice', None]
|
|
195
|
+
Union[HTTPValidationError, Union['UpcomingInvoice', None]]
|
|
151
196
|
"""
|
|
152
197
|
|
|
153
198
|
return (
|
|
154
199
|
await asyncio_detailed(
|
|
200
|
+
org_id=org_id,
|
|
155
201
|
client=client,
|
|
156
202
|
)
|
|
157
203
|
).parsed
|
|
@@ -11,6 +11,7 @@ from ...types import UNSET, Response, Unset
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _get_kwargs(
|
|
14
|
+
org_id: str,
|
|
14
15
|
*,
|
|
15
16
|
limit: Union[Unset, int] = 10,
|
|
16
17
|
) -> dict[str, Any]:
|
|
@@ -22,7 +23,7 @@ def _get_kwargs(
|
|
|
22
23
|
|
|
23
24
|
_kwargs: dict[str, Any] = {
|
|
24
25
|
"method": "get",
|
|
25
|
-
"url": "/v1/billing/invoices",
|
|
26
|
+
"url": f"/v1/billing/invoices/{org_id}",
|
|
26
27
|
"params": params,
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -60,17 +61,23 @@ def _build_response(
|
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
def sync_detailed(
|
|
64
|
+
org_id: str,
|
|
63
65
|
*,
|
|
64
66
|
client: AuthenticatedClient,
|
|
65
67
|
limit: Union[Unset, int] = 10,
|
|
66
68
|
) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
|
|
67
|
-
"""List Invoices
|
|
69
|
+
"""List Organization Invoices
|
|
68
70
|
|
|
69
|
-
List payment history and invoices.
|
|
71
|
+
List payment history and invoices for an organization.
|
|
70
72
|
|
|
71
73
|
Returns past invoices with payment status, amounts, and line items.
|
|
72
74
|
|
|
75
|
+
**Requirements:**
|
|
76
|
+
- User must be a member of the organization
|
|
77
|
+
- Full invoice details are only visible to owners and admins
|
|
78
|
+
|
|
73
79
|
Args:
|
|
80
|
+
org_id (str):
|
|
74
81
|
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
75
82
|
|
|
76
83
|
Raises:
|
|
@@ -82,6 +89,7 @@ def sync_detailed(
|
|
|
82
89
|
"""
|
|
83
90
|
|
|
84
91
|
kwargs = _get_kwargs(
|
|
92
|
+
org_id=org_id,
|
|
85
93
|
limit=limit,
|
|
86
94
|
)
|
|
87
95
|
|
|
@@ -93,17 +101,23 @@ def sync_detailed(
|
|
|
93
101
|
|
|
94
102
|
|
|
95
103
|
def sync(
|
|
104
|
+
org_id: str,
|
|
96
105
|
*,
|
|
97
106
|
client: AuthenticatedClient,
|
|
98
107
|
limit: Union[Unset, int] = 10,
|
|
99
108
|
) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
|
|
100
|
-
"""List Invoices
|
|
109
|
+
"""List Organization Invoices
|
|
101
110
|
|
|
102
|
-
List payment history and invoices.
|
|
111
|
+
List payment history and invoices for an organization.
|
|
103
112
|
|
|
104
113
|
Returns past invoices with payment status, amounts, and line items.
|
|
105
114
|
|
|
115
|
+
**Requirements:**
|
|
116
|
+
- User must be a member of the organization
|
|
117
|
+
- Full invoice details are only visible to owners and admins
|
|
118
|
+
|
|
106
119
|
Args:
|
|
120
|
+
org_id (str):
|
|
107
121
|
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
108
122
|
|
|
109
123
|
Raises:
|
|
@@ -115,23 +129,30 @@ def sync(
|
|
|
115
129
|
"""
|
|
116
130
|
|
|
117
131
|
return sync_detailed(
|
|
132
|
+
org_id=org_id,
|
|
118
133
|
client=client,
|
|
119
134
|
limit=limit,
|
|
120
135
|
).parsed
|
|
121
136
|
|
|
122
137
|
|
|
123
138
|
async def asyncio_detailed(
|
|
139
|
+
org_id: str,
|
|
124
140
|
*,
|
|
125
141
|
client: AuthenticatedClient,
|
|
126
142
|
limit: Union[Unset, int] = 10,
|
|
127
143
|
) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
|
|
128
|
-
"""List Invoices
|
|
144
|
+
"""List Organization Invoices
|
|
129
145
|
|
|
130
|
-
List payment history and invoices.
|
|
146
|
+
List payment history and invoices for an organization.
|
|
131
147
|
|
|
132
148
|
Returns past invoices with payment status, amounts, and line items.
|
|
133
149
|
|
|
150
|
+
**Requirements:**
|
|
151
|
+
- User must be a member of the organization
|
|
152
|
+
- Full invoice details are only visible to owners and admins
|
|
153
|
+
|
|
134
154
|
Args:
|
|
155
|
+
org_id (str):
|
|
135
156
|
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
136
157
|
|
|
137
158
|
Raises:
|
|
@@ -143,6 +164,7 @@ async def asyncio_detailed(
|
|
|
143
164
|
"""
|
|
144
165
|
|
|
145
166
|
kwargs = _get_kwargs(
|
|
167
|
+
org_id=org_id,
|
|
146
168
|
limit=limit,
|
|
147
169
|
)
|
|
148
170
|
|
|
@@ -152,17 +174,23 @@ async def asyncio_detailed(
|
|
|
152
174
|
|
|
153
175
|
|
|
154
176
|
async def asyncio(
|
|
177
|
+
org_id: str,
|
|
155
178
|
*,
|
|
156
179
|
client: AuthenticatedClient,
|
|
157
180
|
limit: Union[Unset, int] = 10,
|
|
158
181
|
) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
|
|
159
|
-
"""List Invoices
|
|
182
|
+
"""List Organization Invoices
|
|
160
183
|
|
|
161
|
-
List payment history and invoices.
|
|
184
|
+
List payment history and invoices for an organization.
|
|
162
185
|
|
|
163
186
|
Returns past invoices with payment status, amounts, and line items.
|
|
164
187
|
|
|
188
|
+
**Requirements:**
|
|
189
|
+
- User must be a member of the organization
|
|
190
|
+
- Full invoice details are only visible to owners and admins
|
|
191
|
+
|
|
165
192
|
Args:
|
|
193
|
+
org_id (str):
|
|
166
194
|
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
167
195
|
|
|
168
196
|
Raises:
|
|
@@ -175,6 +203,7 @@ async def asyncio(
|
|
|
175
203
|
|
|
176
204
|
return (
|
|
177
205
|
await asyncio_detailed(
|
|
206
|
+
org_id=org_id,
|
|
178
207
|
client=client,
|
|
179
208
|
limit=limit,
|
|
180
209
|
)
|
|
@@ -6,13 +6,16 @@ import httpx
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
8
|
from ...models.graph_subscription_response import GraphSubscriptionResponse
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
def _get_kwargs(
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
org_id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
13
16
|
_kwargs: dict[str, Any] = {
|
|
14
17
|
"method": "get",
|
|
15
|
-
"url": "/v1/billing/subscriptions",
|
|
18
|
+
"url": f"/v1/billing/subscriptions/{org_id}",
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
return _kwargs
|
|
@@ -20,7 +23,7 @@ def _get_kwargs() -> dict[str, Any]:
|
|
|
20
23
|
|
|
21
24
|
def _parse_response(
|
|
22
25
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
-
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
26
|
+
) -> Optional[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
24
27
|
if response.status_code == 200:
|
|
25
28
|
response_200 = []
|
|
26
29
|
_response_200 = response.json()
|
|
@@ -31,6 +34,11 @@ def _parse_response(
|
|
|
31
34
|
|
|
32
35
|
return response_200
|
|
33
36
|
|
|
37
|
+
if response.status_code == 422:
|
|
38
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_422
|
|
41
|
+
|
|
34
42
|
if client.raise_on_unexpected_status:
|
|
35
43
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
36
44
|
else:
|
|
@@ -39,7 +47,7 @@ def _parse_response(
|
|
|
39
47
|
|
|
40
48
|
def _build_response(
|
|
41
49
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
42
|
-
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
50
|
+
) -> Response[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
43
51
|
return Response(
|
|
44
52
|
status_code=HTTPStatus(response.status_code),
|
|
45
53
|
content=response.content,
|
|
@@ -49,25 +57,34 @@ def _build_response(
|
|
|
49
57
|
|
|
50
58
|
|
|
51
59
|
def sync_detailed(
|
|
60
|
+
org_id: str,
|
|
52
61
|
*,
|
|
53
62
|
client: AuthenticatedClient,
|
|
54
|
-
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
55
|
-
"""List
|
|
63
|
+
) -> Response[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
64
|
+
"""List Organization Subscriptions
|
|
56
65
|
|
|
57
|
-
List all active and past subscriptions for
|
|
66
|
+
List all active and past subscriptions for an organization.
|
|
58
67
|
|
|
59
68
|
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
60
69
|
information.
|
|
61
70
|
|
|
71
|
+
**Requirements:**
|
|
72
|
+
- User must be a member of the organization
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
org_id (str):
|
|
76
|
+
|
|
62
77
|
Raises:
|
|
63
78
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
64
79
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
80
|
|
|
66
81
|
Returns:
|
|
67
|
-
Response[list['GraphSubscriptionResponse']]
|
|
82
|
+
Response[Union[HTTPValidationError, list['GraphSubscriptionResponse']]]
|
|
68
83
|
"""
|
|
69
84
|
|
|
70
|
-
kwargs = _get_kwargs(
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
org_id=org_id,
|
|
87
|
+
)
|
|
71
88
|
|
|
72
89
|
response = client.get_httpx_client().request(
|
|
73
90
|
**kwargs,
|
|
@@ -77,49 +94,66 @@ def sync_detailed(
|
|
|
77
94
|
|
|
78
95
|
|
|
79
96
|
def sync(
|
|
97
|
+
org_id: str,
|
|
80
98
|
*,
|
|
81
99
|
client: AuthenticatedClient,
|
|
82
|
-
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
83
|
-
"""List
|
|
100
|
+
) -> Optional[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
101
|
+
"""List Organization Subscriptions
|
|
84
102
|
|
|
85
|
-
List all active and past subscriptions for
|
|
103
|
+
List all active and past subscriptions for an organization.
|
|
86
104
|
|
|
87
105
|
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
88
106
|
information.
|
|
89
107
|
|
|
108
|
+
**Requirements:**
|
|
109
|
+
- User must be a member of the organization
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
org_id (str):
|
|
113
|
+
|
|
90
114
|
Raises:
|
|
91
115
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
116
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
117
|
|
|
94
118
|
Returns:
|
|
95
|
-
list['GraphSubscriptionResponse']
|
|
119
|
+
Union[HTTPValidationError, list['GraphSubscriptionResponse']]
|
|
96
120
|
"""
|
|
97
121
|
|
|
98
122
|
return sync_detailed(
|
|
123
|
+
org_id=org_id,
|
|
99
124
|
client=client,
|
|
100
125
|
).parsed
|
|
101
126
|
|
|
102
127
|
|
|
103
128
|
async def asyncio_detailed(
|
|
129
|
+
org_id: str,
|
|
104
130
|
*,
|
|
105
131
|
client: AuthenticatedClient,
|
|
106
|
-
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
107
|
-
"""List
|
|
132
|
+
) -> Response[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
133
|
+
"""List Organization Subscriptions
|
|
108
134
|
|
|
109
|
-
List all active and past subscriptions for
|
|
135
|
+
List all active and past subscriptions for an organization.
|
|
110
136
|
|
|
111
137
|
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
112
138
|
information.
|
|
113
139
|
|
|
140
|
+
**Requirements:**
|
|
141
|
+
- User must be a member of the organization
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
org_id (str):
|
|
145
|
+
|
|
114
146
|
Raises:
|
|
115
147
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
116
148
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
149
|
|
|
118
150
|
Returns:
|
|
119
|
-
Response[list['GraphSubscriptionResponse']]
|
|
151
|
+
Response[Union[HTTPValidationError, list['GraphSubscriptionResponse']]]
|
|
120
152
|
"""
|
|
121
153
|
|
|
122
|
-
kwargs = _get_kwargs(
|
|
154
|
+
kwargs = _get_kwargs(
|
|
155
|
+
org_id=org_id,
|
|
156
|
+
)
|
|
123
157
|
|
|
124
158
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
125
159
|
|
|
@@ -127,26 +161,34 @@ async def asyncio_detailed(
|
|
|
127
161
|
|
|
128
162
|
|
|
129
163
|
async def asyncio(
|
|
164
|
+
org_id: str,
|
|
130
165
|
*,
|
|
131
166
|
client: AuthenticatedClient,
|
|
132
|
-
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
133
|
-
"""List
|
|
167
|
+
) -> Optional[Union[HTTPValidationError, list["GraphSubscriptionResponse"]]]:
|
|
168
|
+
"""List Organization Subscriptions
|
|
134
169
|
|
|
135
|
-
List all active and past subscriptions for
|
|
170
|
+
List all active and past subscriptions for an organization.
|
|
136
171
|
|
|
137
172
|
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
138
173
|
information.
|
|
139
174
|
|
|
175
|
+
**Requirements:**
|
|
176
|
+
- User must be a member of the organization
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
org_id (str):
|
|
180
|
+
|
|
140
181
|
Raises:
|
|
141
182
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
183
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
184
|
|
|
144
185
|
Returns:
|
|
145
|
-
list['GraphSubscriptionResponse']
|
|
186
|
+
Union[HTTPValidationError, list['GraphSubscriptionResponse']]
|
|
146
187
|
"""
|
|
147
188
|
|
|
148
189
|
return (
|
|
149
190
|
await asyncio_detailed(
|
|
191
|
+
org_id=org_id,
|
|
150
192
|
client=client,
|
|
151
193
|
)
|
|
152
194
|
).parsed
|
|
@@ -12,6 +12,7 @@ from ...types import Response
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _get_kwargs(
|
|
15
|
+
org_id: str,
|
|
15
16
|
*,
|
|
16
17
|
body: UpdatePaymentMethodRequest,
|
|
17
18
|
) -> dict[str, Any]:
|
|
@@ -19,7 +20,7 @@ def _get_kwargs(
|
|
|
19
20
|
|
|
20
21
|
_kwargs: dict[str, Any] = {
|
|
21
22
|
"method": "post",
|
|
22
|
-
"url": "/v1/billing/customer/payment-method",
|
|
23
|
+
"url": f"/v1/billing/customer/{org_id}/payment-method",
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
_kwargs["json"] = body.to_dict()
|
|
@@ -61,17 +62,22 @@ def _build_response(
|
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
def sync_detailed(
|
|
65
|
+
org_id: str,
|
|
64
66
|
*,
|
|
65
67
|
client: AuthenticatedClient,
|
|
66
68
|
body: UpdatePaymentMethodRequest,
|
|
67
69
|
) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
68
|
-
"""Update Default Payment Method
|
|
70
|
+
"""Update Organization Default Payment Method
|
|
69
71
|
|
|
70
|
-
Update the default payment method for the
|
|
72
|
+
Update the default payment method for the organization.
|
|
71
73
|
|
|
72
74
|
This changes which payment method will be used for future subscription charges.
|
|
73
75
|
|
|
76
|
+
**Requirements:**
|
|
77
|
+
- User must be an OWNER of the organization
|
|
78
|
+
|
|
74
79
|
Args:
|
|
80
|
+
org_id (str):
|
|
75
81
|
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
76
82
|
|
|
77
83
|
Raises:
|
|
@@ -83,6 +89,7 @@ def sync_detailed(
|
|
|
83
89
|
"""
|
|
84
90
|
|
|
85
91
|
kwargs = _get_kwargs(
|
|
92
|
+
org_id=org_id,
|
|
86
93
|
body=body,
|
|
87
94
|
)
|
|
88
95
|
|
|
@@ -94,17 +101,22 @@ def sync_detailed(
|
|
|
94
101
|
|
|
95
102
|
|
|
96
103
|
def sync(
|
|
104
|
+
org_id: str,
|
|
97
105
|
*,
|
|
98
106
|
client: AuthenticatedClient,
|
|
99
107
|
body: UpdatePaymentMethodRequest,
|
|
100
108
|
) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
101
|
-
"""Update Default Payment Method
|
|
109
|
+
"""Update Organization Default Payment Method
|
|
102
110
|
|
|
103
|
-
Update the default payment method for the
|
|
111
|
+
Update the default payment method for the organization.
|
|
104
112
|
|
|
105
113
|
This changes which payment method will be used for future subscription charges.
|
|
106
114
|
|
|
115
|
+
**Requirements:**
|
|
116
|
+
- User must be an OWNER of the organization
|
|
117
|
+
|
|
107
118
|
Args:
|
|
119
|
+
org_id (str):
|
|
108
120
|
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
109
121
|
|
|
110
122
|
Raises:
|
|
@@ -116,23 +128,29 @@ def sync(
|
|
|
116
128
|
"""
|
|
117
129
|
|
|
118
130
|
return sync_detailed(
|
|
131
|
+
org_id=org_id,
|
|
119
132
|
client=client,
|
|
120
133
|
body=body,
|
|
121
134
|
).parsed
|
|
122
135
|
|
|
123
136
|
|
|
124
137
|
async def asyncio_detailed(
|
|
138
|
+
org_id: str,
|
|
125
139
|
*,
|
|
126
140
|
client: AuthenticatedClient,
|
|
127
141
|
body: UpdatePaymentMethodRequest,
|
|
128
142
|
) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
129
|
-
"""Update Default Payment Method
|
|
143
|
+
"""Update Organization Default Payment Method
|
|
130
144
|
|
|
131
|
-
Update the default payment method for the
|
|
145
|
+
Update the default payment method for the organization.
|
|
132
146
|
|
|
133
147
|
This changes which payment method will be used for future subscription charges.
|
|
134
148
|
|
|
149
|
+
**Requirements:**
|
|
150
|
+
- User must be an OWNER of the organization
|
|
151
|
+
|
|
135
152
|
Args:
|
|
153
|
+
org_id (str):
|
|
136
154
|
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
137
155
|
|
|
138
156
|
Raises:
|
|
@@ -144,6 +162,7 @@ async def asyncio_detailed(
|
|
|
144
162
|
"""
|
|
145
163
|
|
|
146
164
|
kwargs = _get_kwargs(
|
|
165
|
+
org_id=org_id,
|
|
147
166
|
body=body,
|
|
148
167
|
)
|
|
149
168
|
|
|
@@ -153,17 +172,22 @@ async def asyncio_detailed(
|
|
|
153
172
|
|
|
154
173
|
|
|
155
174
|
async def asyncio(
|
|
175
|
+
org_id: str,
|
|
156
176
|
*,
|
|
157
177
|
client: AuthenticatedClient,
|
|
158
178
|
body: UpdatePaymentMethodRequest,
|
|
159
179
|
) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
160
|
-
"""Update Default Payment Method
|
|
180
|
+
"""Update Organization Default Payment Method
|
|
161
181
|
|
|
162
|
-
Update the default payment method for the
|
|
182
|
+
Update the default payment method for the organization.
|
|
163
183
|
|
|
164
184
|
This changes which payment method will be used for future subscription charges.
|
|
165
185
|
|
|
186
|
+
**Requirements:**
|
|
187
|
+
- User must be an OWNER of the organization
|
|
188
|
+
|
|
166
189
|
Args:
|
|
190
|
+
org_id (str):
|
|
167
191
|
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
168
192
|
|
|
169
193
|
Raises:
|
|
@@ -176,6 +200,7 @@ async def asyncio(
|
|
|
176
200
|
|
|
177
201
|
return (
|
|
178
202
|
await asyncio_detailed(
|
|
203
|
+
org_id=org_id,
|
|
179
204
|
client=client,
|
|
180
205
|
body=body,
|
|
181
206
|
)
|