typizer 0.1.0__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.
- typizer/__init__.py +8 -0
- typizer/api/__init__.py +1 -0
- typizer/api/account/__init__.py +1 -0
- typizer/api/account/delete_me.py +243 -0
- typizer/api/account/get_me.py +192 -0
- typizer/api/account/list_sign_ins.py +194 -0
- typizer/api/agent/__init__.py +1 -0
- typizer/api/agent/create_agent_message.py +290 -0
- typizer/api/agent/create_agent_sample_run.py +304 -0
- typizer/api/agent/create_agent_thread.py +251 -0
- typizer/api/agent/get_agent_thread.py +223 -0
- typizer/api/agent/list_agent_threads.py +243 -0
- typizer/api/agent/save_agent_thread.py +283 -0
- typizer/api/agent/update_agent_thread.py +245 -0
- typizer/api/api_keys/__init__.py +1 -0
- typizer/api/api_keys/create_api_key.py +235 -0
- typizer/api/api_keys/delete_api_key.py +217 -0
- typizer/api/api_keys/list_api_keys.py +196 -0
- typizer/api/auth/__init__.py +1 -0
- typizer/api/auth/start_login.py +209 -0
- typizer/api/batches/__init__.py +1 -0
- typizer/api/batches/create_batch.py +333 -0
- typizer/api/batches/export_batch.py +281 -0
- typizer/api/batches/get_batch.py +213 -0
- typizer/api/batches/list_batches.py +243 -0
- typizer/api/billing/__init__.py +1 -0
- typizer/api/billing/create_checkout.py +243 -0
- typizer/api/billing/create_contract_request.py +233 -0
- typizer/api/billing/create_invoice.py +243 -0
- typizer/api/billing/get_act_pdf.py +225 -0
- typizer/api/billing/get_balance.py +187 -0
- typizer/api/billing/get_billing_profile.py +196 -0
- typizer/api/billing/get_company.py +233 -0
- typizer/api/billing/get_contract_request_pdf.py +225 -0
- typizer/api/billing/get_payment.py +213 -0
- typizer/api/billing/get_usage.py +278 -0
- typizer/api/billing/list_contract_requests.py +196 -0
- typizer/api/billing/list_payments.py +233 -0
- typizer/api/billing/suggest_companies.py +214 -0
- typizer/api/billing/update_autotopup.py +231 -0
- typizer/api/billing/update_billing_profile.py +230 -0
- typizer/api/consents/__init__.py +1 -0
- typizer/api/consents/create_consent.py +228 -0
- typizer/api/consents/get_my_consents.py +210 -0
- typizer/api/demo/__init__.py +1 -0
- typizer/api/demo/create_demo_run.py +314 -0
- typizer/api/demo/get_demo_run.py +249 -0
- typizer/api/demo/list_demo_samples.py +159 -0
- typizer/api/files/__init__.py +1 -0
- typizer/api/files/create_file.py +266 -0
- typizer/api/files/delete_file.py +231 -0
- typizer/api/files/get_file.py +213 -0
- typizer/api/files/get_file_content.py +233 -0
- typizer/api/meta/__init__.py +1 -0
- typizer/api/meta/get_open_api_document.py +185 -0
- typizer/api/organization/__init__.py +1 -0
- typizer/api/organization/delete_organization.py +231 -0
- typizer/api/organization/get_organization.py +194 -0
- typizer/api/organization/update_organization.py +212 -0
- typizer/api/runs/__init__.py +1 -0
- typizer/api/runs/create_run.py +358 -0
- typizer/api/runs/extract.py +350 -0
- typizer/api/runs/get_run.py +225 -0
- typizer/api/runs/get_run_output.py +286 -0
- typizer/api/runs/list_runs.py +362 -0
- typizer/api/runs/retry_run.py +275 -0
- typizer/api/status/__init__.py +1 -0
- typizer/api/status/get_status.py +172 -0
- typizer/api/typizers/__init__.py +1 -0
- typizer/api/typizers/create_typizer.py +239 -0
- typizer/api/typizers/delete_typizer.py +229 -0
- typizer/api/typizers/generate_typizer.py +282 -0
- typizer/api/typizers/get_typizer.py +213 -0
- typizer/api/typizers/get_typizer_version.py +231 -0
- typizer/api/typizers/get_typizer_xsd.py +215 -0
- typizer/api/typizers/list_typizer_versions.py +256 -0
- typizer/api/typizers/list_typizers.py +235 -0
- typizer/api/typizers/update_typizer.py +247 -0
- typizer/api/webhooks/__init__.py +1 -0
- typizer/api/webhooks/create_webhook_endpoint.py +259 -0
- typizer/api/webhooks/delete_webhook_endpoint.py +217 -0
- typizer/api/webhooks/get_webhook_endpoint.py +217 -0
- typizer/api/webhooks/list_webhook_deliveries.py +264 -0
- typizer/api/webhooks/list_webhook_endpoints.py +235 -0
- typizer/api/webhooks/retry_webhook_delivery.py +254 -0
- typizer/api/webhooks/test_webhook_endpoint.py +254 -0
- typizer/api/webhooks/update_webhook_endpoint.py +252 -0
- typizer/client.py +268 -0
- typizer/errors.py +16 -0
- typizer/models/__init__.py +449 -0
- typizer/models/agent_message.py +103 -0
- typizer/models/agent_message_content.py +72 -0
- typizer/models/agent_message_object.py +8 -0
- typizer/models/agent_message_role.py +10 -0
- typizer/models/agent_thread.py +166 -0
- typizer/models/agent_thread_draft_schema_type_0.py +47 -0
- typizer/models/agent_thread_object.py +8 -0
- typizer/models/api_key.py +152 -0
- typizer/models/api_key_created_by.py +87 -0
- typizer/models/api_key_object.py +8 -0
- typizer/models/balance.py +103 -0
- typizer/models/balance_lot.py +97 -0
- typizer/models/balance_lot_source.py +11 -0
- typizer/models/balance_object.py +8 -0
- typizer/models/batch.py +146 -0
- typizer/models/batch_object.py +8 -0
- typizer/models/batch_status.py +9 -0
- typizer/models/billing_profile.py +184 -0
- typizer/models/billing_profile_autotopup.py +148 -0
- typizer/models/billing_profile_object.py +8 -0
- typizer/models/checkout.py +69 -0
- typizer/models/checkout_request.py +87 -0
- typizer/models/checkout_request_autotopup.py +81 -0
- typizer/models/checkout_request_package_code.py +12 -0
- typizer/models/company.py +139 -0
- typizer/models/company_list.py +107 -0
- typizer/models/company_list_object.py +8 -0
- typizer/models/company_object.py +8 -0
- typizer/models/company_status.py +12 -0
- typizer/models/company_type.py +9 -0
- typizer/models/consent_request.py +61 -0
- typizer/models/consent_request_kind.py +9 -0
- typizer/models/contract_request.py +211 -0
- typizer/models/contract_request_delivery_type_1.py +9 -0
- typizer/models/contract_request_delivery_type_2_type_1.py +9 -0
- typizer/models/contract_request_delivery_type_3_type_1.py +9 -0
- typizer/models/contract_request_edo_type_0.py +112 -0
- typizer/models/contract_request_list.py +107 -0
- typizer/models/contract_request_list_object.py +8 -0
- typizer/models/contract_request_object.py +8 -0
- typizer/models/contract_request_status.py +12 -0
- typizer/models/create_agent_message_request.py +54 -0
- typizer/models/create_agent_thread_request.py +51 -0
- typizer/models/create_api_key_request.py +85 -0
- typizer/models/create_batch_files_body.py +149 -0
- typizer/models/create_batch_files_body_format.py +11 -0
- typizer/models/create_batch_files_body_mode.py +9 -0
- typizer/models/create_batch_request.py +108 -0
- typizer/models/create_batch_request_format.py +11 -0
- typizer/models/create_batch_request_metadata.py +52 -0
- typizer/models/create_batch_request_mode.py +9 -0
- typizer/models/create_demo_run_files_body.py +107 -0
- typizer/models/create_demo_run_files_body_consent_pd.py +8 -0
- typizer/models/create_file_body.py +75 -0
- typizer/models/create_invoice_request.py +63 -0
- typizer/models/create_invoice_request_package_code.py +12 -0
- typizer/models/create_run_files_body.py +169 -0
- typizer/models/create_run_files_body_format.py +11 -0
- typizer/models/create_run_files_body_mode.py +9 -0
- typizer/models/create_run_request.py +120 -0
- typizer/models/create_run_request_format.py +11 -0
- typizer/models/create_run_request_metadata.py +53 -0
- typizer/models/create_run_request_mode.py +9 -0
- typizer/models/create_typizer_request.py +125 -0
- typizer/models/create_typizer_request_default_format.py +11 -0
- typizer/models/create_typizer_request_mode.py +9 -0
- typizer/models/create_typizer_request_schema.py +53 -0
- typizer/models/create_webhook_endpoint_request.py +62 -0
- typizer/models/created_api_key.py +163 -0
- typizer/models/deleted_api_key.py +79 -0
- typizer/models/deleted_api_key_object.py +8 -0
- typizer/models/deleted_file.py +79 -0
- typizer/models/deleted_file_object.py +8 -0
- typizer/models/deleted_typizer.py +79 -0
- typizer/models/deleted_typizer_object.py +8 -0
- typizer/models/deleted_webhook_endpoint.py +79 -0
- typizer/models/deleted_webhook_endpoint_object.py +8 -0
- typizer/models/demo_run.py +180 -0
- typizer/models/demo_run_error_type_0.py +69 -0
- typizer/models/demo_run_object.py +8 -0
- typizer/models/demo_run_pages.py +76 -0
- typizer/models/demo_run_request.py +52 -0
- typizer/models/demo_run_request_sample.py +10 -0
- typizer/models/demo_run_status.py +11 -0
- typizer/models/demo_sample.py +95 -0
- typizer/models/demo_sample_id.py +10 -0
- typizer/models/demo_sample_list.py +85 -0
- typizer/models/demo_sample_list_object.py +8 -0
- typizer/models/export_batch_format.py +10 -0
- typizer/models/extract_files_body.py +194 -0
- typizer/models/extract_files_body_format.py +11 -0
- typizer/models/extract_files_body_mode.py +9 -0
- typizer/models/extract_request.py +146 -0
- typizer/models/extract_request_format.py +11 -0
- typizer/models/extract_request_metadata.py +53 -0
- typizer/models/extract_request_mode.py +9 -0
- typizer/models/extract_request_schema.py +53 -0
- typizer/models/file.py +153 -0
- typizer/models/file_object.py +8 -0
- typizer/models/file_source.py +12 -0
- typizer/models/generate_typizer_request.py +51 -0
- typizer/models/get_open_api_document_response_200.py +45 -0
- typizer/models/get_run_output_format.py +11 -0
- typizer/models/get_usage_group_by.py +10 -0
- typizer/models/list_agent_threads_response_200.py +107 -0
- typizer/models/list_agent_threads_response_200_object.py +8 -0
- typizer/models/list_api_keys_response_200.py +107 -0
- typizer/models/list_api_keys_response_200_object.py +8 -0
- typizer/models/list_batches_response_200.py +107 -0
- typizer/models/list_batches_response_200_object.py +8 -0
- typizer/models/list_runs_response_200.py +107 -0
- typizer/models/list_runs_response_200_object.py +8 -0
- typizer/models/list_runs_source.py +12 -0
- typizer/models/list_runs_status.py +11 -0
- typizer/models/list_typizer_versions_response_200.py +107 -0
- typizer/models/list_typizer_versions_response_200_object.py +8 -0
- typizer/models/list_typizers_response_200.py +107 -0
- typizer/models/list_typizers_response_200_object.py +8 -0
- typizer/models/list_webhook_deliveries_response_200.py +107 -0
- typizer/models/list_webhook_deliveries_response_200_object.py +8 -0
- typizer/models/list_webhook_endpoints_response_200.py +107 -0
- typizer/models/list_webhook_endpoints_response_200_object.py +8 -0
- typizer/models/login_challenge.py +71 -0
- typizer/models/login_challenge_object.py +8 -0
- typizer/models/login_start_request.py +94 -0
- typizer/models/login_start_request_consents.py +74 -0
- typizer/models/login_start_request_consents_pd_processing.py +61 -0
- typizer/models/maintenance_event.py +139 -0
- typizer/models/maintenance_event_components_item.py +13 -0
- typizer/models/maintenance_event_kind.py +9 -0
- typizer/models/maintenance_event_object.py +8 -0
- typizer/models/maintenance_event_status.py +9 -0
- typizer/models/marketing_consent_state.py +102 -0
- typizer/models/me.py +226 -0
- typizer/models/me_api_key_type_0.py +88 -0
- typizer/models/me_auth.py +9 -0
- typizer/models/me_features.py +70 -0
- typizer/models/me_object.py +8 -0
- typizer/models/me_organization.py +69 -0
- typizer/models/me_organizations_item.py +79 -0
- typizer/models/me_organizations_item_role.py +10 -0
- typizer/models/me_role_type_1.py +10 -0
- typizer/models/me_role_type_2_type_1.py +10 -0
- typizer/models/me_role_type_3_type_1.py +10 -0
- typizer/models/me_user_type_0.py +86 -0
- typizer/models/my_consents.py +77 -0
- typizer/models/my_consents_object.py +8 -0
- typizer/models/organization.py +93 -0
- typizer/models/organization_object.py +8 -0
- typizer/models/organization_settings.py +74 -0
- typizer/models/organization_settings_file_retention.py +11 -0
- typizer/models/organization_settings_output_retention.py +10 -0
- typizer/models/payment.py +231 -0
- typizer/models/payment_act_type_0.py +136 -0
- typizer/models/payment_act_type_0_edo_type_0.py +112 -0
- typizer/models/payment_invoice_type_0.py +121 -0
- typizer/models/payment_invoice_type_0_status.py +11 -0
- typizer/models/payment_list.py +107 -0
- typizer/models/payment_list_object.py +8 -0
- typizer/models/payment_method.py +10 -0
- typizer/models/payment_object.py +8 -0
- typizer/models/payment_status.py +15 -0
- typizer/models/problem.py +158 -0
- typizer/models/problem_code.py +26 -0
- typizer/models/run.py +318 -0
- typizer/models/run_error_type_0.py +69 -0
- typizer/models/run_fields_type_0.py +45 -0
- typizer/models/run_file_type_0.py +69 -0
- typizer/models/run_format.py +11 -0
- typizer/models/run_metadata.py +45 -0
- typizer/models/run_mode.py +9 -0
- typizer/models/run_object.py +8 -0
- typizer/models/run_pages.py +82 -0
- typizer/models/run_source.py +12 -0
- typizer/models/run_status.py +11 -0
- typizer/models/save_agent_thread_request.py +63 -0
- typizer/models/save_agent_thread_response_200.py +47 -0
- typizer/models/save_agent_thread_response_201.py +47 -0
- typizer/models/scope.py +12 -0
- typizer/models/sign_in.py +94 -0
- typizer/models/sign_in_list.py +108 -0
- typizer/models/sign_in_list_object.py +8 -0
- typizer/models/sign_in_object.py +8 -0
- typizer/models/status.py +85 -0
- typizer/models/status_object.py +8 -0
- typizer/models/typizer.py +158 -0
- typizer/models/typizer_default_format.py +11 -0
- typizer/models/typizer_draft.py +97 -0
- typizer/models/typizer_draft_object.py +8 -0
- typizer/models/typizer_draft_schema.py +53 -0
- typizer/models/typizer_mode.py +9 -0
- typizer/models/typizer_object.py +8 -0
- typizer/models/typizer_schema.py +47 -0
- typizer/models/typizer_version.py +118 -0
- typizer/models/typizer_version_object.py +8 -0
- typizer/models/typizer_version_schema.py +45 -0
- typizer/models/update_agent_thread_request.py +80 -0
- typizer/models/update_agent_thread_request_draft_schema.py +53 -0
- typizer/models/update_autotopup_request.py +111 -0
- typizer/models/update_autotopup_request_consent.py +62 -0
- typizer/models/update_autotopup_request_package_code.py +12 -0
- typizer/models/update_billing_profile_request.py +127 -0
- typizer/models/update_organization_request.py +69 -0
- typizer/models/update_organization_request_file_retention.py +11 -0
- typizer/models/update_organization_request_output_retention.py +10 -0
- typizer/models/update_typizer_request.py +131 -0
- typizer/models/update_typizer_request_default_format.py +11 -0
- typizer/models/update_typizer_request_mode.py +9 -0
- typizer/models/update_typizer_request_schema.py +53 -0
- typizer/models/update_webhook_endpoint_request.py +83 -0
- typizer/models/update_webhook_endpoint_request_status.py +9 -0
- typizer/models/usage.py +119 -0
- typizer/models/usage_group_by.py +10 -0
- typizer/models/usage_object.py +8 -0
- typizer/models/usage_row.py +102 -0
- typizer/models/webhook_delivery.py +154 -0
- typizer/models/webhook_delivery_object.py +8 -0
- typizer/models/webhook_delivery_status.py +10 -0
- typizer/models/webhook_endpoint.py +156 -0
- typizer/models/webhook_endpoint_object.py +8 -0
- typizer/models/webhook_endpoint_status.py +9 -0
- typizer/models/webhook_event_type.py +11 -0
- typizer/py.typed +1 -0
- typizer/types.py +54 -0
- typizer-0.1.0.dist-info/METADATA +280 -0
- typizer-0.1.0.dist-info/RECORD +318 -0
- typizer-0.1.0.dist-info/WHEEL +4 -0
- typizer-0.1.0.dist-info/licenses/LICENSE +21 -0
typizer/models/batch.py
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from ..models.batch_object import BatchObject
|
|
11
|
+
from ..models.batch_status import BatchStatus
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="Batch")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class Batch:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
id (str): Example: batch_….
|
|
21
|
+
object_ (BatchObject):
|
|
22
|
+
typizer_id (str):
|
|
23
|
+
status (BatchStatus):
|
|
24
|
+
total (int):
|
|
25
|
+
succeeded (int):
|
|
26
|
+
failed (int):
|
|
27
|
+
created_at (datetime.datetime):
|
|
28
|
+
completed_at (datetime.datetime | None):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: str
|
|
32
|
+
object_: BatchObject
|
|
33
|
+
typizer_id: str
|
|
34
|
+
status: BatchStatus
|
|
35
|
+
total: int
|
|
36
|
+
succeeded: int
|
|
37
|
+
failed: int
|
|
38
|
+
created_at: datetime.datetime
|
|
39
|
+
completed_at: datetime.datetime | None
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
id = self.id
|
|
44
|
+
|
|
45
|
+
object_ = self.object_.value
|
|
46
|
+
|
|
47
|
+
typizer_id = self.typizer_id
|
|
48
|
+
|
|
49
|
+
status = self.status.value
|
|
50
|
+
|
|
51
|
+
total = self.total
|
|
52
|
+
|
|
53
|
+
succeeded = self.succeeded
|
|
54
|
+
|
|
55
|
+
failed = self.failed
|
|
56
|
+
|
|
57
|
+
created_at = self.created_at.isoformat()
|
|
58
|
+
|
|
59
|
+
completed_at: None | str
|
|
60
|
+
if isinstance(self.completed_at, datetime.datetime):
|
|
61
|
+
completed_at = self.completed_at.isoformat()
|
|
62
|
+
else:
|
|
63
|
+
completed_at = self.completed_at
|
|
64
|
+
|
|
65
|
+
field_dict: dict[str, Any] = {}
|
|
66
|
+
field_dict.update(self.additional_properties)
|
|
67
|
+
field_dict.update(
|
|
68
|
+
{
|
|
69
|
+
"id": id,
|
|
70
|
+
"object": object_,
|
|
71
|
+
"typizer_id": typizer_id,
|
|
72
|
+
"status": status,
|
|
73
|
+
"total": total,
|
|
74
|
+
"succeeded": succeeded,
|
|
75
|
+
"failed": failed,
|
|
76
|
+
"created_at": created_at,
|
|
77
|
+
"completed_at": completed_at,
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return field_dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
85
|
+
d = dict(src_dict)
|
|
86
|
+
id = d.pop("id")
|
|
87
|
+
|
|
88
|
+
object_ = BatchObject(d.pop("object"))
|
|
89
|
+
|
|
90
|
+
typizer_id = d.pop("typizer_id")
|
|
91
|
+
|
|
92
|
+
status = BatchStatus(d.pop("status"))
|
|
93
|
+
|
|
94
|
+
total = d.pop("total")
|
|
95
|
+
|
|
96
|
+
succeeded = d.pop("succeeded")
|
|
97
|
+
|
|
98
|
+
failed = d.pop("failed")
|
|
99
|
+
|
|
100
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
101
|
+
|
|
102
|
+
def _parse_completed_at(data: object) -> datetime.datetime | None:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
try:
|
|
106
|
+
if not isinstance(data, str):
|
|
107
|
+
raise TypeError()
|
|
108
|
+
completed_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
109
|
+
|
|
110
|
+
return completed_at_type_0
|
|
111
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
112
|
+
pass
|
|
113
|
+
return cast(datetime.datetime | None, data)
|
|
114
|
+
|
|
115
|
+
completed_at = _parse_completed_at(d.pop("completed_at"))
|
|
116
|
+
|
|
117
|
+
batch = cls(
|
|
118
|
+
id=id,
|
|
119
|
+
object_=object_,
|
|
120
|
+
typizer_id=typizer_id,
|
|
121
|
+
status=status,
|
|
122
|
+
total=total,
|
|
123
|
+
succeeded=succeeded,
|
|
124
|
+
failed=failed,
|
|
125
|
+
created_at=created_at,
|
|
126
|
+
completed_at=completed_at,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
batch.additional_properties = d
|
|
130
|
+
return batch
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def additional_keys(self) -> list[str]:
|
|
134
|
+
return list(self.additional_properties.keys())
|
|
135
|
+
|
|
136
|
+
def __getitem__(self, key: str) -> Any:
|
|
137
|
+
return self.additional_properties[key]
|
|
138
|
+
|
|
139
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
140
|
+
self.additional_properties[key] = value
|
|
141
|
+
|
|
142
|
+
def __delitem__(self, key: str) -> None:
|
|
143
|
+
del self.additional_properties[key]
|
|
144
|
+
|
|
145
|
+
def __contains__(self, key: str) -> bool:
|
|
146
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.billing_profile_object import BillingProfileObject
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.billing_profile_autotopup import BillingProfileAutotopup
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="BillingProfile")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class BillingProfile:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
object_ (BillingProfileObject):
|
|
23
|
+
inn (None | str):
|
|
24
|
+
kpp (None | str):
|
|
25
|
+
ogrn (None | str):
|
|
26
|
+
legal_name (None | str):
|
|
27
|
+
address (None | str):
|
|
28
|
+
docs_email (None | str):
|
|
29
|
+
company_status (None | str): Статус в реестре на момент последнего сохранения (`ACTIVE`, `LIQUIDATED`, …), если
|
|
30
|
+
известен
|
|
31
|
+
autotopup (BillingProfileAutotopup):
|
|
32
|
+
inn_bonus_granted (bool): GET: организация получила бонус за ИНН. PUT: бонус начислен этим запросом.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
object_: BillingProfileObject
|
|
36
|
+
inn: None | str
|
|
37
|
+
kpp: None | str
|
|
38
|
+
ogrn: None | str
|
|
39
|
+
legal_name: None | str
|
|
40
|
+
address: None | str
|
|
41
|
+
docs_email: None | str
|
|
42
|
+
company_status: None | str
|
|
43
|
+
autotopup: BillingProfileAutotopup
|
|
44
|
+
inn_bonus_granted: bool
|
|
45
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
object_ = self.object_.value
|
|
49
|
+
|
|
50
|
+
inn: None | str
|
|
51
|
+
inn = self.inn
|
|
52
|
+
|
|
53
|
+
kpp: None | str
|
|
54
|
+
kpp = self.kpp
|
|
55
|
+
|
|
56
|
+
ogrn: None | str
|
|
57
|
+
ogrn = self.ogrn
|
|
58
|
+
|
|
59
|
+
legal_name: None | str
|
|
60
|
+
legal_name = self.legal_name
|
|
61
|
+
|
|
62
|
+
address: None | str
|
|
63
|
+
address = self.address
|
|
64
|
+
|
|
65
|
+
docs_email: None | str
|
|
66
|
+
docs_email = self.docs_email
|
|
67
|
+
|
|
68
|
+
company_status: None | str
|
|
69
|
+
company_status = self.company_status
|
|
70
|
+
|
|
71
|
+
autotopup = self.autotopup.to_dict()
|
|
72
|
+
|
|
73
|
+
inn_bonus_granted = self.inn_bonus_granted
|
|
74
|
+
|
|
75
|
+
field_dict: dict[str, Any] = {}
|
|
76
|
+
field_dict.update(self.additional_properties)
|
|
77
|
+
field_dict.update(
|
|
78
|
+
{
|
|
79
|
+
"object": object_,
|
|
80
|
+
"inn": inn,
|
|
81
|
+
"kpp": kpp,
|
|
82
|
+
"ogrn": ogrn,
|
|
83
|
+
"legal_name": legal_name,
|
|
84
|
+
"address": address,
|
|
85
|
+
"docs_email": docs_email,
|
|
86
|
+
"company_status": company_status,
|
|
87
|
+
"autotopup": autotopup,
|
|
88
|
+
"inn_bonus_granted": inn_bonus_granted,
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return field_dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
96
|
+
from ..models.billing_profile_autotopup import BillingProfileAutotopup # noqa: PLC0415
|
|
97
|
+
|
|
98
|
+
d = dict(src_dict)
|
|
99
|
+
object_ = BillingProfileObject(d.pop("object"))
|
|
100
|
+
|
|
101
|
+
def _parse_inn(data: object) -> None | str:
|
|
102
|
+
if data is None:
|
|
103
|
+
return data
|
|
104
|
+
return cast(None | str, data)
|
|
105
|
+
|
|
106
|
+
inn = _parse_inn(d.pop("inn"))
|
|
107
|
+
|
|
108
|
+
def _parse_kpp(data: object) -> None | str:
|
|
109
|
+
if data is None:
|
|
110
|
+
return data
|
|
111
|
+
return cast(None | str, data)
|
|
112
|
+
|
|
113
|
+
kpp = _parse_kpp(d.pop("kpp"))
|
|
114
|
+
|
|
115
|
+
def _parse_ogrn(data: object) -> None | str:
|
|
116
|
+
if data is None:
|
|
117
|
+
return data
|
|
118
|
+
return cast(None | str, data)
|
|
119
|
+
|
|
120
|
+
ogrn = _parse_ogrn(d.pop("ogrn"))
|
|
121
|
+
|
|
122
|
+
def _parse_legal_name(data: object) -> None | str:
|
|
123
|
+
if data is None:
|
|
124
|
+
return data
|
|
125
|
+
return cast(None | str, data)
|
|
126
|
+
|
|
127
|
+
legal_name = _parse_legal_name(d.pop("legal_name"))
|
|
128
|
+
|
|
129
|
+
def _parse_address(data: object) -> None | str:
|
|
130
|
+
if data is None:
|
|
131
|
+
return data
|
|
132
|
+
return cast(None | str, data)
|
|
133
|
+
|
|
134
|
+
address = _parse_address(d.pop("address"))
|
|
135
|
+
|
|
136
|
+
def _parse_docs_email(data: object) -> None | str:
|
|
137
|
+
if data is None:
|
|
138
|
+
return data
|
|
139
|
+
return cast(None | str, data)
|
|
140
|
+
|
|
141
|
+
docs_email = _parse_docs_email(d.pop("docs_email"))
|
|
142
|
+
|
|
143
|
+
def _parse_company_status(data: object) -> None | str:
|
|
144
|
+
if data is None:
|
|
145
|
+
return data
|
|
146
|
+
return cast(None | str, data)
|
|
147
|
+
|
|
148
|
+
company_status = _parse_company_status(d.pop("company_status"))
|
|
149
|
+
|
|
150
|
+
autotopup = BillingProfileAutotopup.from_dict(d.pop("autotopup"))
|
|
151
|
+
|
|
152
|
+
inn_bonus_granted = d.pop("inn_bonus_granted")
|
|
153
|
+
|
|
154
|
+
billing_profile = cls(
|
|
155
|
+
object_=object_,
|
|
156
|
+
inn=inn,
|
|
157
|
+
kpp=kpp,
|
|
158
|
+
ogrn=ogrn,
|
|
159
|
+
legal_name=legal_name,
|
|
160
|
+
address=address,
|
|
161
|
+
docs_email=docs_email,
|
|
162
|
+
company_status=company_status,
|
|
163
|
+
autotopup=autotopup,
|
|
164
|
+
inn_bonus_granted=inn_bonus_granted,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
billing_profile.additional_properties = d
|
|
168
|
+
return billing_profile
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def additional_keys(self) -> list[str]:
|
|
172
|
+
return list(self.additional_properties.keys())
|
|
173
|
+
|
|
174
|
+
def __getitem__(self, key: str) -> Any:
|
|
175
|
+
return self.additional_properties[key]
|
|
176
|
+
|
|
177
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
178
|
+
self.additional_properties[key] = value
|
|
179
|
+
|
|
180
|
+
def __delitem__(self, key: str) -> None:
|
|
181
|
+
del self.additional_properties[key]
|
|
182
|
+
|
|
183
|
+
def __contains__(self, key: str) -> bool:
|
|
184
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="BillingProfileAutotopup")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class BillingProfileAutotopup:
|
|
15
|
+
"""
|
|
16
|
+
Attributes:
|
|
17
|
+
enabled (bool):
|
|
18
|
+
package_code (None | str):
|
|
19
|
+
threshold_pages (int | None):
|
|
20
|
+
has_saved_card (bool):
|
|
21
|
+
notice_at (datetime.datetime | None):
|
|
22
|
+
consent_at (datetime.datetime | None):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
enabled: bool
|
|
26
|
+
package_code: None | str
|
|
27
|
+
threshold_pages: int | None
|
|
28
|
+
has_saved_card: bool
|
|
29
|
+
notice_at: datetime.datetime | None
|
|
30
|
+
consent_at: datetime.datetime | None
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
enabled = self.enabled
|
|
35
|
+
|
|
36
|
+
package_code: None | str
|
|
37
|
+
package_code = self.package_code
|
|
38
|
+
|
|
39
|
+
threshold_pages: int | None
|
|
40
|
+
threshold_pages = self.threshold_pages
|
|
41
|
+
|
|
42
|
+
has_saved_card = self.has_saved_card
|
|
43
|
+
|
|
44
|
+
notice_at: None | str
|
|
45
|
+
if isinstance(self.notice_at, datetime.datetime):
|
|
46
|
+
notice_at = self.notice_at.isoformat()
|
|
47
|
+
else:
|
|
48
|
+
notice_at = self.notice_at
|
|
49
|
+
|
|
50
|
+
consent_at: None | str
|
|
51
|
+
if isinstance(self.consent_at, datetime.datetime):
|
|
52
|
+
consent_at = self.consent_at.isoformat()
|
|
53
|
+
else:
|
|
54
|
+
consent_at = self.consent_at
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update(
|
|
59
|
+
{
|
|
60
|
+
"enabled": enabled,
|
|
61
|
+
"package_code": package_code,
|
|
62
|
+
"threshold_pages": threshold_pages,
|
|
63
|
+
"has_saved_card": has_saved_card,
|
|
64
|
+
"notice_at": notice_at,
|
|
65
|
+
"consent_at": consent_at,
|
|
66
|
+
}
|
|
67
|
+
)
|
|
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
|
+
enabled = d.pop("enabled")
|
|
75
|
+
|
|
76
|
+
def _parse_package_code(data: object) -> None | str:
|
|
77
|
+
if data is None:
|
|
78
|
+
return data
|
|
79
|
+
return cast(None | str, data)
|
|
80
|
+
|
|
81
|
+
package_code = _parse_package_code(d.pop("package_code"))
|
|
82
|
+
|
|
83
|
+
def _parse_threshold_pages(data: object) -> int | None:
|
|
84
|
+
if data is None:
|
|
85
|
+
return data
|
|
86
|
+
return cast(int | None, data)
|
|
87
|
+
|
|
88
|
+
threshold_pages = _parse_threshold_pages(d.pop("threshold_pages"))
|
|
89
|
+
|
|
90
|
+
has_saved_card = d.pop("has_saved_card")
|
|
91
|
+
|
|
92
|
+
def _parse_notice_at(data: object) -> datetime.datetime | None:
|
|
93
|
+
if data is None:
|
|
94
|
+
return data
|
|
95
|
+
try:
|
|
96
|
+
if not isinstance(data, str):
|
|
97
|
+
raise TypeError()
|
|
98
|
+
notice_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
99
|
+
|
|
100
|
+
return notice_at_type_0
|
|
101
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
102
|
+
pass
|
|
103
|
+
return cast(datetime.datetime | None, data)
|
|
104
|
+
|
|
105
|
+
notice_at = _parse_notice_at(d.pop("notice_at"))
|
|
106
|
+
|
|
107
|
+
def _parse_consent_at(data: object) -> datetime.datetime | None:
|
|
108
|
+
if data is None:
|
|
109
|
+
return data
|
|
110
|
+
try:
|
|
111
|
+
if not isinstance(data, str):
|
|
112
|
+
raise TypeError()
|
|
113
|
+
consent_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
114
|
+
|
|
115
|
+
return consent_at_type_0
|
|
116
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
117
|
+
pass
|
|
118
|
+
return cast(datetime.datetime | None, data)
|
|
119
|
+
|
|
120
|
+
consent_at = _parse_consent_at(d.pop("consent_at"))
|
|
121
|
+
|
|
122
|
+
billing_profile_autotopup = cls(
|
|
123
|
+
enabled=enabled,
|
|
124
|
+
package_code=package_code,
|
|
125
|
+
threshold_pages=threshold_pages,
|
|
126
|
+
has_saved_card=has_saved_card,
|
|
127
|
+
notice_at=notice_at,
|
|
128
|
+
consent_at=consent_at,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
billing_profile_autotopup.additional_properties = d
|
|
132
|
+
return billing_profile_autotopup
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def additional_keys(self) -> list[str]:
|
|
136
|
+
return list(self.additional_properties.keys())
|
|
137
|
+
|
|
138
|
+
def __getitem__(self, key: str) -> Any:
|
|
139
|
+
return self.additional_properties[key]
|
|
140
|
+
|
|
141
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
142
|
+
self.additional_properties[key] = value
|
|
143
|
+
|
|
144
|
+
def __delitem__(self, key: str) -> None:
|
|
145
|
+
del self.additional_properties[key]
|
|
146
|
+
|
|
147
|
+
def __contains__(self, key: str) -> bool:
|
|
148
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="Checkout")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class Checkout:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
payment_id (str): Example: pay_….
|
|
17
|
+
payment_url (str): Платёжная форма банка; перенаправьте туда пользователя
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
payment_id: str
|
|
21
|
+
payment_url: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
payment_id = self.payment_id
|
|
26
|
+
|
|
27
|
+
payment_url = self.payment_url
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"payment_id": payment_id,
|
|
34
|
+
"payment_url": payment_url,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
payment_id = d.pop("payment_id")
|
|
44
|
+
|
|
45
|
+
payment_url = d.pop("payment_url")
|
|
46
|
+
|
|
47
|
+
checkout = cls(
|
|
48
|
+
payment_id=payment_id,
|
|
49
|
+
payment_url=payment_url,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
checkout.additional_properties = d
|
|
53
|
+
return checkout
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.checkout_request_package_code import CheckoutRequestPackageCode
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.checkout_request_autotopup import CheckoutRequestAutotopup
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="CheckoutRequest")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class CheckoutRequest:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
package_code (CheckoutRequestPackageCode): Example: start.
|
|
24
|
+
autotopup (CheckoutRequestAutotopup | Unset): Включить автопополнение этим платежом: карта (или T-Pay)
|
|
25
|
+
сохраняется для повторных списаний за тот же пакет
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
package_code: CheckoutRequestPackageCode
|
|
29
|
+
autotopup: CheckoutRequestAutotopup | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
package_code = self.package_code.value
|
|
34
|
+
|
|
35
|
+
autotopup: dict[str, Any] | Unset = UNSET
|
|
36
|
+
if not isinstance(self.autotopup, Unset):
|
|
37
|
+
autotopup = self.autotopup.to_dict()
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"package_code": package_code,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
if autotopup is not UNSET:
|
|
47
|
+
field_dict["autotopup"] = autotopup
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
from ..models.checkout_request_autotopup import CheckoutRequestAutotopup # noqa: PLC0415
|
|
54
|
+
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
package_code = CheckoutRequestPackageCode(d.pop("package_code"))
|
|
57
|
+
|
|
58
|
+
_autotopup = d.pop("autotopup", UNSET)
|
|
59
|
+
autotopup: CheckoutRequestAutotopup | Unset
|
|
60
|
+
if isinstance(_autotopup, Unset):
|
|
61
|
+
autotopup = UNSET
|
|
62
|
+
else:
|
|
63
|
+
autotopup = CheckoutRequestAutotopup.from_dict(_autotopup)
|
|
64
|
+
|
|
65
|
+
checkout_request = cls(
|
|
66
|
+
package_code=package_code,
|
|
67
|
+
autotopup=autotopup,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
checkout_request.additional_properties = d
|
|
71
|
+
return checkout_request
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def additional_keys(self) -> list[str]:
|
|
75
|
+
return list(self.additional_properties.keys())
|
|
76
|
+
|
|
77
|
+
def __getitem__(self, key: str) -> Any:
|
|
78
|
+
return self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
81
|
+
self.additional_properties[key] = value
|
|
82
|
+
|
|
83
|
+
def __delitem__(self, key: str) -> None:
|
|
84
|
+
del self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __contains__(self, key: str) -> bool:
|
|
87
|
+
return key in self.additional_properties
|