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.
Files changed (86) hide show
  1. robosystems_client/api/{user_subscriptions/upgrade_shared_repository_subscription.py → billing/cancel_subscription.py} +32 -60
  2. robosystems_client/api/billing/create_checkout_session.py +230 -0
  3. robosystems_client/api/{user_analytics/get_user_usage_overview.py → billing/get_billing_customer.py} +29 -21
  4. robosystems_client/api/billing/get_checkout_status.py +221 -0
  5. robosystems_client/api/{user_subscriptions/get_repository_credits.py → billing/get_subscription.py} +35 -43
  6. robosystems_client/api/{user_subscriptions/get_shared_repository_credits.py → billing/get_upcoming_invoice.py} +42 -28
  7. robosystems_client/api/{user_subscriptions/get_user_shared_subscriptions.py → billing/list_invoices.py} +44 -44
  8. robosystems_client/api/{user_limits/get_all_shared_repository_limits.py → billing/list_subscriptions.py} +38 -27
  9. robosystems_client/api/{user_subscriptions/subscribe_to_shared_repository.py → billing/update_payment_method.py} +42 -46
  10. robosystems_client/api/{user_subscriptions/cancel_shared_repository_subscription.py → subscriptions/cancel_subscription.py} +41 -25
  11. robosystems_client/api/subscriptions/create_repository_subscription.py +217 -0
  12. robosystems_client/api/subscriptions/get_graph_subscription.py +197 -0
  13. robosystems_client/api/subscriptions/upgrade_subscription.py +203 -0
  14. robosystems_client/api/usage/get_graph_usage_analytics.py +377 -0
  15. robosystems_client/api/{user_limits/get_user_usage.py → user/get_user_limits.py} +13 -9
  16. robosystems_client/models/__init__.py +42 -82
  17. robosystems_client/models/billing_customer.py +128 -0
  18. robosystems_client/models/checkout_response.py +87 -0
  19. robosystems_client/models/checkout_status_response.py +130 -0
  20. robosystems_client/models/create_checkout_request.py +88 -0
  21. robosystems_client/models/{graph_usage_response_query_statistics.py → create_checkout_request_resource_config.py} +6 -6
  22. robosystems_client/models/{credits_summary_response_credits_by_addon_type_0_item.py → create_repository_subscription_request.py} +22 -6
  23. robosystems_client/models/credit_summary.py +55 -89
  24. robosystems_client/models/{graph_usage_response_storage_usage.py → credit_summary_operation_breakdown.py} +6 -6
  25. robosystems_client/models/graph_subscription_response.py +200 -0
  26. robosystems_client/models/graph_usage_response.py +136 -39
  27. robosystems_client/models/{user_analytics_response_limits.py → graph_usage_response_recent_events_item.py} +6 -6
  28. robosystems_client/models/invoice.py +244 -0
  29. robosystems_client/models/invoice_line_item.py +118 -0
  30. robosystems_client/models/invoices_response.py +90 -0
  31. robosystems_client/models/payment_method.py +158 -0
  32. robosystems_client/models/performance_insights.py +120 -0
  33. robosystems_client/models/{graph_usage_response_recent_activity.py → performance_insights_operation_stats.py} +6 -6
  34. robosystems_client/models/{user_analytics_response_api_usage.py → performance_insights_slow_queries_item.py} +6 -6
  35. robosystems_client/models/storage_summary.py +100 -0
  36. robosystems_client/models/upcoming_invoice.py +128 -0
  37. robosystems_client/models/{get_graph_usage_details_response_getgraphusagedetails.py → update_payment_method_request.py} +22 -6
  38. robosystems_client/models/{subscription_response.py → update_payment_method_response.py} +14 -14
  39. robosystems_client/models/{tier_upgrade_request.py → upgrade_subscription_request.py} +12 -14
  40. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/METADATA +1 -1
  41. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/RECORD +53 -68
  42. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -289
  43. robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -253
  44. robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -298
  45. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -284
  46. robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -320
  47. robosystems_client/api/user/get_all_credit_summaries.py +0 -169
  48. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -188
  49. robosystems_client/api/user_limits/__init__.py +0 -1
  50. robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -213
  51. robosystems_client/api/user_limits/get_user_limits.py +0 -139
  52. robosystems_client/api/user_subscriptions/__init__.py +0 -1
  53. robosystems_client/models/add_on_credit_info.py +0 -119
  54. robosystems_client/models/credits_summary_response.py +0 -148
  55. robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +0 -44
  56. robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +0 -46
  57. robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +0 -44
  58. robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +0 -44
  59. robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +0 -44
  60. robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +0 -44
  61. robosystems_client/models/repository_credits_response.py +0 -128
  62. robosystems_client/models/repository_plan.py +0 -10
  63. robosystems_client/models/repository_type.py +0 -10
  64. robosystems_client/models/subscription_info.py +0 -152
  65. robosystems_client/models/subscription_info_metadata.py +0 -44
  66. robosystems_client/models/subscription_request.py +0 -80
  67. robosystems_client/models/user_analytics_response.py +0 -132
  68. robosystems_client/models/user_analytics_response_graph_usage.py +0 -44
  69. robosystems_client/models/user_analytics_response_recent_activity_item.py +0 -44
  70. robosystems_client/models/user_analytics_response_user_info.py +0 -44
  71. robosystems_client/models/user_graph_summary.py +0 -134
  72. robosystems_client/models/user_subscriptions_response.py +0 -90
  73. robosystems_client/models/user_usage_summary_response.py +0 -130
  74. robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +0 -44
  75. /robosystems_client/api/{graph_analytics → billing}/__init__.py +0 -0
  76. /robosystems_client/api/{graph_billing → credits_}/__init__.py +0 -0
  77. /robosystems_client/api/{graph_credits → credits_}/check_credit_balance.py +0 -0
  78. /robosystems_client/api/{graph_credits → credits_}/check_storage_limits.py +0 -0
  79. /robosystems_client/api/{graph_credits → credits_}/get_credit_summary.py +0 -0
  80. /robosystems_client/api/{graph_credits → credits_}/get_storage_usage.py +0 -0
  81. /robosystems_client/api/{graph_credits → credits_}/list_credit_transactions.py +0 -0
  82. /robosystems_client/api/{graph_credits → subscriptions}/__init__.py +0 -0
  83. /robosystems_client/api/{user_analytics → usage}/__init__.py +0 -0
  84. /robosystems_client/api/{graph_analytics → usage}/get_graph_metrics.py +0 -0
  85. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/WHEEL +0 -0
  86. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/licenses/LICENSE +0 -0
@@ -1,28 +1,28 @@
1
1
  from http import HTTPStatus
2
- from typing import Any, Optional, Union, cast
2
+ from typing import Any, Optional, Union
3
3
 
4
4
  import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.http_validation_error import HTTPValidationError
9
- from ...models.user_subscriptions_response import UserSubscriptionsResponse
9
+ from ...models.invoices_response import InvoicesResponse
10
10
  from ...types import UNSET, Response, Unset
11
11
 
12
12
 
13
13
  def _get_kwargs(
14
14
  *,
15
- active_only: Union[Unset, bool] = True,
15
+ limit: Union[Unset, int] = 10,
16
16
  ) -> dict[str, Any]:
17
17
  params: dict[str, Any] = {}
18
18
 
19
- params["active_only"] = active_only
19
+ params["limit"] = limit
20
20
 
21
21
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
22
 
23
23
  _kwargs: dict[str, Any] = {
24
24
  "method": "get",
25
- "url": "/v1/user/subscriptions/shared-repositories",
25
+ "url": "/v1/billing/invoices",
26
26
  "params": params,
27
27
  }
28
28
 
@@ -31,25 +31,17 @@ def _get_kwargs(
31
31
 
32
32
  def _parse_response(
33
33
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
- ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
34
+ ) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
35
35
  if response.status_code == 200:
36
- response_200 = UserSubscriptionsResponse.from_dict(response.json())
36
+ response_200 = InvoicesResponse.from_dict(response.json())
37
37
 
38
38
  return response_200
39
39
 
40
- if response.status_code == 401:
41
- response_401 = cast(Any, None)
42
- return response_401
43
-
44
40
  if response.status_code == 422:
45
41
  response_422 = HTTPValidationError.from_dict(response.json())
46
42
 
47
43
  return response_422
48
44
 
49
- if response.status_code == 500:
50
- response_500 = cast(Any, None)
51
- return response_500
52
-
53
45
  if client.raise_on_unexpected_status:
54
46
  raise errors.UnexpectedStatus(response.status_code, response.content)
55
47
  else:
@@ -58,7 +50,7 @@ def _parse_response(
58
50
 
59
51
  def _build_response(
60
52
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
61
- ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
53
+ ) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
62
54
  return Response(
63
55
  status_code=HTTPStatus(response.status_code),
64
56
  content=response.content,
@@ -70,25 +62,27 @@ def _build_response(
70
62
  def sync_detailed(
71
63
  *,
72
64
  client: AuthenticatedClient,
73
- active_only: Union[Unset, bool] = True,
74
- ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
75
- """Get User Subscriptions
65
+ limit: Union[Unset, int] = 10,
66
+ ) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
67
+ """List Invoices
68
+
69
+ List payment history and invoices.
76
70
 
77
- Retrieve user's current shared repository subscriptions with detailed information
71
+ Returns past invoices with payment status, amounts, and line items.
78
72
 
79
73
  Args:
80
- active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
74
+ limit (Union[Unset, int]): Number of invoices to return Default: 10.
81
75
 
82
76
  Raises:
83
77
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
84
78
  httpx.TimeoutException: If the request takes longer than Client.timeout.
85
79
 
86
80
  Returns:
87
- Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]
81
+ Response[Union[HTTPValidationError, InvoicesResponse]]
88
82
  """
89
83
 
90
84
  kwargs = _get_kwargs(
91
- active_only=active_only,
85
+ limit=limit,
92
86
  )
93
87
 
94
88
  response = client.get_httpx_client().request(
@@ -101,51 +95,55 @@ def sync_detailed(
101
95
  def sync(
102
96
  *,
103
97
  client: AuthenticatedClient,
104
- active_only: Union[Unset, bool] = True,
105
- ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
106
- """Get User Subscriptions
98
+ limit: Union[Unset, int] = 10,
99
+ ) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
100
+ """List Invoices
107
101
 
108
- Retrieve user's current shared repository subscriptions with detailed information
102
+ List payment history and invoices.
103
+
104
+ Returns past invoices with payment status, amounts, and line items.
109
105
 
110
106
  Args:
111
- active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
107
+ limit (Union[Unset, int]): Number of invoices to return Default: 10.
112
108
 
113
109
  Raises:
114
110
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
111
  httpx.TimeoutException: If the request takes longer than Client.timeout.
116
112
 
117
113
  Returns:
118
- Union[Any, HTTPValidationError, UserSubscriptionsResponse]
114
+ Union[HTTPValidationError, InvoicesResponse]
119
115
  """
120
116
 
121
117
  return sync_detailed(
122
118
  client=client,
123
- active_only=active_only,
119
+ limit=limit,
124
120
  ).parsed
125
121
 
126
122
 
127
123
  async def asyncio_detailed(
128
124
  *,
129
125
  client: AuthenticatedClient,
130
- active_only: Union[Unset, bool] = True,
131
- ) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
132
- """Get User Subscriptions
126
+ limit: Union[Unset, int] = 10,
127
+ ) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
128
+ """List Invoices
129
+
130
+ List payment history and invoices.
133
131
 
134
- Retrieve user's current shared repository subscriptions with detailed information
132
+ Returns past invoices with payment status, amounts, and line items.
135
133
 
136
134
  Args:
137
- active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
135
+ limit (Union[Unset, int]): Number of invoices to return Default: 10.
138
136
 
139
137
  Raises:
140
138
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
141
139
  httpx.TimeoutException: If the request takes longer than Client.timeout.
142
140
 
143
141
  Returns:
144
- Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]
142
+ Response[Union[HTTPValidationError, InvoicesResponse]]
145
143
  """
146
144
 
147
145
  kwargs = _get_kwargs(
148
- active_only=active_only,
146
+ limit=limit,
149
147
  )
150
148
 
151
149
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -156,26 +154,28 @@ async def asyncio_detailed(
156
154
  async def asyncio(
157
155
  *,
158
156
  client: AuthenticatedClient,
159
- active_only: Union[Unset, bool] = True,
160
- ) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
161
- """Get User Subscriptions
157
+ limit: Union[Unset, int] = 10,
158
+ ) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
159
+ """List Invoices
160
+
161
+ List payment history and invoices.
162
162
 
163
- Retrieve user's current shared repository subscriptions with detailed information
163
+ Returns past invoices with payment status, amounts, and line items.
164
164
 
165
165
  Args:
166
- active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
166
+ limit (Union[Unset, int]): Number of invoices to return Default: 10.
167
167
 
168
168
  Raises:
169
169
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
170
170
  httpx.TimeoutException: If the request takes longer than Client.timeout.
171
171
 
172
172
  Returns:
173
- Union[Any, HTTPValidationError, UserSubscriptionsResponse]
173
+ Union[HTTPValidationError, InvoicesResponse]
174
174
  """
175
175
 
176
176
  return (
177
177
  await asyncio_detailed(
178
178
  client=client,
179
- active_only=active_only,
179
+ limit=limit,
180
180
  )
181
181
  ).parsed
@@ -5,16 +5,14 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.get_all_shared_repository_limits_response_getallsharedrepositorylimits import (
9
- GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits,
10
- )
8
+ from ...models.graph_subscription_response import GraphSubscriptionResponse
11
9
  from ...types import Response
12
10
 
13
11
 
14
12
  def _get_kwargs() -> dict[str, Any]:
15
13
  _kwargs: dict[str, Any] = {
16
14
  "method": "get",
17
- "url": "/v1/user/limits/shared-repositories/summary",
15
+ "url": "/v1/billing/subscriptions",
18
16
  }
19
17
 
20
18
  return _kwargs
@@ -22,13 +20,14 @@ def _get_kwargs() -> dict[str, Any]:
22
20
 
23
21
  def _parse_response(
24
22
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
23
+ ) -> Optional[list["GraphSubscriptionResponse"]]:
26
24
  if response.status_code == 200:
27
- response_200 = (
28
- GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits.from_dict(
29
- response.json()
30
- )
31
- )
25
+ response_200 = []
26
+ _response_200 = response.json()
27
+ for response_200_item_data in _response_200:
28
+ response_200_item = GraphSubscriptionResponse.from_dict(response_200_item_data)
29
+
30
+ response_200.append(response_200_item)
32
31
 
33
32
  return response_200
34
33
 
@@ -40,7 +39,7 @@ def _parse_response(
40
39
 
41
40
  def _build_response(
42
41
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
- ) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
42
+ ) -> Response[list["GraphSubscriptionResponse"]]:
44
43
  return Response(
45
44
  status_code=HTTPStatus(response.status_code),
46
45
  content=response.content,
@@ -52,17 +51,20 @@ def _build_response(
52
51
  def sync_detailed(
53
52
  *,
54
53
  client: AuthenticatedClient,
55
- ) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
56
- """Get all shared repository limits
54
+ ) -> Response[list["GraphSubscriptionResponse"]]:
55
+ """List All Subscriptions
56
+
57
+ List all active and past subscriptions for the user.
57
58
 
58
- Get rate limit status for all shared repositories the user has access to.
59
+ Includes both graph and repository subscriptions with their status, pricing, and billing
60
+ information.
59
61
 
60
62
  Raises:
61
63
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
62
64
  httpx.TimeoutException: If the request takes longer than Client.timeout.
63
65
 
64
66
  Returns:
65
- Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]
67
+ Response[list['GraphSubscriptionResponse']]
66
68
  """
67
69
 
68
70
  kwargs = _get_kwargs()
@@ -77,17 +79,20 @@ def sync_detailed(
77
79
  def sync(
78
80
  *,
79
81
  client: AuthenticatedClient,
80
- ) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
81
- """Get all shared repository limits
82
+ ) -> Optional[list["GraphSubscriptionResponse"]]:
83
+ """List All Subscriptions
82
84
 
83
- Get rate limit status for all shared repositories the user has access to.
85
+ List all active and past subscriptions for the user.
86
+
87
+ Includes both graph and repository subscriptions with their status, pricing, and billing
88
+ information.
84
89
 
85
90
  Raises:
86
91
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
87
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
88
93
 
89
94
  Returns:
90
- GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits
95
+ list['GraphSubscriptionResponse']
91
96
  """
92
97
 
93
98
  return sync_detailed(
@@ -98,17 +103,20 @@ def sync(
98
103
  async def asyncio_detailed(
99
104
  *,
100
105
  client: AuthenticatedClient,
101
- ) -> Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
102
- """Get all shared repository limits
106
+ ) -> Response[list["GraphSubscriptionResponse"]]:
107
+ """List All Subscriptions
108
+
109
+ List all active and past subscriptions for the user.
103
110
 
104
- Get rate limit status for all shared repositories the user has access to.
111
+ Includes both graph and repository subscriptions with their status, pricing, and billing
112
+ information.
105
113
 
106
114
  Raises:
107
115
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
108
116
  httpx.TimeoutException: If the request takes longer than Client.timeout.
109
117
 
110
118
  Returns:
111
- Response[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]
119
+ Response[list['GraphSubscriptionResponse']]
112
120
  """
113
121
 
114
122
  kwargs = _get_kwargs()
@@ -121,17 +129,20 @@ async def asyncio_detailed(
121
129
  async def asyncio(
122
130
  *,
123
131
  client: AuthenticatedClient,
124
- ) -> Optional[GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits]:
125
- """Get all shared repository limits
132
+ ) -> Optional[list["GraphSubscriptionResponse"]]:
133
+ """List All Subscriptions
134
+
135
+ List all active and past subscriptions for the user.
126
136
 
127
- Get rate limit status for all shared repositories the user has access to.
137
+ Includes both graph and repository subscriptions with their status, pricing, and billing
138
+ information.
128
139
 
129
140
  Raises:
130
141
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
131
142
  httpx.TimeoutException: If the request takes longer than Client.timeout.
132
143
 
133
144
  Returns:
134
- GetAllSharedRepositoryLimitsResponseGetallsharedrepositorylimits
145
+ list['GraphSubscriptionResponse']
135
146
  """
136
147
 
137
148
  return (
@@ -1,25 +1,25 @@
1
1
  from http import HTTPStatus
2
- from typing import Any, Optional, Union, cast
2
+ from typing import Any, Optional, Union
3
3
 
4
4
  import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.http_validation_error import HTTPValidationError
9
- from ...models.subscription_request import SubscriptionRequest
10
- from ...models.subscription_response import SubscriptionResponse
9
+ from ...models.update_payment_method_request import UpdatePaymentMethodRequest
10
+ from ...models.update_payment_method_response import UpdatePaymentMethodResponse
11
11
  from ...types import Response
12
12
 
13
13
 
14
14
  def _get_kwargs(
15
15
  *,
16
- body: SubscriptionRequest,
16
+ body: UpdatePaymentMethodRequest,
17
17
  ) -> dict[str, Any]:
18
18
  headers: dict[str, Any] = {}
19
19
 
20
20
  _kwargs: dict[str, Any] = {
21
21
  "method": "post",
22
- "url": "/v1/user/subscriptions/shared-repositories/subscribe",
22
+ "url": "/v1/billing/customer/payment-method",
23
23
  }
24
24
 
25
25
  _kwargs["json"] = body.to_dict()
@@ -32,29 +32,17 @@ def _get_kwargs(
32
32
 
33
33
  def _parse_response(
34
34
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
35
- ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
36
- if response.status_code == 201:
37
- response_201 = SubscriptionResponse.from_dict(response.json())
35
+ ) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
36
+ if response.status_code == 200:
37
+ response_200 = UpdatePaymentMethodResponse.from_dict(response.json())
38
38
 
39
- return response_201
40
-
41
- if response.status_code == 400:
42
- response_400 = cast(Any, None)
43
- return response_400
44
-
45
- if response.status_code == 401:
46
- response_401 = cast(Any, None)
47
- return response_401
39
+ return response_200
48
40
 
49
41
  if response.status_code == 422:
50
42
  response_422 = HTTPValidationError.from_dict(response.json())
51
43
 
52
44
  return response_422
53
45
 
54
- if response.status_code == 500:
55
- response_500 = cast(Any, None)
56
- return response_500
57
-
58
46
  if client.raise_on_unexpected_status:
59
47
  raise errors.UnexpectedStatus(response.status_code, response.content)
60
48
  else:
@@ -63,7 +51,7 @@ def _parse_response(
63
51
 
64
52
  def _build_response(
65
53
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
66
- ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
54
+ ) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
67
55
  return Response(
68
56
  status_code=HTTPStatus(response.status_code),
69
57
  content=response.content,
@@ -75,21 +63,23 @@ def _build_response(
75
63
  def sync_detailed(
76
64
  *,
77
65
  client: AuthenticatedClient,
78
- body: SubscriptionRequest,
79
- ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
80
- """Subscribe to Shared Repository
66
+ body: UpdatePaymentMethodRequest,
67
+ ) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
68
+ """Update Default Payment Method
69
+
70
+ Update the default payment method for the customer.
81
71
 
82
- Create a new subscription to a shared repository add-on with specified tier
72
+ This changes which payment method will be used for future subscription charges.
83
73
 
84
74
  Args:
85
- body (SubscriptionRequest): Request to create a new subscription.
75
+ body (UpdatePaymentMethodRequest): Request to update default payment method.
86
76
 
87
77
  Raises:
88
78
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
89
79
  httpx.TimeoutException: If the request takes longer than Client.timeout.
90
80
 
91
81
  Returns:
92
- Response[Union[Any, HTTPValidationError, SubscriptionResponse]]
82
+ Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]
93
83
  """
94
84
 
95
85
  kwargs = _get_kwargs(
@@ -106,21 +96,23 @@ def sync_detailed(
106
96
  def sync(
107
97
  *,
108
98
  client: AuthenticatedClient,
109
- body: SubscriptionRequest,
110
- ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
111
- """Subscribe to Shared Repository
99
+ body: UpdatePaymentMethodRequest,
100
+ ) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
101
+ """Update Default Payment Method
112
102
 
113
- Create a new subscription to a shared repository add-on with specified tier
103
+ Update the default payment method for the customer.
104
+
105
+ This changes which payment method will be used for future subscription charges.
114
106
 
115
107
  Args:
116
- body (SubscriptionRequest): Request to create a new subscription.
108
+ body (UpdatePaymentMethodRequest): Request to update default payment method.
117
109
 
118
110
  Raises:
119
111
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
120
112
  httpx.TimeoutException: If the request takes longer than Client.timeout.
121
113
 
122
114
  Returns:
123
- Union[Any, HTTPValidationError, SubscriptionResponse]
115
+ Union[HTTPValidationError, UpdatePaymentMethodResponse]
124
116
  """
125
117
 
126
118
  return sync_detailed(
@@ -132,21 +124,23 @@ def sync(
132
124
  async def asyncio_detailed(
133
125
  *,
134
126
  client: AuthenticatedClient,
135
- body: SubscriptionRequest,
136
- ) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
137
- """Subscribe to Shared Repository
127
+ body: UpdatePaymentMethodRequest,
128
+ ) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
129
+ """Update Default Payment Method
130
+
131
+ Update the default payment method for the customer.
138
132
 
139
- Create a new subscription to a shared repository add-on with specified tier
133
+ This changes which payment method will be used for future subscription charges.
140
134
 
141
135
  Args:
142
- body (SubscriptionRequest): Request to create a new subscription.
136
+ body (UpdatePaymentMethodRequest): Request to update default payment method.
143
137
 
144
138
  Raises:
145
139
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
146
140
  httpx.TimeoutException: If the request takes longer than Client.timeout.
147
141
 
148
142
  Returns:
149
- Response[Union[Any, HTTPValidationError, SubscriptionResponse]]
143
+ Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]
150
144
  """
151
145
 
152
146
  kwargs = _get_kwargs(
@@ -161,21 +155,23 @@ async def asyncio_detailed(
161
155
  async def asyncio(
162
156
  *,
163
157
  client: AuthenticatedClient,
164
- body: SubscriptionRequest,
165
- ) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
166
- """Subscribe to Shared Repository
158
+ body: UpdatePaymentMethodRequest,
159
+ ) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
160
+ """Update Default Payment Method
161
+
162
+ Update the default payment method for the customer.
167
163
 
168
- Create a new subscription to a shared repository add-on with specified tier
164
+ This changes which payment method will be used for future subscription charges.
169
165
 
170
166
  Args:
171
- body (SubscriptionRequest): Request to create a new subscription.
167
+ body (UpdatePaymentMethodRequest): Request to update default payment method.
172
168
 
173
169
  Raises:
174
170
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175
171
  httpx.TimeoutException: If the request takes longer than Client.timeout.
176
172
 
177
173
  Returns:
178
- Union[Any, HTTPValidationError, SubscriptionResponse]
174
+ Union[HTTPValidationError, UpdatePaymentMethodResponse]
179
175
  """
180
176
 
181
177
  return (