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
|
@@ -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
|
|
@@ -4,12 +4,12 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="CreateCheckoutRequestResourceConfig")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
12
|
-
"""
|
|
11
|
+
class CreateCheckoutRequestResourceConfig:
|
|
12
|
+
"""Configuration for the resource to be provisioned"""
|
|
13
13
|
|
|
14
14
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
15
|
|
|
@@ -22,10 +22,10 @@ class GraphUsageResponseQueryStatistics:
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
24
|
d = dict(src_dict)
|
|
25
|
-
|
|
25
|
+
create_checkout_request_resource_config = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
create_checkout_request_resource_config.additional_properties = d
|
|
28
|
+
return create_checkout_request_resource_config
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def additional_keys(self) -> list[str]:
|
|
@@ -4,28 +4,44 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="CreateRepositorySubscriptionRequest")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
12
|
-
"""
|
|
11
|
+
class CreateRepositorySubscriptionRequest:
|
|
12
|
+
"""Request to create a repository subscription.
|
|
13
13
|
|
|
14
|
+
Attributes:
|
|
15
|
+
plan_name (str): Plan name for the repository subscription
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
plan_name: str
|
|
14
19
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
20
|
|
|
16
21
|
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
plan_name = self.plan_name
|
|
23
|
+
|
|
17
24
|
field_dict: dict[str, Any] = {}
|
|
18
25
|
field_dict.update(self.additional_properties)
|
|
26
|
+
field_dict.update(
|
|
27
|
+
{
|
|
28
|
+
"plan_name": plan_name,
|
|
29
|
+
}
|
|
30
|
+
)
|
|
19
31
|
|
|
20
32
|
return field_dict
|
|
21
33
|
|
|
22
34
|
@classmethod
|
|
23
35
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
36
|
d = dict(src_dict)
|
|
25
|
-
|
|
37
|
+
plan_name = d.pop("plan_name")
|
|
38
|
+
|
|
39
|
+
create_repository_subscription_request = cls(
|
|
40
|
+
plan_name=plan_name,
|
|
41
|
+
)
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
return
|
|
43
|
+
create_repository_subscription_request.additional_properties = d
|
|
44
|
+
return create_repository_subscription_request
|
|
29
45
|
|
|
30
46
|
@property
|
|
31
47
|
def additional_keys(self) -> list[str]:
|
|
@@ -1,137 +1,103 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.credit_summary_operation_breakdown import (
|
|
9
|
+
CreditSummaryOperationBreakdown,
|
|
10
|
+
)
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
T = TypeVar("T", bound="CreditSummary")
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
@_attrs_define
|
|
13
17
|
class CreditSummary:
|
|
14
|
-
"""Credit
|
|
18
|
+
"""Credit consumption summary.
|
|
15
19
|
|
|
16
20
|
Attributes:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
last_allocation_date (Union[None, Unset, str]): Last allocation date (ISO format)
|
|
25
|
-
next_allocation_date (Union[None, Unset, str]): Next allocation date (ISO format)
|
|
21
|
+
graph_tier (str): Subscription tier
|
|
22
|
+
total_credits_consumed (float): Total credits consumed
|
|
23
|
+
total_base_cost (float): Total base cost before multipliers
|
|
24
|
+
operation_breakdown (CreditSummaryOperationBreakdown): Credit usage by operation type
|
|
25
|
+
cached_operations (int): Number of cached operations
|
|
26
|
+
billable_operations (int): Number of billable operations
|
|
27
|
+
transaction_count (int): Total transaction count
|
|
26
28
|
"""
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
last_allocation_date: Union[None, Unset, str] = UNSET
|
|
36
|
-
next_allocation_date: Union[None, Unset, str] = UNSET
|
|
30
|
+
graph_tier: str
|
|
31
|
+
total_credits_consumed: float
|
|
32
|
+
total_base_cost: float
|
|
33
|
+
operation_breakdown: "CreditSummaryOperationBreakdown"
|
|
34
|
+
cached_operations: int
|
|
35
|
+
billable_operations: int
|
|
36
|
+
transaction_count: int
|
|
37
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
38
|
|
|
39
39
|
def to_dict(self) -> dict[str, Any]:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
monthly_allocation = self.monthly_allocation
|
|
43
|
-
|
|
44
|
-
consumed_this_month = self.consumed_this_month
|
|
40
|
+
graph_tier = self.graph_tier
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
total_credits_consumed = self.total_credits_consumed
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
total_base_cost = self.total_base_cost
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
operation_breakdown = self.operation_breakdown.to_dict()
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
cached_operations = self.cached_operations
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
if isinstance(self.last_allocation_date, Unset):
|
|
56
|
-
last_allocation_date = UNSET
|
|
57
|
-
else:
|
|
58
|
-
last_allocation_date = self.last_allocation_date
|
|
50
|
+
billable_operations = self.billable_operations
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
if isinstance(self.next_allocation_date, Unset):
|
|
62
|
-
next_allocation_date = UNSET
|
|
63
|
-
else:
|
|
64
|
-
next_allocation_date = self.next_allocation_date
|
|
52
|
+
transaction_count = self.transaction_count
|
|
65
53
|
|
|
66
54
|
field_dict: dict[str, Any] = {}
|
|
67
55
|
field_dict.update(self.additional_properties)
|
|
68
56
|
field_dict.update(
|
|
69
57
|
{
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
58
|
+
"graph_tier": graph_tier,
|
|
59
|
+
"total_credits_consumed": total_credits_consumed,
|
|
60
|
+
"total_base_cost": total_base_cost,
|
|
61
|
+
"operation_breakdown": operation_breakdown,
|
|
62
|
+
"cached_operations": cached_operations,
|
|
63
|
+
"billable_operations": billable_operations,
|
|
64
|
+
"transaction_count": transaction_count,
|
|
77
65
|
}
|
|
78
66
|
)
|
|
79
|
-
if last_allocation_date is not UNSET:
|
|
80
|
-
field_dict["last_allocation_date"] = last_allocation_date
|
|
81
|
-
if next_allocation_date is not UNSET:
|
|
82
|
-
field_dict["next_allocation_date"] = next_allocation_date
|
|
83
67
|
|
|
84
68
|
return field_dict
|
|
85
69
|
|
|
86
70
|
@classmethod
|
|
87
71
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
monthly_allocation = d.pop("monthly_allocation")
|
|
92
|
-
|
|
93
|
-
consumed_this_month = d.pop("consumed_this_month")
|
|
94
|
-
|
|
95
|
-
usage_percentage = d.pop("usage_percentage")
|
|
96
|
-
|
|
97
|
-
rollover_credits = d.pop("rollover_credits")
|
|
72
|
+
from ..models.credit_summary_operation_breakdown import (
|
|
73
|
+
CreditSummaryOperationBreakdown,
|
|
74
|
+
)
|
|
98
75
|
|
|
99
|
-
|
|
76
|
+
d = dict(src_dict)
|
|
77
|
+
graph_tier = d.pop("graph_tier")
|
|
100
78
|
|
|
101
|
-
|
|
79
|
+
total_credits_consumed = d.pop("total_credits_consumed")
|
|
102
80
|
|
|
103
|
-
|
|
104
|
-
if data is None:
|
|
105
|
-
return data
|
|
106
|
-
if isinstance(data, Unset):
|
|
107
|
-
return data
|
|
108
|
-
return cast(Union[None, Unset, str], data)
|
|
81
|
+
total_base_cost = d.pop("total_base_cost")
|
|
109
82
|
|
|
110
|
-
|
|
111
|
-
d.pop("
|
|
83
|
+
operation_breakdown = CreditSummaryOperationBreakdown.from_dict(
|
|
84
|
+
d.pop("operation_breakdown")
|
|
112
85
|
)
|
|
113
86
|
|
|
114
|
-
|
|
115
|
-
if data is None:
|
|
116
|
-
return data
|
|
117
|
-
if isinstance(data, Unset):
|
|
118
|
-
return data
|
|
119
|
-
return cast(Union[None, Unset, str], data)
|
|
87
|
+
cached_operations = d.pop("cached_operations")
|
|
120
88
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
)
|
|
89
|
+
billable_operations = d.pop("billable_operations")
|
|
90
|
+
|
|
91
|
+
transaction_count = d.pop("transaction_count")
|
|
124
92
|
|
|
125
93
|
credit_summary = cls(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
last_allocation_date=last_allocation_date,
|
|
134
|
-
next_allocation_date=next_allocation_date,
|
|
94
|
+
graph_tier=graph_tier,
|
|
95
|
+
total_credits_consumed=total_credits_consumed,
|
|
96
|
+
total_base_cost=total_base_cost,
|
|
97
|
+
operation_breakdown=operation_breakdown,
|
|
98
|
+
cached_operations=cached_operations,
|
|
99
|
+
billable_operations=billable_operations,
|
|
100
|
+
transaction_count=transaction_count,
|
|
135
101
|
)
|
|
136
102
|
|
|
137
103
|
credit_summary.additional_properties = d
|
|
@@ -4,12 +4,12 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="CreditSummaryOperationBreakdown")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
12
|
-
"""
|
|
11
|
+
class CreditSummaryOperationBreakdown:
|
|
12
|
+
"""Credit usage by operation type"""
|
|
13
13
|
|
|
14
14
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
15
|
|
|
@@ -22,10 +22,10 @@ class GraphUsageResponseStorageUsage:
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
24
|
d = dict(src_dict)
|
|
25
|
-
|
|
25
|
+
credit_summary_operation_breakdown = cls()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
credit_summary_operation_breakdown.additional_properties = d
|
|
28
|
+
return credit_summary_operation_breakdown
|
|
29
29
|
|
|
30
30
|
@property
|
|
31
31
|
def additional_keys(self) -> list[str]:
|
|
@@ -0,0 +1,200 @@
|
|
|
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="GraphSubscriptionResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GraphSubscriptionResponse:
|
|
14
|
+
"""Response for graph or repository subscription details.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
id (str): Subscription ID
|
|
18
|
+
resource_type (str): Resource type (graph or repository)
|
|
19
|
+
resource_id (str): Resource identifier
|
|
20
|
+
plan_name (str): Current plan name
|
|
21
|
+
billing_interval (str): Billing interval
|
|
22
|
+
status (str): Subscription status
|
|
23
|
+
base_price_cents (int): Base price in cents
|
|
24
|
+
created_at (str): Creation timestamp
|
|
25
|
+
current_period_start (Union[None, Unset, str]): Current billing period start
|
|
26
|
+
current_period_end (Union[None, Unset, str]): Current billing period end
|
|
27
|
+
started_at (Union[None, Unset, str]): Subscription start date
|
|
28
|
+
canceled_at (Union[None, Unset, str]): Cancellation date
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: str
|
|
32
|
+
resource_type: str
|
|
33
|
+
resource_id: str
|
|
34
|
+
plan_name: str
|
|
35
|
+
billing_interval: str
|
|
36
|
+
status: str
|
|
37
|
+
base_price_cents: int
|
|
38
|
+
created_at: str
|
|
39
|
+
current_period_start: Union[None, Unset, str] = UNSET
|
|
40
|
+
current_period_end: Union[None, Unset, str] = UNSET
|
|
41
|
+
started_at: Union[None, Unset, str] = UNSET
|
|
42
|
+
canceled_at: Union[None, Unset, str] = UNSET
|
|
43
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
44
|
+
|
|
45
|
+
def to_dict(self) -> dict[str, Any]:
|
|
46
|
+
id = self.id
|
|
47
|
+
|
|
48
|
+
resource_type = self.resource_type
|
|
49
|
+
|
|
50
|
+
resource_id = self.resource_id
|
|
51
|
+
|
|
52
|
+
plan_name = self.plan_name
|
|
53
|
+
|
|
54
|
+
billing_interval = self.billing_interval
|
|
55
|
+
|
|
56
|
+
status = self.status
|
|
57
|
+
|
|
58
|
+
base_price_cents = self.base_price_cents
|
|
59
|
+
|
|
60
|
+
created_at = self.created_at
|
|
61
|
+
|
|
62
|
+
current_period_start: Union[None, Unset, str]
|
|
63
|
+
if isinstance(self.current_period_start, Unset):
|
|
64
|
+
current_period_start = UNSET
|
|
65
|
+
else:
|
|
66
|
+
current_period_start = self.current_period_start
|
|
67
|
+
|
|
68
|
+
current_period_end: Union[None, Unset, str]
|
|
69
|
+
if isinstance(self.current_period_end, Unset):
|
|
70
|
+
current_period_end = UNSET
|
|
71
|
+
else:
|
|
72
|
+
current_period_end = self.current_period_end
|
|
73
|
+
|
|
74
|
+
started_at: Union[None, Unset, str]
|
|
75
|
+
if isinstance(self.started_at, Unset):
|
|
76
|
+
started_at = UNSET
|
|
77
|
+
else:
|
|
78
|
+
started_at = self.started_at
|
|
79
|
+
|
|
80
|
+
canceled_at: Union[None, Unset, str]
|
|
81
|
+
if isinstance(self.canceled_at, Unset):
|
|
82
|
+
canceled_at = UNSET
|
|
83
|
+
else:
|
|
84
|
+
canceled_at = self.canceled_at
|
|
85
|
+
|
|
86
|
+
field_dict: dict[str, Any] = {}
|
|
87
|
+
field_dict.update(self.additional_properties)
|
|
88
|
+
field_dict.update(
|
|
89
|
+
{
|
|
90
|
+
"id": id,
|
|
91
|
+
"resource_type": resource_type,
|
|
92
|
+
"resource_id": resource_id,
|
|
93
|
+
"plan_name": plan_name,
|
|
94
|
+
"billing_interval": billing_interval,
|
|
95
|
+
"status": status,
|
|
96
|
+
"base_price_cents": base_price_cents,
|
|
97
|
+
"created_at": created_at,
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
if current_period_start is not UNSET:
|
|
101
|
+
field_dict["current_period_start"] = current_period_start
|
|
102
|
+
if current_period_end is not UNSET:
|
|
103
|
+
field_dict["current_period_end"] = current_period_end
|
|
104
|
+
if started_at is not UNSET:
|
|
105
|
+
field_dict["started_at"] = started_at
|
|
106
|
+
if canceled_at is not UNSET:
|
|
107
|
+
field_dict["canceled_at"] = canceled_at
|
|
108
|
+
|
|
109
|
+
return field_dict
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
113
|
+
d = dict(src_dict)
|
|
114
|
+
id = d.pop("id")
|
|
115
|
+
|
|
116
|
+
resource_type = d.pop("resource_type")
|
|
117
|
+
|
|
118
|
+
resource_id = d.pop("resource_id")
|
|
119
|
+
|
|
120
|
+
plan_name = d.pop("plan_name")
|
|
121
|
+
|
|
122
|
+
billing_interval = d.pop("billing_interval")
|
|
123
|
+
|
|
124
|
+
status = d.pop("status")
|
|
125
|
+
|
|
126
|
+
base_price_cents = d.pop("base_price_cents")
|
|
127
|
+
|
|
128
|
+
created_at = d.pop("created_at")
|
|
129
|
+
|
|
130
|
+
def _parse_current_period_start(data: object) -> Union[None, Unset, str]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(Union[None, Unset, str], data)
|
|
136
|
+
|
|
137
|
+
current_period_start = _parse_current_period_start(
|
|
138
|
+
d.pop("current_period_start", UNSET)
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
def _parse_current_period_end(data: object) -> Union[None, Unset, str]:
|
|
142
|
+
if data is None:
|
|
143
|
+
return data
|
|
144
|
+
if isinstance(data, Unset):
|
|
145
|
+
return data
|
|
146
|
+
return cast(Union[None, Unset, str], data)
|
|
147
|
+
|
|
148
|
+
current_period_end = _parse_current_period_end(d.pop("current_period_end", UNSET))
|
|
149
|
+
|
|
150
|
+
def _parse_started_at(data: object) -> Union[None, Unset, str]:
|
|
151
|
+
if data is None:
|
|
152
|
+
return data
|
|
153
|
+
if isinstance(data, Unset):
|
|
154
|
+
return data
|
|
155
|
+
return cast(Union[None, Unset, str], data)
|
|
156
|
+
|
|
157
|
+
started_at = _parse_started_at(d.pop("started_at", UNSET))
|
|
158
|
+
|
|
159
|
+
def _parse_canceled_at(data: object) -> Union[None, Unset, str]:
|
|
160
|
+
if data is None:
|
|
161
|
+
return data
|
|
162
|
+
if isinstance(data, Unset):
|
|
163
|
+
return data
|
|
164
|
+
return cast(Union[None, Unset, str], data)
|
|
165
|
+
|
|
166
|
+
canceled_at = _parse_canceled_at(d.pop("canceled_at", UNSET))
|
|
167
|
+
|
|
168
|
+
graph_subscription_response = cls(
|
|
169
|
+
id=id,
|
|
170
|
+
resource_type=resource_type,
|
|
171
|
+
resource_id=resource_id,
|
|
172
|
+
plan_name=plan_name,
|
|
173
|
+
billing_interval=billing_interval,
|
|
174
|
+
status=status,
|
|
175
|
+
base_price_cents=base_price_cents,
|
|
176
|
+
created_at=created_at,
|
|
177
|
+
current_period_start=current_period_start,
|
|
178
|
+
current_period_end=current_period_end,
|
|
179
|
+
started_at=started_at,
|
|
180
|
+
canceled_at=canceled_at,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
graph_subscription_response.additional_properties = d
|
|
184
|
+
return graph_subscription_response
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def additional_keys(self) -> list[str]:
|
|
188
|
+
return list(self.additional_properties.keys())
|
|
189
|
+
|
|
190
|
+
def __getitem__(self, key: str) -> Any:
|
|
191
|
+
return self.additional_properties[key]
|
|
192
|
+
|
|
193
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
194
|
+
self.additional_properties[key] = value
|
|
195
|
+
|
|
196
|
+
def __delitem__(self, key: str) -> None:
|
|
197
|
+
del self.additional_properties[key]
|
|
198
|
+
|
|
199
|
+
def __contains__(self, key: str) -> bool:
|
|
200
|
+
return key in self.additional_properties
|