robosystems-client 0.2.9__py3-none-any.whl → 0.2.11__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.
- robosystems_client/api/{user_subscriptions/upgrade_shared_repository_subscription.py → billing/cancel_subscription.py} +32 -60
- robosystems_client/api/billing/create_checkout_session.py +230 -0
- robosystems_client/api/{user_analytics/get_user_usage_overview.py → billing/get_billing_customer.py} +29 -21
- robosystems_client/api/billing/get_checkout_status.py +221 -0
- robosystems_client/api/{user_subscriptions/get_repository_credits.py → billing/get_subscription.py} +35 -43
- robosystems_client/api/{user_subscriptions/get_shared_repository_credits.py → billing/get_upcoming_invoice.py} +42 -28
- robosystems_client/api/{user_subscriptions/get_user_shared_subscriptions.py → billing/list_invoices.py} +44 -44
- robosystems_client/api/{user_limits/get_all_shared_repository_limits.py → billing/list_subscriptions.py} +38 -27
- robosystems_client/api/{user_subscriptions/subscribe_to_shared_repository.py → billing/update_payment_method.py} +42 -46
- robosystems_client/api/{user_subscriptions/cancel_shared_repository_subscription.py → subscriptions/cancel_subscription.py} +41 -25
- robosystems_client/api/subscriptions/create_repository_subscription.py +217 -0
- robosystems_client/api/subscriptions/get_graph_subscription.py +197 -0
- robosystems_client/api/subscriptions/upgrade_subscription.py +203 -0
- robosystems_client/api/usage/get_graph_usage_analytics.py +377 -0
- robosystems_client/api/{user_limits/get_user_usage.py → user/get_user_limits.py} +13 -9
- robosystems_client/models/__init__.py +42 -82
- robosystems_client/models/billing_customer.py +128 -0
- robosystems_client/models/checkout_response.py +87 -0
- robosystems_client/models/checkout_status_response.py +130 -0
- robosystems_client/models/create_checkout_request.py +88 -0
- robosystems_client/models/{graph_usage_response_query_statistics.py → create_checkout_request_resource_config.py} +6 -6
- robosystems_client/models/{credits_summary_response_credits_by_addon_type_0_item.py → create_repository_subscription_request.py} +22 -6
- robosystems_client/models/credit_summary.py +55 -89
- robosystems_client/models/{graph_usage_response_storage_usage.py → credit_summary_operation_breakdown.py} +6 -6
- robosystems_client/models/graph_subscription_response.py +200 -0
- robosystems_client/models/graph_usage_response.py +136 -39
- robosystems_client/models/{user_analytics_response_limits.py → graph_usage_response_recent_events_item.py} +6 -6
- robosystems_client/models/invoice.py +244 -0
- robosystems_client/models/invoice_line_item.py +118 -0
- robosystems_client/models/invoices_response.py +90 -0
- robosystems_client/models/payment_method.py +158 -0
- robosystems_client/models/performance_insights.py +120 -0
- robosystems_client/models/{graph_usage_response_recent_activity.py → performance_insights_operation_stats.py} +6 -6
- robosystems_client/models/{user_analytics_response_api_usage.py → performance_insights_slow_queries_item.py} +6 -6
- robosystems_client/models/storage_summary.py +100 -0
- robosystems_client/models/upcoming_invoice.py +128 -0
- robosystems_client/models/{get_graph_usage_details_response_getgraphusagedetails.py → update_payment_method_request.py} +22 -6
- robosystems_client/models/{subscription_response.py → update_payment_method_response.py} +14 -14
- robosystems_client/models/{tier_upgrade_request.py → upgrade_subscription_request.py} +12 -14
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/RECORD +53 -68
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -289
- robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -253
- robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -298
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -284
- robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -320
- robosystems_client/api/user/get_all_credit_summaries.py +0 -169
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -188
- robosystems_client/api/user_limits/__init__.py +0 -1
- robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -213
- robosystems_client/api/user_limits/get_user_limits.py +0 -139
- robosystems_client/api/user_subscriptions/__init__.py +0 -1
- robosystems_client/models/add_on_credit_info.py +0 -119
- robosystems_client/models/credits_summary_response.py +0 -148
- robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +0 -44
- robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +0 -46
- robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +0 -44
- robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +0 -44
- robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +0 -44
- robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +0 -44
- robosystems_client/models/repository_credits_response.py +0 -128
- robosystems_client/models/repository_plan.py +0 -10
- robosystems_client/models/repository_type.py +0 -10
- robosystems_client/models/subscription_info.py +0 -152
- robosystems_client/models/subscription_info_metadata.py +0 -44
- robosystems_client/models/subscription_request.py +0 -80
- robosystems_client/models/user_analytics_response.py +0 -132
- robosystems_client/models/user_analytics_response_graph_usage.py +0 -44
- robosystems_client/models/user_analytics_response_recent_activity_item.py +0 -44
- robosystems_client/models/user_analytics_response_user_info.py +0 -44
- robosystems_client/models/user_graph_summary.py +0 -134
- robosystems_client/models/user_subscriptions_response.py +0 -90
- robosystems_client/models/user_usage_summary_response.py +0 -130
- robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +0 -44
- /robosystems_client/api/{graph_analytics → billing}/__init__.py +0 -0
- /robosystems_client/api/{graph_billing → credits_}/__init__.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/check_credit_balance.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/check_storage_limits.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/get_credit_summary.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/get_storage_usage.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/list_credit_transactions.py +0 -0
- /robosystems_client/api/{graph_credits → subscriptions}/__init__.py +0 -0
- /robosystems_client/api/{user_analytics → usage}/__init__.py +0 -0
- /robosystems_client/api/{graph_analytics → usage}/get_graph_metrics.py +0 -0
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,213 +0,0 @@
|
|
|
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.get_shared_repository_limits_response_getsharedrepositorylimits import (
|
|
9
|
-
GetSharedRepositoryLimitsResponseGetsharedrepositorylimits,
|
|
10
|
-
)
|
|
11
|
-
from ...models.http_validation_error import HTTPValidationError
|
|
12
|
-
from ...types import Response
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def _get_kwargs(
|
|
16
|
-
repository: str,
|
|
17
|
-
) -> dict[str, Any]:
|
|
18
|
-
_kwargs: dict[str, Any] = {
|
|
19
|
-
"method": "get",
|
|
20
|
-
"url": f"/v1/user/limits/shared-repositories/{repository}",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return _kwargs
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def _parse_response(
|
|
27
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
28
|
-
) -> Optional[
|
|
29
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
30
|
-
]:
|
|
31
|
-
if response.status_code == 200:
|
|
32
|
-
response_200 = GetSharedRepositoryLimitsResponseGetsharedrepositorylimits.from_dict(
|
|
33
|
-
response.json()
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
return response_200
|
|
37
|
-
|
|
38
|
-
if response.status_code == 422:
|
|
39
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
40
|
-
|
|
41
|
-
return response_422
|
|
42
|
-
|
|
43
|
-
if client.raise_on_unexpected_status:
|
|
44
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
|
-
else:
|
|
46
|
-
return None
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _build_response(
|
|
50
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
-
) -> Response[
|
|
52
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
53
|
-
]:
|
|
54
|
-
return Response(
|
|
55
|
-
status_code=HTTPStatus(response.status_code),
|
|
56
|
-
content=response.content,
|
|
57
|
-
headers=response.headers,
|
|
58
|
-
parsed=_parse_response(client=client, response=response),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def sync_detailed(
|
|
63
|
-
repository: str,
|
|
64
|
-
*,
|
|
65
|
-
client: AuthenticatedClient,
|
|
66
|
-
) -> Response[
|
|
67
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
68
|
-
]:
|
|
69
|
-
"""Get shared repository rate limit status
|
|
70
|
-
|
|
71
|
-
Get current rate limit status and usage for a shared repository.
|
|
72
|
-
|
|
73
|
-
Returns:
|
|
74
|
-
- Current usage across different time windows
|
|
75
|
-
- Rate limits based on subscription tier
|
|
76
|
-
- Remaining quota
|
|
77
|
-
- Reset times
|
|
78
|
-
|
|
79
|
-
Note: All queries are included - this only shows rate limit status.
|
|
80
|
-
|
|
81
|
-
Args:
|
|
82
|
-
repository (str): Repository name (e.g., 'sec')
|
|
83
|
-
|
|
84
|
-
Raises:
|
|
85
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
86
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
87
|
-
|
|
88
|
-
Returns:
|
|
89
|
-
Response[Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]]
|
|
90
|
-
"""
|
|
91
|
-
|
|
92
|
-
kwargs = _get_kwargs(
|
|
93
|
-
repository=repository,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
response = client.get_httpx_client().request(
|
|
97
|
-
**kwargs,
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
return _build_response(client=client, response=response)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def sync(
|
|
104
|
-
repository: str,
|
|
105
|
-
*,
|
|
106
|
-
client: AuthenticatedClient,
|
|
107
|
-
) -> Optional[
|
|
108
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
109
|
-
]:
|
|
110
|
-
"""Get shared repository rate limit status
|
|
111
|
-
|
|
112
|
-
Get current rate limit status and usage for a shared repository.
|
|
113
|
-
|
|
114
|
-
Returns:
|
|
115
|
-
- Current usage across different time windows
|
|
116
|
-
- Rate limits based on subscription tier
|
|
117
|
-
- Remaining quota
|
|
118
|
-
- Reset times
|
|
119
|
-
|
|
120
|
-
Note: All queries are included - this only shows rate limit status.
|
|
121
|
-
|
|
122
|
-
Args:
|
|
123
|
-
repository (str): Repository name (e.g., 'sec')
|
|
124
|
-
|
|
125
|
-
Raises:
|
|
126
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
127
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
128
|
-
|
|
129
|
-
Returns:
|
|
130
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
131
|
-
"""
|
|
132
|
-
|
|
133
|
-
return sync_detailed(
|
|
134
|
-
repository=repository,
|
|
135
|
-
client=client,
|
|
136
|
-
).parsed
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
async def asyncio_detailed(
|
|
140
|
-
repository: str,
|
|
141
|
-
*,
|
|
142
|
-
client: AuthenticatedClient,
|
|
143
|
-
) -> Response[
|
|
144
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
145
|
-
]:
|
|
146
|
-
"""Get shared repository rate limit status
|
|
147
|
-
|
|
148
|
-
Get current rate limit status and usage for a shared repository.
|
|
149
|
-
|
|
150
|
-
Returns:
|
|
151
|
-
- Current usage across different time windows
|
|
152
|
-
- Rate limits based on subscription tier
|
|
153
|
-
- Remaining quota
|
|
154
|
-
- Reset times
|
|
155
|
-
|
|
156
|
-
Note: All queries are included - this only shows rate limit status.
|
|
157
|
-
|
|
158
|
-
Args:
|
|
159
|
-
repository (str): Repository name (e.g., 'sec')
|
|
160
|
-
|
|
161
|
-
Raises:
|
|
162
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
163
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
164
|
-
|
|
165
|
-
Returns:
|
|
166
|
-
Response[Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]]
|
|
167
|
-
"""
|
|
168
|
-
|
|
169
|
-
kwargs = _get_kwargs(
|
|
170
|
-
repository=repository,
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
174
|
-
|
|
175
|
-
return _build_response(client=client, response=response)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
async def asyncio(
|
|
179
|
-
repository: str,
|
|
180
|
-
*,
|
|
181
|
-
client: AuthenticatedClient,
|
|
182
|
-
) -> Optional[
|
|
183
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
184
|
-
]:
|
|
185
|
-
"""Get shared repository rate limit status
|
|
186
|
-
|
|
187
|
-
Get current rate limit status and usage for a shared repository.
|
|
188
|
-
|
|
189
|
-
Returns:
|
|
190
|
-
- Current usage across different time windows
|
|
191
|
-
- Rate limits based on subscription tier
|
|
192
|
-
- Remaining quota
|
|
193
|
-
- Reset times
|
|
194
|
-
|
|
195
|
-
Note: All queries are included - this only shows rate limit status.
|
|
196
|
-
|
|
197
|
-
Args:
|
|
198
|
-
repository (str): Repository name (e.g., 'sec')
|
|
199
|
-
|
|
200
|
-
Raises:
|
|
201
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
202
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
203
|
-
|
|
204
|
-
Returns:
|
|
205
|
-
Union[GetSharedRepositoryLimitsResponseGetsharedrepositorylimits, HTTPValidationError]
|
|
206
|
-
"""
|
|
207
|
-
|
|
208
|
-
return (
|
|
209
|
-
await asyncio_detailed(
|
|
210
|
-
repository=repository,
|
|
211
|
-
client=client,
|
|
212
|
-
)
|
|
213
|
-
).parsed
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Optional, Union, cast
|
|
3
|
-
|
|
4
|
-
import httpx
|
|
5
|
-
|
|
6
|
-
from ... import errors
|
|
7
|
-
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.user_limits_response import UserLimitsResponse
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs() -> dict[str, Any]:
|
|
13
|
-
_kwargs: dict[str, Any] = {
|
|
14
|
-
"method": "get",
|
|
15
|
-
"url": "/v1/user/limits",
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return _kwargs
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def _parse_response(
|
|
22
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
-
) -> Optional[Union[Any, UserLimitsResponse]]:
|
|
24
|
-
if response.status_code == 200:
|
|
25
|
-
response_200 = UserLimitsResponse.from_dict(response.json())
|
|
26
|
-
|
|
27
|
-
return response_200
|
|
28
|
-
|
|
29
|
-
if response.status_code == 404:
|
|
30
|
-
response_404 = cast(Any, None)
|
|
31
|
-
return response_404
|
|
32
|
-
|
|
33
|
-
if client.raise_on_unexpected_status:
|
|
34
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
35
|
-
else:
|
|
36
|
-
return None
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def _build_response(
|
|
40
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
-
) -> Response[Union[Any, UserLimitsResponse]]:
|
|
42
|
-
return Response(
|
|
43
|
-
status_code=HTTPStatus(response.status_code),
|
|
44
|
-
content=response.content,
|
|
45
|
-
headers=response.headers,
|
|
46
|
-
parsed=_parse_response(client=client, response=response),
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def sync_detailed(
|
|
51
|
-
*,
|
|
52
|
-
client: AuthenticatedClient,
|
|
53
|
-
) -> Response[Union[Any, UserLimitsResponse]]:
|
|
54
|
-
"""Get user limits
|
|
55
|
-
|
|
56
|
-
Retrieve current limits and restrictions for the authenticated user
|
|
57
|
-
|
|
58
|
-
Raises:
|
|
59
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
60
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
|
-
|
|
62
|
-
Returns:
|
|
63
|
-
Response[Union[Any, UserLimitsResponse]]
|
|
64
|
-
"""
|
|
65
|
-
|
|
66
|
-
kwargs = _get_kwargs()
|
|
67
|
-
|
|
68
|
-
response = client.get_httpx_client().request(
|
|
69
|
-
**kwargs,
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
return _build_response(client=client, response=response)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def sync(
|
|
76
|
-
*,
|
|
77
|
-
client: AuthenticatedClient,
|
|
78
|
-
) -> Optional[Union[Any, UserLimitsResponse]]:
|
|
79
|
-
"""Get user limits
|
|
80
|
-
|
|
81
|
-
Retrieve current limits and restrictions for the authenticated user
|
|
82
|
-
|
|
83
|
-
Raises:
|
|
84
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
85
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
86
|
-
|
|
87
|
-
Returns:
|
|
88
|
-
Union[Any, UserLimitsResponse]
|
|
89
|
-
"""
|
|
90
|
-
|
|
91
|
-
return sync_detailed(
|
|
92
|
-
client=client,
|
|
93
|
-
).parsed
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
async def asyncio_detailed(
|
|
97
|
-
*,
|
|
98
|
-
client: AuthenticatedClient,
|
|
99
|
-
) -> Response[Union[Any, UserLimitsResponse]]:
|
|
100
|
-
"""Get user limits
|
|
101
|
-
|
|
102
|
-
Retrieve current limits and restrictions for the authenticated user
|
|
103
|
-
|
|
104
|
-
Raises:
|
|
105
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
106
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
107
|
-
|
|
108
|
-
Returns:
|
|
109
|
-
Response[Union[Any, UserLimitsResponse]]
|
|
110
|
-
"""
|
|
111
|
-
|
|
112
|
-
kwargs = _get_kwargs()
|
|
113
|
-
|
|
114
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
115
|
-
|
|
116
|
-
return _build_response(client=client, response=response)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
async def asyncio(
|
|
120
|
-
*,
|
|
121
|
-
client: AuthenticatedClient,
|
|
122
|
-
) -> Optional[Union[Any, UserLimitsResponse]]:
|
|
123
|
-
"""Get user limits
|
|
124
|
-
|
|
125
|
-
Retrieve current limits and restrictions for the authenticated user
|
|
126
|
-
|
|
127
|
-
Raises:
|
|
128
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
129
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
130
|
-
|
|
131
|
-
Returns:
|
|
132
|
-
Union[Any, UserLimitsResponse]
|
|
133
|
-
"""
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
await asyncio_detailed(
|
|
137
|
-
client=client,
|
|
138
|
-
)
|
|
139
|
-
).parsed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Contains endpoint functions for accessing the API"""
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
from ..types import UNSET, Unset
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="AddOnCreditInfo")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class AddOnCreditInfo:
|
|
14
|
-
"""Credit information for a specific add-on.
|
|
15
|
-
|
|
16
|
-
Attributes:
|
|
17
|
-
subscription_id (str): Subscription ID
|
|
18
|
-
addon_type (str): Add-on type (e.g., sec_data)
|
|
19
|
-
name (str): Display name of the add-on
|
|
20
|
-
tier (str): Subscription tier
|
|
21
|
-
credits_remaining (float): Credits remaining
|
|
22
|
-
credits_allocated (float): Monthly credit allocation
|
|
23
|
-
credits_consumed (float): Credits consumed this month
|
|
24
|
-
rollover_amount (Union[Unset, float]): Credits rolled over from previous month Default: 0.0.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
subscription_id: str
|
|
28
|
-
addon_type: str
|
|
29
|
-
name: str
|
|
30
|
-
tier: str
|
|
31
|
-
credits_remaining: float
|
|
32
|
-
credits_allocated: float
|
|
33
|
-
credits_consumed: float
|
|
34
|
-
rollover_amount: Union[Unset, float] = 0.0
|
|
35
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
-
|
|
37
|
-
def to_dict(self) -> dict[str, Any]:
|
|
38
|
-
subscription_id = self.subscription_id
|
|
39
|
-
|
|
40
|
-
addon_type = self.addon_type
|
|
41
|
-
|
|
42
|
-
name = self.name
|
|
43
|
-
|
|
44
|
-
tier = self.tier
|
|
45
|
-
|
|
46
|
-
credits_remaining = self.credits_remaining
|
|
47
|
-
|
|
48
|
-
credits_allocated = self.credits_allocated
|
|
49
|
-
|
|
50
|
-
credits_consumed = self.credits_consumed
|
|
51
|
-
|
|
52
|
-
rollover_amount = self.rollover_amount
|
|
53
|
-
|
|
54
|
-
field_dict: dict[str, Any] = {}
|
|
55
|
-
field_dict.update(self.additional_properties)
|
|
56
|
-
field_dict.update(
|
|
57
|
-
{
|
|
58
|
-
"subscription_id": subscription_id,
|
|
59
|
-
"addon_type": addon_type,
|
|
60
|
-
"name": name,
|
|
61
|
-
"tier": tier,
|
|
62
|
-
"credits_remaining": credits_remaining,
|
|
63
|
-
"credits_allocated": credits_allocated,
|
|
64
|
-
"credits_consumed": credits_consumed,
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
if rollover_amount is not UNSET:
|
|
68
|
-
field_dict["rollover_amount"] = rollover_amount
|
|
69
|
-
|
|
70
|
-
return field_dict
|
|
71
|
-
|
|
72
|
-
@classmethod
|
|
73
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
74
|
-
d = dict(src_dict)
|
|
75
|
-
subscription_id = d.pop("subscription_id")
|
|
76
|
-
|
|
77
|
-
addon_type = d.pop("addon_type")
|
|
78
|
-
|
|
79
|
-
name = d.pop("name")
|
|
80
|
-
|
|
81
|
-
tier = d.pop("tier")
|
|
82
|
-
|
|
83
|
-
credits_remaining = d.pop("credits_remaining")
|
|
84
|
-
|
|
85
|
-
credits_allocated = d.pop("credits_allocated")
|
|
86
|
-
|
|
87
|
-
credits_consumed = d.pop("credits_consumed")
|
|
88
|
-
|
|
89
|
-
rollover_amount = d.pop("rollover_amount", UNSET)
|
|
90
|
-
|
|
91
|
-
add_on_credit_info = cls(
|
|
92
|
-
subscription_id=subscription_id,
|
|
93
|
-
addon_type=addon_type,
|
|
94
|
-
name=name,
|
|
95
|
-
tier=tier,
|
|
96
|
-
credits_remaining=credits_remaining,
|
|
97
|
-
credits_allocated=credits_allocated,
|
|
98
|
-
credits_consumed=credits_consumed,
|
|
99
|
-
rollover_amount=rollover_amount,
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
add_on_credit_info.additional_properties = d
|
|
103
|
-
return add_on_credit_info
|
|
104
|
-
|
|
105
|
-
@property
|
|
106
|
-
def additional_keys(self) -> list[str]:
|
|
107
|
-
return list(self.additional_properties.keys())
|
|
108
|
-
|
|
109
|
-
def __getitem__(self, key: str) -> Any:
|
|
110
|
-
return self.additional_properties[key]
|
|
111
|
-
|
|
112
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
113
|
-
self.additional_properties[key] = value
|
|
114
|
-
|
|
115
|
-
def __delitem__(self, key: str) -> None:
|
|
116
|
-
del self.additional_properties[key]
|
|
117
|
-
|
|
118
|
-
def __contains__(self, key: str) -> bool:
|
|
119
|
-
return key in self.additional_properties
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
from ..types import UNSET, Unset
|
|
8
|
-
|
|
9
|
-
if TYPE_CHECKING:
|
|
10
|
-
from ..models.add_on_credit_info import AddOnCreditInfo
|
|
11
|
-
from ..models.credits_summary_response_credits_by_addon_type_0_item import (
|
|
12
|
-
CreditsSummaryResponseCreditsByAddonType0Item,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
T = TypeVar("T", bound="CreditsSummaryResponse")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@_attrs_define
|
|
20
|
-
class CreditsSummaryResponse:
|
|
21
|
-
"""Response for credits summary.
|
|
22
|
-
|
|
23
|
-
Attributes:
|
|
24
|
-
add_ons (list['AddOnCreditInfo']): Credits breakdown by add-on
|
|
25
|
-
total_credits (float): Total credits remaining across all subscriptions
|
|
26
|
-
addon_count (int): Number of active add-ons
|
|
27
|
-
credits_by_addon (Union[None, Unset, list['CreditsSummaryResponseCreditsByAddonType0Item']]): Legacy field -
|
|
28
|
-
Credits breakdown by add-on
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
add_ons: list["AddOnCreditInfo"]
|
|
32
|
-
total_credits: float
|
|
33
|
-
addon_count: int
|
|
34
|
-
credits_by_addon: Union[
|
|
35
|
-
None, Unset, list["CreditsSummaryResponseCreditsByAddonType0Item"]
|
|
36
|
-
] = UNSET
|
|
37
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
-
|
|
39
|
-
def to_dict(self) -> dict[str, Any]:
|
|
40
|
-
add_ons = []
|
|
41
|
-
for add_ons_item_data in self.add_ons:
|
|
42
|
-
add_ons_item = add_ons_item_data.to_dict()
|
|
43
|
-
add_ons.append(add_ons_item)
|
|
44
|
-
|
|
45
|
-
total_credits = self.total_credits
|
|
46
|
-
|
|
47
|
-
addon_count = self.addon_count
|
|
48
|
-
|
|
49
|
-
credits_by_addon: Union[None, Unset, list[dict[str, Any]]]
|
|
50
|
-
if isinstance(self.credits_by_addon, Unset):
|
|
51
|
-
credits_by_addon = UNSET
|
|
52
|
-
elif isinstance(self.credits_by_addon, list):
|
|
53
|
-
credits_by_addon = []
|
|
54
|
-
for credits_by_addon_type_0_item_data in self.credits_by_addon:
|
|
55
|
-
credits_by_addon_type_0_item = credits_by_addon_type_0_item_data.to_dict()
|
|
56
|
-
credits_by_addon.append(credits_by_addon_type_0_item)
|
|
57
|
-
|
|
58
|
-
else:
|
|
59
|
-
credits_by_addon = self.credits_by_addon
|
|
60
|
-
|
|
61
|
-
field_dict: dict[str, Any] = {}
|
|
62
|
-
field_dict.update(self.additional_properties)
|
|
63
|
-
field_dict.update(
|
|
64
|
-
{
|
|
65
|
-
"add_ons": add_ons,
|
|
66
|
-
"total_credits": total_credits,
|
|
67
|
-
"addon_count": addon_count,
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
if credits_by_addon is not UNSET:
|
|
71
|
-
field_dict["credits_by_addon"] = credits_by_addon
|
|
72
|
-
|
|
73
|
-
return field_dict
|
|
74
|
-
|
|
75
|
-
@classmethod
|
|
76
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
-
from ..models.add_on_credit_info import AddOnCreditInfo
|
|
78
|
-
from ..models.credits_summary_response_credits_by_addon_type_0_item import (
|
|
79
|
-
CreditsSummaryResponseCreditsByAddonType0Item,
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
d = dict(src_dict)
|
|
83
|
-
add_ons = []
|
|
84
|
-
_add_ons = d.pop("add_ons")
|
|
85
|
-
for add_ons_item_data in _add_ons:
|
|
86
|
-
add_ons_item = AddOnCreditInfo.from_dict(add_ons_item_data)
|
|
87
|
-
|
|
88
|
-
add_ons.append(add_ons_item)
|
|
89
|
-
|
|
90
|
-
total_credits = d.pop("total_credits")
|
|
91
|
-
|
|
92
|
-
addon_count = d.pop("addon_count")
|
|
93
|
-
|
|
94
|
-
def _parse_credits_by_addon(
|
|
95
|
-
data: object,
|
|
96
|
-
) -> Union[None, Unset, list["CreditsSummaryResponseCreditsByAddonType0Item"]]:
|
|
97
|
-
if data is None:
|
|
98
|
-
return data
|
|
99
|
-
if isinstance(data, Unset):
|
|
100
|
-
return data
|
|
101
|
-
try:
|
|
102
|
-
if not isinstance(data, list):
|
|
103
|
-
raise TypeError()
|
|
104
|
-
credits_by_addon_type_0 = []
|
|
105
|
-
_credits_by_addon_type_0 = data
|
|
106
|
-
for credits_by_addon_type_0_item_data in _credits_by_addon_type_0:
|
|
107
|
-
credits_by_addon_type_0_item = (
|
|
108
|
-
CreditsSummaryResponseCreditsByAddonType0Item.from_dict(
|
|
109
|
-
credits_by_addon_type_0_item_data
|
|
110
|
-
)
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
credits_by_addon_type_0.append(credits_by_addon_type_0_item)
|
|
114
|
-
|
|
115
|
-
return credits_by_addon_type_0
|
|
116
|
-
except: # noqa: E722
|
|
117
|
-
pass
|
|
118
|
-
return cast(
|
|
119
|
-
Union[None, Unset, list["CreditsSummaryResponseCreditsByAddonType0Item"]], data
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
credits_by_addon = _parse_credits_by_addon(d.pop("credits_by_addon", UNSET))
|
|
123
|
-
|
|
124
|
-
credits_summary_response = cls(
|
|
125
|
-
add_ons=add_ons,
|
|
126
|
-
total_credits=total_credits,
|
|
127
|
-
addon_count=addon_count,
|
|
128
|
-
credits_by_addon=credits_by_addon,
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
credits_summary_response.additional_properties = d
|
|
132
|
-
return credits_summary_response
|
|
133
|
-
|
|
134
|
-
@property
|
|
135
|
-
def additional_keys(self) -> list[str]:
|
|
136
|
-
return list(self.additional_properties.keys())
|
|
137
|
-
|
|
138
|
-
def __getitem__(self, key: str) -> Any:
|
|
139
|
-
return self.additional_properties[key]
|
|
140
|
-
|
|
141
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
142
|
-
self.additional_properties[key] = value
|
|
143
|
-
|
|
144
|
-
def __delitem__(self, key: str) -> None:
|
|
145
|
-
del self.additional_properties[key]
|
|
146
|
-
|
|
147
|
-
def __contains__(self, key: str) -> bool:
|
|
148
|
-
return key in self.additional_properties
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
T = TypeVar("T", bound="GetAllCreditSummariesResponseGetallcreditsummaries")
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@_attrs_define
|
|
11
|
-
class GetAllCreditSummariesResponseGetallcreditsummaries:
|
|
12
|
-
""" """
|
|
13
|
-
|
|
14
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
-
|
|
16
|
-
def to_dict(self) -> dict[str, Any]:
|
|
17
|
-
field_dict: dict[str, Any] = {}
|
|
18
|
-
field_dict.update(self.additional_properties)
|
|
19
|
-
|
|
20
|
-
return field_dict
|
|
21
|
-
|
|
22
|
-
@classmethod
|
|
23
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
-
d = dict(src_dict)
|
|
25
|
-
get_all_credit_summaries_response_getallcreditsummaries = cls()
|
|
26
|
-
|
|
27
|
-
get_all_credit_summaries_response_getallcreditsummaries.additional_properties = d
|
|
28
|
-
return get_all_credit_summaries_response_getallcreditsummaries
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def additional_keys(self) -> list[str]:
|
|
32
|
-
return list(self.additional_properties.keys())
|
|
33
|
-
|
|
34
|
-
def __getitem__(self, key: str) -> Any:
|
|
35
|
-
return self.additional_properties[key]
|
|
36
|
-
|
|
37
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
-
self.additional_properties[key] = value
|
|
39
|
-
|
|
40
|
-
def __delitem__(self, key: str) -> None:
|
|
41
|
-
del self.additional_properties[key]
|
|
42
|
-
|
|
43
|
-
def __contains__(self, key: str) -> bool:
|
|
44
|
-
return key in self.additional_properties
|
robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
T = TypeVar(
|
|
8
|
-
"T", bound="GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits:
|
|
14
|
-
""" """
|
|
15
|
-
|
|
16
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
17
|
-
|
|
18
|
-
def to_dict(self) -> dict[str, Any]:
|
|
19
|
-
field_dict: dict[str, Any] = {}
|
|
20
|
-
field_dict.update(self.additional_properties)
|
|
21
|
-
|
|
22
|
-
return field_dict
|
|
23
|
-
|
|
24
|
-
@classmethod
|
|
25
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
26
|
-
d = dict(src_dict)
|
|
27
|
-
get_all_shared_repository_limits_response_getallsharedrepositorylimits = cls()
|
|
28
|
-
|
|
29
|
-
get_all_shared_repository_limits_response_getallsharedrepositorylimits.additional_properties = d
|
|
30
|
-
return get_all_shared_repository_limits_response_getallsharedrepositorylimits
|
|
31
|
-
|
|
32
|
-
@property
|
|
33
|
-
def additional_keys(self) -> list[str]:
|
|
34
|
-
return list(self.additional_properties.keys())
|
|
35
|
-
|
|
36
|
-
def __getitem__(self, key: str) -> Any:
|
|
37
|
-
return self.additional_properties[key]
|
|
38
|
-
|
|
39
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
40
|
-
self.additional_properties[key] = value
|
|
41
|
-
|
|
42
|
-
def __delitem__(self, key: str) -> None:
|
|
43
|
-
del self.additional_properties[key]
|
|
44
|
-
|
|
45
|
-
def __contains__(self, key: str) -> bool:
|
|
46
|
-
return key in self.additional_properties
|