robosystems-client 0.2.10__py3-none-any.whl → 0.2.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/auth/register_user.py +36 -8
- robosystems_client/api/billing/__init__.py +1 -0
- robosystems_client/api/billing/cancel_org_subscription.py +198 -0
- robosystems_client/api/billing/create_checkout_session.py +238 -0
- robosystems_client/api/billing/get_checkout_status.py +221 -0
- robosystems_client/api/billing/get_org_billing_customer.py +189 -0
- robosystems_client/api/billing/get_org_subscription.py +190 -0
- robosystems_client/api/billing/get_org_upcoming_invoice.py +203 -0
- robosystems_client/api/billing/list_org_invoices.py +210 -0
- robosystems_client/api/billing/list_org_subscriptions.py +194 -0
- robosystems_client/api/billing/update_org_payment_method.py +207 -0
- robosystems_client/api/org/__init__.py +1 -0
- robosystems_client/api/org/create_org.py +174 -0
- robosystems_client/api/org/get_org.py +165 -0
- 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/models/__init__.py +68 -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 +128 -0
- robosystems_client/models/checkout_response.py +130 -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/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/invoice.py +244 -0
- robosystems_client/models/invoice_line_item.py +118 -0
- robosystems_client/models/invoices_response.py +90 -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/payment_method.py +158 -0
- robosystems_client/models/repository_subscriptions.py +15 -4
- robosystems_client/models/service_offerings_response.py +15 -0
- robosystems_client/models/upcoming_invoice.py +128 -0
- robosystems_client/models/update_member_role_request.py +62 -0
- robosystems_client/models/update_org_request.py +103 -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.12.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.12.dist-info}/RECORD +71 -17
- robosystems_client/models/user_limits_response.py +0 -95
- robosystems_client/models/user_usage_response.py +0 -90
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.12.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.10.dist-info → robosystems_client-0.2.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
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.payment_method import PaymentMethod
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="BillingCustomer")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class BillingCustomer:
|
|
18
|
+
"""Billing customer information for an organization.
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
org_id (str): Organization ID
|
|
22
|
+
has_payment_method (bool): Whether organization has a payment method on file
|
|
23
|
+
invoice_billing_enabled (bool): Whether invoice billing is enabled (enterprise customers)
|
|
24
|
+
payment_methods (list['PaymentMethod']): List of payment methods on file
|
|
25
|
+
created_at (str): Customer creation timestamp (ISO format)
|
|
26
|
+
stripe_customer_id (Union[None, Unset, str]): Stripe customer ID if applicable
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
org_id: str
|
|
30
|
+
has_payment_method: bool
|
|
31
|
+
invoice_billing_enabled: bool
|
|
32
|
+
payment_methods: list["PaymentMethod"]
|
|
33
|
+
created_at: str
|
|
34
|
+
stripe_customer_id: Union[None, Unset, str] = UNSET
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
org_id = self.org_id
|
|
39
|
+
|
|
40
|
+
has_payment_method = self.has_payment_method
|
|
41
|
+
|
|
42
|
+
invoice_billing_enabled = self.invoice_billing_enabled
|
|
43
|
+
|
|
44
|
+
payment_methods = []
|
|
45
|
+
for payment_methods_item_data in self.payment_methods:
|
|
46
|
+
payment_methods_item = payment_methods_item_data.to_dict()
|
|
47
|
+
payment_methods.append(payment_methods_item)
|
|
48
|
+
|
|
49
|
+
created_at = self.created_at
|
|
50
|
+
|
|
51
|
+
stripe_customer_id: Union[None, Unset, str]
|
|
52
|
+
if isinstance(self.stripe_customer_id, Unset):
|
|
53
|
+
stripe_customer_id = UNSET
|
|
54
|
+
else:
|
|
55
|
+
stripe_customer_id = self.stripe_customer_id
|
|
56
|
+
|
|
57
|
+
field_dict: dict[str, Any] = {}
|
|
58
|
+
field_dict.update(self.additional_properties)
|
|
59
|
+
field_dict.update(
|
|
60
|
+
{
|
|
61
|
+
"org_id": org_id,
|
|
62
|
+
"has_payment_method": has_payment_method,
|
|
63
|
+
"invoice_billing_enabled": invoice_billing_enabled,
|
|
64
|
+
"payment_methods": payment_methods,
|
|
65
|
+
"created_at": created_at,
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
if stripe_customer_id is not UNSET:
|
|
69
|
+
field_dict["stripe_customer_id"] = stripe_customer_id
|
|
70
|
+
|
|
71
|
+
return field_dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
75
|
+
from ..models.payment_method import PaymentMethod
|
|
76
|
+
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
org_id = d.pop("org_id")
|
|
79
|
+
|
|
80
|
+
has_payment_method = d.pop("has_payment_method")
|
|
81
|
+
|
|
82
|
+
invoice_billing_enabled = d.pop("invoice_billing_enabled")
|
|
83
|
+
|
|
84
|
+
payment_methods = []
|
|
85
|
+
_payment_methods = d.pop("payment_methods")
|
|
86
|
+
for payment_methods_item_data in _payment_methods:
|
|
87
|
+
payment_methods_item = PaymentMethod.from_dict(payment_methods_item_data)
|
|
88
|
+
|
|
89
|
+
payment_methods.append(payment_methods_item)
|
|
90
|
+
|
|
91
|
+
created_at = d.pop("created_at")
|
|
92
|
+
|
|
93
|
+
def _parse_stripe_customer_id(data: object) -> Union[None, Unset, str]:
|
|
94
|
+
if data is None:
|
|
95
|
+
return data
|
|
96
|
+
if isinstance(data, Unset):
|
|
97
|
+
return data
|
|
98
|
+
return cast(Union[None, Unset, str], data)
|
|
99
|
+
|
|
100
|
+
stripe_customer_id = _parse_stripe_customer_id(d.pop("stripe_customer_id", UNSET))
|
|
101
|
+
|
|
102
|
+
billing_customer = cls(
|
|
103
|
+
org_id=org_id,
|
|
104
|
+
has_payment_method=has_payment_method,
|
|
105
|
+
invoice_billing_enabled=invoice_billing_enabled,
|
|
106
|
+
payment_methods=payment_methods,
|
|
107
|
+
created_at=created_at,
|
|
108
|
+
stripe_customer_id=stripe_customer_id,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
billing_customer.additional_properties = d
|
|
112
|
+
return billing_customer
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def additional_keys(self) -> list[str]:
|
|
116
|
+
return list(self.additional_properties.keys())
|
|
117
|
+
|
|
118
|
+
def __getitem__(self, key: str) -> Any:
|
|
119
|
+
return self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
122
|
+
self.additional_properties[key] = value
|
|
123
|
+
|
|
124
|
+
def __delitem__(self, key: str) -> None:
|
|
125
|
+
del self.additional_properties[key]
|
|
126
|
+
|
|
127
|
+
def __contains__(self, key: str) -> bool:
|
|
128
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import 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
|
+
T = TypeVar("T", bound="CheckoutResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CheckoutResponse:
|
|
14
|
+
"""Response from checkout session creation.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
checkout_url (Union[None, Unset, str]): URL to redirect user to for payment
|
|
18
|
+
session_id (Union[None, Unset, str]): Checkout session ID for status polling
|
|
19
|
+
subscription_id (Union[None, Unset, str]): Internal subscription ID
|
|
20
|
+
requires_checkout (Union[Unset, bool]): Whether checkout is required Default: True.
|
|
21
|
+
billing_disabled (Union[Unset, bool]): Whether billing is disabled on this instance Default: False.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
checkout_url: Union[None, Unset, str] = UNSET
|
|
25
|
+
session_id: Union[None, Unset, str] = UNSET
|
|
26
|
+
subscription_id: Union[None, Unset, str] = UNSET
|
|
27
|
+
requires_checkout: Union[Unset, bool] = True
|
|
28
|
+
billing_disabled: Union[Unset, bool] = False
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
checkout_url: Union[None, Unset, str]
|
|
33
|
+
if isinstance(self.checkout_url, Unset):
|
|
34
|
+
checkout_url = UNSET
|
|
35
|
+
else:
|
|
36
|
+
checkout_url = self.checkout_url
|
|
37
|
+
|
|
38
|
+
session_id: Union[None, Unset, str]
|
|
39
|
+
if isinstance(self.session_id, Unset):
|
|
40
|
+
session_id = UNSET
|
|
41
|
+
else:
|
|
42
|
+
session_id = self.session_id
|
|
43
|
+
|
|
44
|
+
subscription_id: Union[None, Unset, str]
|
|
45
|
+
if isinstance(self.subscription_id, Unset):
|
|
46
|
+
subscription_id = UNSET
|
|
47
|
+
else:
|
|
48
|
+
subscription_id = self.subscription_id
|
|
49
|
+
|
|
50
|
+
requires_checkout = self.requires_checkout
|
|
51
|
+
|
|
52
|
+
billing_disabled = self.billing_disabled
|
|
53
|
+
|
|
54
|
+
field_dict: dict[str, Any] = {}
|
|
55
|
+
field_dict.update(self.additional_properties)
|
|
56
|
+
field_dict.update({})
|
|
57
|
+
if checkout_url is not UNSET:
|
|
58
|
+
field_dict["checkout_url"] = checkout_url
|
|
59
|
+
if session_id is not UNSET:
|
|
60
|
+
field_dict["session_id"] = session_id
|
|
61
|
+
if subscription_id is not UNSET:
|
|
62
|
+
field_dict["subscription_id"] = subscription_id
|
|
63
|
+
if requires_checkout is not UNSET:
|
|
64
|
+
field_dict["requires_checkout"] = requires_checkout
|
|
65
|
+
if billing_disabled is not UNSET:
|
|
66
|
+
field_dict["billing_disabled"] = billing_disabled
|
|
67
|
+
|
|
68
|
+
return field_dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
72
|
+
d = dict(src_dict)
|
|
73
|
+
|
|
74
|
+
def _parse_checkout_url(data: object) -> Union[None, Unset, str]:
|
|
75
|
+
if data is None:
|
|
76
|
+
return data
|
|
77
|
+
if isinstance(data, Unset):
|
|
78
|
+
return data
|
|
79
|
+
return cast(Union[None, Unset, str], data)
|
|
80
|
+
|
|
81
|
+
checkout_url = _parse_checkout_url(d.pop("checkout_url", UNSET))
|
|
82
|
+
|
|
83
|
+
def _parse_session_id(data: object) -> Union[None, Unset, str]:
|
|
84
|
+
if data is None:
|
|
85
|
+
return data
|
|
86
|
+
if isinstance(data, Unset):
|
|
87
|
+
return data
|
|
88
|
+
return cast(Union[None, Unset, str], data)
|
|
89
|
+
|
|
90
|
+
session_id = _parse_session_id(d.pop("session_id", UNSET))
|
|
91
|
+
|
|
92
|
+
def _parse_subscription_id(data: object) -> Union[None, Unset, str]:
|
|
93
|
+
if data is None:
|
|
94
|
+
return data
|
|
95
|
+
if isinstance(data, Unset):
|
|
96
|
+
return data
|
|
97
|
+
return cast(Union[None, Unset, str], data)
|
|
98
|
+
|
|
99
|
+
subscription_id = _parse_subscription_id(d.pop("subscription_id", UNSET))
|
|
100
|
+
|
|
101
|
+
requires_checkout = d.pop("requires_checkout", UNSET)
|
|
102
|
+
|
|
103
|
+
billing_disabled = d.pop("billing_disabled", UNSET)
|
|
104
|
+
|
|
105
|
+
checkout_response = cls(
|
|
106
|
+
checkout_url=checkout_url,
|
|
107
|
+
session_id=session_id,
|
|
108
|
+
subscription_id=subscription_id,
|
|
109
|
+
requires_checkout=requires_checkout,
|
|
110
|
+
billing_disabled=billing_disabled,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
checkout_response.additional_properties = d
|
|
114
|
+
return checkout_response
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def additional_keys(self) -> list[str]:
|
|
118
|
+
return list(self.additional_properties.keys())
|
|
119
|
+
|
|
120
|
+
def __getitem__(self, key: str) -> Any:
|
|
121
|
+
return self.additional_properties[key]
|
|
122
|
+
|
|
123
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
124
|
+
self.additional_properties[key] = value
|
|
125
|
+
|
|
126
|
+
def __delitem__(self, key: str) -> None:
|
|
127
|
+
del self.additional_properties[key]
|
|
128
|
+
|
|
129
|
+
def __contains__(self, key: str) -> bool:
|
|
130
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import 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
|
+
T = TypeVar("T", bound="CheckoutStatusResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CheckoutStatusResponse:
|
|
14
|
+
"""Status of a checkout session.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
status (str): Checkout status: 'pending_payment', 'provisioning', 'completed', 'failed'
|
|
18
|
+
subscription_id (str): Internal subscription ID
|
|
19
|
+
resource_id (Union[None, Unset, str]): Resource ID (graph_id or repository name) once provisioned
|
|
20
|
+
operation_id (Union[None, Unset, str]): SSE operation ID for monitoring provisioning progress
|
|
21
|
+
error (Union[None, Unset, str]): Error message if checkout failed
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
status: str
|
|
25
|
+
subscription_id: str
|
|
26
|
+
resource_id: Union[None, Unset, str] = UNSET
|
|
27
|
+
operation_id: Union[None, Unset, str] = UNSET
|
|
28
|
+
error: Union[None, Unset, str] = UNSET
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
status = self.status
|
|
33
|
+
|
|
34
|
+
subscription_id = self.subscription_id
|
|
35
|
+
|
|
36
|
+
resource_id: Union[None, Unset, str]
|
|
37
|
+
if isinstance(self.resource_id, Unset):
|
|
38
|
+
resource_id = UNSET
|
|
39
|
+
else:
|
|
40
|
+
resource_id = self.resource_id
|
|
41
|
+
|
|
42
|
+
operation_id: Union[None, Unset, str]
|
|
43
|
+
if isinstance(self.operation_id, Unset):
|
|
44
|
+
operation_id = UNSET
|
|
45
|
+
else:
|
|
46
|
+
operation_id = self.operation_id
|
|
47
|
+
|
|
48
|
+
error: Union[None, Unset, str]
|
|
49
|
+
if isinstance(self.error, Unset):
|
|
50
|
+
error = UNSET
|
|
51
|
+
else:
|
|
52
|
+
error = self.error
|
|
53
|
+
|
|
54
|
+
field_dict: dict[str, Any] = {}
|
|
55
|
+
field_dict.update(self.additional_properties)
|
|
56
|
+
field_dict.update(
|
|
57
|
+
{
|
|
58
|
+
"status": status,
|
|
59
|
+
"subscription_id": subscription_id,
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
if resource_id is not UNSET:
|
|
63
|
+
field_dict["resource_id"] = resource_id
|
|
64
|
+
if operation_id is not UNSET:
|
|
65
|
+
field_dict["operation_id"] = operation_id
|
|
66
|
+
if error is not UNSET:
|
|
67
|
+
field_dict["error"] = error
|
|
68
|
+
|
|
69
|
+
return field_dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
73
|
+
d = dict(src_dict)
|
|
74
|
+
status = d.pop("status")
|
|
75
|
+
|
|
76
|
+
subscription_id = d.pop("subscription_id")
|
|
77
|
+
|
|
78
|
+
def _parse_resource_id(data: object) -> Union[None, Unset, str]:
|
|
79
|
+
if data is None:
|
|
80
|
+
return data
|
|
81
|
+
if isinstance(data, Unset):
|
|
82
|
+
return data
|
|
83
|
+
return cast(Union[None, Unset, str], data)
|
|
84
|
+
|
|
85
|
+
resource_id = _parse_resource_id(d.pop("resource_id", UNSET))
|
|
86
|
+
|
|
87
|
+
def _parse_operation_id(data: object) -> Union[None, Unset, str]:
|
|
88
|
+
if data is None:
|
|
89
|
+
return data
|
|
90
|
+
if isinstance(data, Unset):
|
|
91
|
+
return data
|
|
92
|
+
return cast(Union[None, Unset, str], data)
|
|
93
|
+
|
|
94
|
+
operation_id = _parse_operation_id(d.pop("operation_id", UNSET))
|
|
95
|
+
|
|
96
|
+
def _parse_error(data: object) -> Union[None, Unset, str]:
|
|
97
|
+
if data is None:
|
|
98
|
+
return data
|
|
99
|
+
if isinstance(data, Unset):
|
|
100
|
+
return data
|
|
101
|
+
return cast(Union[None, Unset, str], data)
|
|
102
|
+
|
|
103
|
+
error = _parse_error(d.pop("error", UNSET))
|
|
104
|
+
|
|
105
|
+
checkout_status_response = cls(
|
|
106
|
+
status=status,
|
|
107
|
+
subscription_id=subscription_id,
|
|
108
|
+
resource_id=resource_id,
|
|
109
|
+
operation_id=operation_id,
|
|
110
|
+
error=error,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
checkout_status_response.additional_properties = d
|
|
114
|
+
return checkout_status_response
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def additional_keys(self) -> list[str]:
|
|
118
|
+
return list(self.additional_properties.keys())
|
|
119
|
+
|
|
120
|
+
def __getitem__(self, key: str) -> Any:
|
|
121
|
+
return self.additional_properties[key]
|
|
122
|
+
|
|
123
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
124
|
+
self.additional_properties[key] = value
|
|
125
|
+
|
|
126
|
+
def __delitem__(self, key: str) -> None:
|
|
127
|
+
del self.additional_properties[key]
|
|
128
|
+
|
|
129
|
+
def __contains__(self, key: str) -> bool:
|
|
130
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.create_checkout_request_resource_config import (
|
|
9
|
+
CreateCheckoutRequestResourceConfig,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="CreateCheckoutRequest")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class CreateCheckoutRequest:
|
|
18
|
+
"""Request to create a checkout session for payment collection.
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
plan_name (str): Billing plan name (e.g., 'kuzu-standard')
|
|
22
|
+
resource_type (str): Resource type ('graph' or 'repository')
|
|
23
|
+
resource_config (CreateCheckoutRequestResourceConfig): Configuration for the resource to be provisioned
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
plan_name: str
|
|
27
|
+
resource_type: str
|
|
28
|
+
resource_config: "CreateCheckoutRequestResourceConfig"
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
plan_name = self.plan_name
|
|
33
|
+
|
|
34
|
+
resource_type = self.resource_type
|
|
35
|
+
|
|
36
|
+
resource_config = self.resource_config.to_dict()
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"plan_name": plan_name,
|
|
43
|
+
"resource_type": resource_type,
|
|
44
|
+
"resource_config": resource_config,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
from ..models.create_checkout_request_resource_config import (
|
|
53
|
+
CreateCheckoutRequestResourceConfig,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
d = dict(src_dict)
|
|
57
|
+
plan_name = d.pop("plan_name")
|
|
58
|
+
|
|
59
|
+
resource_type = d.pop("resource_type")
|
|
60
|
+
|
|
61
|
+
resource_config = CreateCheckoutRequestResourceConfig.from_dict(
|
|
62
|
+
d.pop("resource_config")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
create_checkout_request = cls(
|
|
66
|
+
plan_name=plan_name,
|
|
67
|
+
resource_type=resource_type,
|
|
68
|
+
resource_config=resource_config,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
create_checkout_request.additional_properties = d
|
|
72
|
+
return create_checkout_request
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> list[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
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="CreateCheckoutRequestResourceConfig")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CreateCheckoutRequestResourceConfig:
|
|
12
|
+
"""Configuration for the resource to be provisioned"""
|
|
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
|
+
create_checkout_request_resource_config = cls()
|
|
26
|
+
|
|
27
|
+
create_checkout_request_resource_config.additional_properties = d
|
|
28
|
+
return create_checkout_request_resource_config
|
|
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
|
|
@@ -0,0 +1,79 @@
|
|
|
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 ..models.org_type import OrgType
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="CreateOrgRequest")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class CreateOrgRequest:
|
|
15
|
+
"""Request to create an organization.
|
|
16
|
+
|
|
17
|
+
Attributes:
|
|
18
|
+
name (str):
|
|
19
|
+
org_type (Union[Unset, OrgType]):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
name: str
|
|
23
|
+
org_type: Union[Unset, OrgType] = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
name = self.name
|
|
28
|
+
|
|
29
|
+
org_type: Union[Unset, str] = UNSET
|
|
30
|
+
if not isinstance(self.org_type, Unset):
|
|
31
|
+
org_type = self.org_type.value
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"name": name,
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
if org_type is not UNSET:
|
|
41
|
+
field_dict["org_type"] = org_type
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
name = d.pop("name")
|
|
49
|
+
|
|
50
|
+
_org_type = d.pop("org_type", UNSET)
|
|
51
|
+
org_type: Union[Unset, OrgType]
|
|
52
|
+
if isinstance(_org_type, Unset):
|
|
53
|
+
org_type = UNSET
|
|
54
|
+
else:
|
|
55
|
+
org_type = OrgType(_org_type)
|
|
56
|
+
|
|
57
|
+
create_org_request = cls(
|
|
58
|
+
name=name,
|
|
59
|
+
org_type=org_type,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
create_org_request.additional_properties = d
|
|
63
|
+
return create_org_request
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def additional_keys(self) -> list[str]:
|
|
67
|
+
return list(self.additional_properties.keys())
|
|
68
|
+
|
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
|
70
|
+
return self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
73
|
+
self.additional_properties[key] = value
|
|
74
|
+
|
|
75
|
+
def __delitem__(self, key: str) -> None:
|
|
76
|
+
del self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __contains__(self, key: str) -> bool:
|
|
79
|
+
return key in self.additional_properties
|