robosystems-client 0.2.10__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/billing/__init__.py +1 -0
- robosystems_client/api/billing/cancel_subscription.py +173 -0
- robosystems_client/api/billing/create_checkout_session.py +230 -0
- robosystems_client/api/billing/get_billing_customer.py +143 -0
- robosystems_client/api/billing/get_checkout_status.py +221 -0
- robosystems_client/api/billing/get_subscription.py +165 -0
- robosystems_client/api/billing/get_upcoming_invoice.py +157 -0
- robosystems_client/api/billing/list_invoices.py +181 -0
- robosystems_client/api/billing/list_subscriptions.py +152 -0
- robosystems_client/api/billing/update_payment_method.py +182 -0
- robosystems_client/models/__init__.py +24 -0
- 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/create_checkout_request_resource_config.py +44 -0
- 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/upcoming_invoice.py +128 -0
- robosystems_client/models/update_payment_method_request.py +60 -0
- robosystems_client/models/update_payment_method_response.py +74 -0
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.11.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.11.dist-info}/RECORD +27 -5
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.11.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.invoices_response import InvoicesResponse
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
limit: Union[Unset, int] = 10,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
params: dict[str, Any] = {}
|
|
18
|
+
|
|
19
|
+
params["limit"] = limit
|
|
20
|
+
|
|
21
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
22
|
+
|
|
23
|
+
_kwargs: dict[str, Any] = {
|
|
24
|
+
"method": "get",
|
|
25
|
+
"url": "/v1/billing/invoices",
|
|
26
|
+
"params": params,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return _kwargs
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(
|
|
33
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
34
|
+
) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = InvoicesResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
|
|
40
|
+
if response.status_code == 422:
|
|
41
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_422
|
|
44
|
+
|
|
45
|
+
if client.raise_on_unexpected_status:
|
|
46
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
47
|
+
else:
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _build_response(
|
|
52
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
53
|
+
) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
|
|
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
|
+
*,
|
|
64
|
+
client: AuthenticatedClient,
|
|
65
|
+
limit: Union[Unset, int] = 10,
|
|
66
|
+
) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
|
|
67
|
+
"""List Invoices
|
|
68
|
+
|
|
69
|
+
List payment history and invoices.
|
|
70
|
+
|
|
71
|
+
Returns past invoices with payment status, amounts, and line items.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
78
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
Response[Union[HTTPValidationError, InvoicesResponse]]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
kwargs = _get_kwargs(
|
|
85
|
+
limit=limit,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = client.get_httpx_client().request(
|
|
89
|
+
**kwargs,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return _build_response(client=client, response=response)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
*,
|
|
97
|
+
client: AuthenticatedClient,
|
|
98
|
+
limit: Union[Unset, int] = 10,
|
|
99
|
+
) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
|
|
100
|
+
"""List Invoices
|
|
101
|
+
|
|
102
|
+
List payment history and invoices.
|
|
103
|
+
|
|
104
|
+
Returns past invoices with payment status, amounts, and line items.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
108
|
+
|
|
109
|
+
Raises:
|
|
110
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
111
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
Union[HTTPValidationError, InvoicesResponse]
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
return sync_detailed(
|
|
118
|
+
client=client,
|
|
119
|
+
limit=limit,
|
|
120
|
+
).parsed
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def asyncio_detailed(
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
limit: Union[Unset, int] = 10,
|
|
127
|
+
) -> Response[Union[HTTPValidationError, InvoicesResponse]]:
|
|
128
|
+
"""List Invoices
|
|
129
|
+
|
|
130
|
+
List payment history and invoices.
|
|
131
|
+
|
|
132
|
+
Returns past invoices with payment status, amounts, and line items.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
139
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[Union[HTTPValidationError, InvoicesResponse]]
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
kwargs = _get_kwargs(
|
|
146
|
+
limit=limit,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
150
|
+
|
|
151
|
+
return _build_response(client=client, response=response)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
async def asyncio(
|
|
155
|
+
*,
|
|
156
|
+
client: AuthenticatedClient,
|
|
157
|
+
limit: Union[Unset, int] = 10,
|
|
158
|
+
) -> Optional[Union[HTTPValidationError, InvoicesResponse]]:
|
|
159
|
+
"""List Invoices
|
|
160
|
+
|
|
161
|
+
List payment history and invoices.
|
|
162
|
+
|
|
163
|
+
Returns past invoices with payment status, amounts, and line items.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
limit (Union[Unset, int]): Number of invoices to return Default: 10.
|
|
167
|
+
|
|
168
|
+
Raises:
|
|
169
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
170
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
Union[HTTPValidationError, InvoicesResponse]
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
await asyncio_detailed(
|
|
178
|
+
client=client,
|
|
179
|
+
limit=limit,
|
|
180
|
+
)
|
|
181
|
+
).parsed
|
|
@@ -0,0 +1,152 @@
|
|
|
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.graph_subscription_response import GraphSubscriptionResponse
|
|
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/billing/subscriptions",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return _kwargs
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
+
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
24
|
+
if response.status_code == 200:
|
|
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)
|
|
31
|
+
|
|
32
|
+
return response_200
|
|
33
|
+
|
|
34
|
+
if client.raise_on_unexpected_status:
|
|
35
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
36
|
+
else:
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _build_response(
|
|
41
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
42
|
+
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
43
|
+
return Response(
|
|
44
|
+
status_code=HTTPStatus(response.status_code),
|
|
45
|
+
content=response.content,
|
|
46
|
+
headers=response.headers,
|
|
47
|
+
parsed=_parse_response(client=client, response=response),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def sync_detailed(
|
|
52
|
+
*,
|
|
53
|
+
client: AuthenticatedClient,
|
|
54
|
+
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
55
|
+
"""List All Subscriptions
|
|
56
|
+
|
|
57
|
+
List all active and past subscriptions for the user.
|
|
58
|
+
|
|
59
|
+
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
60
|
+
information.
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
64
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Response[list['GraphSubscriptionResponse']]
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
kwargs = _get_kwargs()
|
|
71
|
+
|
|
72
|
+
response = client.get_httpx_client().request(
|
|
73
|
+
**kwargs,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
return _build_response(client=client, response=response)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def sync(
|
|
80
|
+
*,
|
|
81
|
+
client: AuthenticatedClient,
|
|
82
|
+
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
83
|
+
"""List All Subscriptions
|
|
84
|
+
|
|
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.
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
list['GraphSubscriptionResponse']
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
client=client,
|
|
100
|
+
).parsed
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
async def asyncio_detailed(
|
|
104
|
+
*,
|
|
105
|
+
client: AuthenticatedClient,
|
|
106
|
+
) -> Response[list["GraphSubscriptionResponse"]]:
|
|
107
|
+
"""List All Subscriptions
|
|
108
|
+
|
|
109
|
+
List all active and past subscriptions for the user.
|
|
110
|
+
|
|
111
|
+
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
112
|
+
information.
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[list['GraphSubscriptionResponse']]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs()
|
|
123
|
+
|
|
124
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
125
|
+
|
|
126
|
+
return _build_response(client=client, response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def asyncio(
|
|
130
|
+
*,
|
|
131
|
+
client: AuthenticatedClient,
|
|
132
|
+
) -> Optional[list["GraphSubscriptionResponse"]]:
|
|
133
|
+
"""List All Subscriptions
|
|
134
|
+
|
|
135
|
+
List all active and past subscriptions for the user.
|
|
136
|
+
|
|
137
|
+
Includes both graph and repository subscriptions with their status, pricing, and billing
|
|
138
|
+
information.
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
list['GraphSubscriptionResponse']
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
await asyncio_detailed(
|
|
150
|
+
client=client,
|
|
151
|
+
)
|
|
152
|
+
).parsed
|
|
@@ -0,0 +1,182 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.update_payment_method_request import UpdatePaymentMethodRequest
|
|
10
|
+
from ...models.update_payment_method_response import UpdatePaymentMethodResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: UpdatePaymentMethodRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/v1/billing/customer/payment-method",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
35
|
+
) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
36
|
+
if response.status_code == 200:
|
|
37
|
+
response_200 = UpdatePaymentMethodResponse.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_200
|
|
40
|
+
|
|
41
|
+
if response.status_code == 422:
|
|
42
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_422
|
|
45
|
+
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
54
|
+
) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient,
|
|
66
|
+
body: UpdatePaymentMethodRequest,
|
|
67
|
+
) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
68
|
+
"""Update Default Payment Method
|
|
69
|
+
|
|
70
|
+
Update the default payment method for the customer.
|
|
71
|
+
|
|
72
|
+
This changes which payment method will be used for future subscription charges.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
body=body,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
response = client.get_httpx_client().request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(client=client, response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync(
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient,
|
|
99
|
+
body: UpdatePaymentMethodRequest,
|
|
100
|
+
) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
101
|
+
"""Update Default Payment Method
|
|
102
|
+
|
|
103
|
+
Update the default payment method for the customer.
|
|
104
|
+
|
|
105
|
+
This changes which payment method will be used for future subscription charges.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Union[HTTPValidationError, UpdatePaymentMethodResponse]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
return sync_detailed(
|
|
119
|
+
client=client,
|
|
120
|
+
body=body,
|
|
121
|
+
).parsed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
async def asyncio_detailed(
|
|
125
|
+
*,
|
|
126
|
+
client: AuthenticatedClient,
|
|
127
|
+
body: UpdatePaymentMethodRequest,
|
|
128
|
+
) -> Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
129
|
+
"""Update Default Payment Method
|
|
130
|
+
|
|
131
|
+
Update the default payment method for the customer.
|
|
132
|
+
|
|
133
|
+
This changes which payment method will be used for future subscription charges.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Response[Union[HTTPValidationError, UpdatePaymentMethodResponse]]
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
kwargs = _get_kwargs(
|
|
147
|
+
body=body,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
151
|
+
|
|
152
|
+
return _build_response(client=client, response=response)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
body: UpdatePaymentMethodRequest,
|
|
159
|
+
) -> Optional[Union[HTTPValidationError, UpdatePaymentMethodResponse]]:
|
|
160
|
+
"""Update Default Payment Method
|
|
161
|
+
|
|
162
|
+
Update the default payment method for the customer.
|
|
163
|
+
|
|
164
|
+
This changes which payment method will be used for future subscription charges.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
168
|
+
|
|
169
|
+
Raises:
|
|
170
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
171
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
Union[HTTPValidationError, UpdatePaymentMethodResponse]
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
await asyncio_detailed(
|
|
179
|
+
client=client,
|
|
180
|
+
body=body,
|
|
181
|
+
)
|
|
182
|
+
).parsed
|
|
@@ -38,6 +38,7 @@ from .backup_stats_response import BackupStatsResponse
|
|
|
38
38
|
from .backup_stats_response_backup_formats import BackupStatsResponseBackupFormats
|
|
39
39
|
from .batch_agent_request import BatchAgentRequest
|
|
40
40
|
from .batch_agent_response import BatchAgentResponse
|
|
41
|
+
from .billing_customer import BillingCustomer
|
|
41
42
|
from .bulk_ingest_request import BulkIngestRequest
|
|
42
43
|
from .bulk_ingest_response import BulkIngestResponse
|
|
43
44
|
from .cancel_operation_response_canceloperation import (
|
|
@@ -47,6 +48,8 @@ from .cancellation_response import CancellationResponse
|
|
|
47
48
|
from .check_credit_balance_response_checkcreditbalance import (
|
|
48
49
|
CheckCreditBalanceResponseCheckcreditbalance,
|
|
49
50
|
)
|
|
51
|
+
from .checkout_response import CheckoutResponse
|
|
52
|
+
from .checkout_status_response import CheckoutStatusResponse
|
|
50
53
|
from .connection_options_response import ConnectionOptionsResponse
|
|
51
54
|
from .connection_provider_info import ConnectionProviderInfo
|
|
52
55
|
from .connection_provider_info_auth_type import ConnectionProviderInfoAuthType
|
|
@@ -57,6 +60,8 @@ from .connection_response_provider import ConnectionResponseProvider
|
|
|
57
60
|
from .copy_operation_limits import CopyOperationLimits
|
|
58
61
|
from .create_api_key_request import CreateAPIKeyRequest
|
|
59
62
|
from .create_api_key_response import CreateAPIKeyResponse
|
|
63
|
+
from .create_checkout_request import CreateCheckoutRequest
|
|
64
|
+
from .create_checkout_request_resource_config import CreateCheckoutRequestResourceConfig
|
|
60
65
|
from .create_connection_request import CreateConnectionRequest
|
|
61
66
|
from .create_connection_request_provider import CreateConnectionRequestProvider
|
|
62
67
|
from .create_graph_request import CreateGraphRequest
|
|
@@ -139,6 +144,9 @@ from .health_status import HealthStatus
|
|
|
139
144
|
from .health_status_details_type_0 import HealthStatusDetailsType0
|
|
140
145
|
from .http_validation_error import HTTPValidationError
|
|
141
146
|
from .initial_entity_data import InitialEntityData
|
|
147
|
+
from .invoice import Invoice
|
|
148
|
+
from .invoice_line_item import InvoiceLineItem
|
|
149
|
+
from .invoices_response import InvoicesResponse
|
|
142
150
|
from .link_token_request import LinkTokenRequest
|
|
143
151
|
from .link_token_request_options_type_0 import LinkTokenRequestOptionsType0
|
|
144
152
|
from .link_token_request_provider_type_0 import LinkTokenRequestProviderType0
|
|
@@ -169,6 +177,7 @@ from .password_check_response import PasswordCheckResponse
|
|
|
169
177
|
from .password_check_response_character_types import PasswordCheckResponseCharacterTypes
|
|
170
178
|
from .password_policy_response import PasswordPolicyResponse
|
|
171
179
|
from .password_policy_response_policy import PasswordPolicyResponsePolicy
|
|
180
|
+
from .payment_method import PaymentMethod
|
|
172
181
|
from .performance_insights import PerformanceInsights
|
|
173
182
|
from .performance_insights_operation_stats import PerformanceInsightsOperationStats
|
|
174
183
|
from .performance_insights_slow_queries_item import PerformanceInsightsSlowQueriesItem
|
|
@@ -242,11 +251,14 @@ from .table_query_request import TableQueryRequest
|
|
|
242
251
|
from .table_query_response import TableQueryResponse
|
|
243
252
|
from .token_pricing import TokenPricing
|
|
244
253
|
from .transaction_summary_response import TransactionSummaryResponse
|
|
254
|
+
from .upcoming_invoice import UpcomingInvoice
|
|
245
255
|
from .update_api_key_request import UpdateAPIKeyRequest
|
|
246
256
|
from .update_file_status_response_updatefilestatus import (
|
|
247
257
|
UpdateFileStatusResponseUpdatefilestatus,
|
|
248
258
|
)
|
|
249
259
|
from .update_password_request import UpdatePasswordRequest
|
|
260
|
+
from .update_payment_method_request import UpdatePaymentMethodRequest
|
|
261
|
+
from .update_payment_method_response import UpdatePaymentMethodResponse
|
|
250
262
|
from .update_user_request import UpdateUserRequest
|
|
251
263
|
from .upgrade_subscription_request import UpgradeSubscriptionRequest
|
|
252
264
|
from .user_graphs_response import UserGraphsResponse
|
|
@@ -291,11 +303,14 @@ __all__ = (
|
|
|
291
303
|
"BackupStatsResponseBackupFormats",
|
|
292
304
|
"BatchAgentRequest",
|
|
293
305
|
"BatchAgentResponse",
|
|
306
|
+
"BillingCustomer",
|
|
294
307
|
"BulkIngestRequest",
|
|
295
308
|
"BulkIngestResponse",
|
|
296
309
|
"CancellationResponse",
|
|
297
310
|
"CancelOperationResponseCanceloperation",
|
|
298
311
|
"CheckCreditBalanceResponseCheckcreditbalance",
|
|
312
|
+
"CheckoutResponse",
|
|
313
|
+
"CheckoutStatusResponse",
|
|
299
314
|
"ConnectionOptionsResponse",
|
|
300
315
|
"ConnectionProviderInfo",
|
|
301
316
|
"ConnectionProviderInfoAuthType",
|
|
@@ -306,6 +321,8 @@ __all__ = (
|
|
|
306
321
|
"CopyOperationLimits",
|
|
307
322
|
"CreateAPIKeyRequest",
|
|
308
323
|
"CreateAPIKeyResponse",
|
|
324
|
+
"CreateCheckoutRequest",
|
|
325
|
+
"CreateCheckoutRequestResourceConfig",
|
|
309
326
|
"CreateConnectionRequest",
|
|
310
327
|
"CreateConnectionRequestProvider",
|
|
311
328
|
"CreateGraphRequest",
|
|
@@ -370,6 +387,9 @@ __all__ = (
|
|
|
370
387
|
"HealthStatusDetailsType0",
|
|
371
388
|
"HTTPValidationError",
|
|
372
389
|
"InitialEntityData",
|
|
390
|
+
"Invoice",
|
|
391
|
+
"InvoiceLineItem",
|
|
392
|
+
"InvoicesResponse",
|
|
373
393
|
"LinkTokenRequest",
|
|
374
394
|
"LinkTokenRequestOptionsType0",
|
|
375
395
|
"LinkTokenRequestProviderType0",
|
|
@@ -396,6 +416,7 @@ __all__ = (
|
|
|
396
416
|
"PasswordCheckResponseCharacterTypes",
|
|
397
417
|
"PasswordPolicyResponse",
|
|
398
418
|
"PasswordPolicyResponsePolicy",
|
|
419
|
+
"PaymentMethod",
|
|
399
420
|
"PerformanceInsights",
|
|
400
421
|
"PerformanceInsightsOperationStats",
|
|
401
422
|
"PerformanceInsightsSlowQueriesItem",
|
|
@@ -453,9 +474,12 @@ __all__ = (
|
|
|
453
474
|
"TableQueryResponse",
|
|
454
475
|
"TokenPricing",
|
|
455
476
|
"TransactionSummaryResponse",
|
|
477
|
+
"UpcomingInvoice",
|
|
456
478
|
"UpdateAPIKeyRequest",
|
|
457
479
|
"UpdateFileStatusResponseUpdatefilestatus",
|
|
458
480
|
"UpdatePasswordRequest",
|
|
481
|
+
"UpdatePaymentMethodRequest",
|
|
482
|
+
"UpdatePaymentMethodResponse",
|
|
459
483
|
"UpdateUserRequest",
|
|
460
484
|
"UpgradeSubscriptionRequest",
|
|
461
485
|
"UserGraphsResponse",
|