waldur-api-client 7.8.1__py3-none-any.whl → 7.8.2__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 waldur-api-client might be problematic. Click here for more details.
- waldur_api_client/api/booking_resources/booking_resources_count.py +10 -13
- waldur_api_client/api/booking_resources/booking_resources_list.py +10 -13
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_create.py +44 -7
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_partial_update.py +46 -7
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_update.py +44 -7
- waldur_api_client/api/checklists_admin/checklists_admin_checklist_questions.py +49 -0
- waldur_api_client/api/checklists_admin/checklists_admin_count.py +43 -0
- waldur_api_client/api/checklists_admin/checklists_admin_list.py +43 -0
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_create.py +44 -7
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_partial_update.py +44 -7
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_update.py +44 -7
- waldur_api_client/api/customers/customers_create.py +44 -7
- waldur_api_client/api/customers/customers_partial_update.py +44 -7
- waldur_api_client/api/customers/customers_update.py +44 -7
- waldur_api_client/api/external_links/external_links_create.py +44 -7
- waldur_api_client/api/external_links/external_links_partial_update.py +44 -7
- waldur_api_client/api/external_links/external_links_update.py +44 -7
- waldur_api_client/api/invoices/invoices_paid.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_create.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_partial_update.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_update.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_create.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_partial_update.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_update.py +44 -7
- waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_create.py +44 -7
- waldur_api_client/api/marketplace_orders/marketplace_orders_update_attachment.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_create.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_image.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_thumbnail.py +30 -5
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +10 -13
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +10 -13
- waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +10 -13
- waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +10 -13
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_create.py +44 -7
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_update.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_create.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_partial_update.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_update.py +44 -7
- waldur_api_client/api/override_settings/override_settings.py +30 -5
- waldur_api_client/api/payments/payments_create.py +44 -7
- waldur_api_client/api/payments/payments_partial_update.py +44 -7
- waldur_api_client/api/payments/payments_update.py +44 -7
- waldur_api_client/api/projects/projects_create.py +44 -7
- waldur_api_client/api/projects/projects_partial_update.py +44 -7
- waldur_api_client/api/projects/projects_update.py +44 -7
- waldur_api_client/api/proposal_proposals/proposal_proposals_attach_document.py +30 -5
- waldur_api_client/api/slurm_jobs/slurm_jobs_create.py +44 -7
- waldur_api_client/api/slurm_jobs/slurm_jobs_update.py +44 -7
- waldur_api_client/api/support_attachments/support_attachments_create.py +44 -7
- waldur_api_client/api/user_group_invitations/user_group_invitations_count.py +15 -0
- waldur_api_client/api/user_group_invitations/user_group_invitations_list.py +15 -0
- waldur_api_client/api/users/users_create.py +44 -7
- waldur_api_client/api/users/users_partial_update.py +44 -7
- waldur_api_client/api/users/users_update.py +44 -7
- waldur_api_client/models/__init__.py +146 -2
- waldur_api_client/models/agent_type_enum.py +13 -0
- waldur_api_client/models/attachment_request_form.py +70 -0
- waldur_api_client/models/attachment_request_multipart.py +83 -0
- waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/call_managing_organisation_request_form.py +103 -0
- waldur_api_client/models/call_managing_organisation_request_multipart.py +122 -0
- waldur_api_client/models/call_round.py +11 -1
- waldur_api_client/models/category_group_request_form.py +103 -0
- waldur_api_client/models/category_group_request_multipart.py +122 -0
- waldur_api_client/models/checklist_category_request_form.py +103 -0
- waldur_api_client/models/checklist_category_request_multipart.py +122 -0
- waldur_api_client/models/checklists_admin_checklist_questions_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_checklist_questions_checklist_type_in_item.py +11 -0
- waldur_api_client/models/checklists_admin_count_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_count_checklist_type_in_item.py +11 -0
- waldur_api_client/models/checklists_admin_list_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_list_checklist_type_in_item.py +11 -0
- waldur_api_client/models/constance_settings.py +9 -0
- waldur_api_client/models/constance_settings_request.py +9 -0
- waldur_api_client/models/constance_settings_request_form.py +1547 -0
- waldur_api_client/models/constance_settings_request_multipart.py +2173 -0
- waldur_api_client/models/customer.py +9 -0
- waldur_api_client/models/customer_request.py +9 -0
- waldur_api_client/models/customer_request_form.py +312 -0
- waldur_api_client/models/customer_request_multipart.py +394 -0
- waldur_api_client/models/customers_list_field_item.py +1 -0
- waldur_api_client/models/customers_retrieve_field_item.py +1 -0
- waldur_api_client/models/external_link_request_form.py +111 -0
- waldur_api_client/models/external_link_request_multipart.py +132 -0
- waldur_api_client/models/firecrest_job_request_form.py +104 -0
- waldur_api_client/models/firecrest_job_request_multipart.py +127 -0
- waldur_api_client/models/integration_status.py +21 -4
- waldur_api_client/models/marketplace_category_request_form.py +153 -0
- waldur_api_client/models/marketplace_category_request_multipart.py +187 -0
- waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_service_providers_offerings_list_field_item.py +1 -0
- waldur_api_client/models/nested_round.py +9 -0
- waldur_api_client/models/nested_round_request.py +9 -0
- waldur_api_client/models/offering.py +20 -0
- waldur_api_client/models/offering_create.py +20 -0
- waldur_api_client/models/offering_create_request.py +20 -0
- waldur_api_client/models/offering_create_request_form.py +479 -0
- waldur_api_client/models/offering_create_request_form_limits.py +57 -0
- waldur_api_client/models/offering_create_request_multipart.py +599 -0
- waldur_api_client/models/offering_create_request_multipart_limits.py +57 -0
- waldur_api_client/models/offering_file_request_form.py +78 -0
- waldur_api_client/models/offering_file_request_multipart.py +93 -0
- waldur_api_client/models/offering_image_request_form.py +62 -0
- waldur_api_client/models/offering_image_request_multipart.py +73 -0
- waldur_api_client/models/offering_thumbnail_request_form.py +62 -0
- waldur_api_client/models/offering_thumbnail_request_multipart.py +73 -0
- waldur_api_client/models/offering_user.py +5 -5
- waldur_api_client/models/{offering_user_state_enum.py → offering_user_state.py} +1 -1
- waldur_api_client/models/order_attachment_request_form.py +84 -0
- waldur_api_client/models/order_attachment_request_multipart.py +98 -0
- waldur_api_client/models/paid_request_form.py +81 -0
- waldur_api_client/models/paid_request_multipart.py +94 -0
- waldur_api_client/models/patched_call_managing_organisation_request_form.py +92 -0
- waldur_api_client/models/patched_call_managing_organisation_request_multipart.py +109 -0
- waldur_api_client/models/patched_category_group_request_form.py +101 -0
- waldur_api_client/models/patched_category_group_request_multipart.py +121 -0
- waldur_api_client/models/patched_checklist_category_request_form.py +102 -0
- waldur_api_client/models/patched_checklist_category_request_multipart.py +122 -0
- waldur_api_client/models/patched_customer_request.py +9 -0
- waldur_api_client/models/patched_customer_request_form.py +310 -0
- waldur_api_client/models/patched_customer_request_multipart.py +393 -0
- waldur_api_client/models/patched_external_link_request_form.py +110 -0
- waldur_api_client/models/patched_external_link_request_multipart.py +133 -0
- waldur_api_client/models/patched_marketplace_category_request_form.py +151 -0
- waldur_api_client/models/patched_marketplace_category_request_multipart.py +186 -0
- waldur_api_client/models/patched_payment_request_form.py +119 -0
- waldur_api_client/models/patched_payment_request_multipart.py +142 -0
- waldur_api_client/models/patched_project_request_form.py +279 -0
- waldur_api_client/models/patched_project_request_multipart.py +342 -0
- waldur_api_client/models/patched_service_provider_request_form.py +101 -0
- waldur_api_client/models/patched_service_provider_request_multipart.py +121 -0
- waldur_api_client/models/patched_user_request_form.py +241 -0
- waldur_api_client/models/patched_user_request_multipart.py +306 -0
- waldur_api_client/models/payment_request_form.py +113 -0
- waldur_api_client/models/payment_request_multipart.py +134 -0
- waldur_api_client/models/project_request_form.py +280 -0
- waldur_api_client/models/project_request_multipart.py +341 -0
- waldur_api_client/models/project_user.py +9 -0
- waldur_api_client/models/proposal.py +8 -0
- waldur_api_client/models/proposal_documentation_request_form.py +84 -0
- waldur_api_client/models/proposal_documentation_request_multipart.py +98 -0
- waldur_api_client/models/proposal_proposals_count_o_item.py +3 -1
- waldur_api_client/models/proposal_proposals_list_o_item.py +3 -1
- waldur_api_client/models/proposal_review.py +40 -0
- waldur_api_client/models/protected_proposal_list.py +8 -0
- waldur_api_client/models/protected_proposal_list_request.py +8 -0
- waldur_api_client/models/protected_round.py +8 -0
- waldur_api_client/models/provider_offering.py +21 -1
- waldur_api_client/models/provider_offering_details.py +20 -0
- waldur_api_client/models/public_offering_details.py +20 -0
- waldur_api_client/models/screenshot_request_form.py +87 -0
- waldur_api_client/models/screenshot_request_multipart.py +105 -0
- waldur_api_client/models/service_provider_request_form.py +112 -0
- waldur_api_client/models/service_provider_request_multipart.py +134 -0
- waldur_api_client/models/user_request_form.py +250 -0
- waldur_api_client/models/user_request_multipart.py +316 -0
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/METADATA +1 -1
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/RECORD +169 -98
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/WHEEL +0 -0
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..models.blank_enum import BlankEnum
|
|
10
|
+
from ..models.country_enum import CountryEnum
|
|
11
|
+
from ..types import UNSET, File, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PatchedCustomerRequestMultipart")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PatchedCustomerRequestMultipart:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
backend_id (Union[Unset, str]): Organization identifier in another application.
|
|
21
|
+
image (Union[File, None, Unset]):
|
|
22
|
+
name (Union[Unset, str]):
|
|
23
|
+
slug (Union[Unset, str]):
|
|
24
|
+
native_name (Union[Unset, str]):
|
|
25
|
+
abbreviation (Union[Unset, str]):
|
|
26
|
+
description (Union[Unset, str]):
|
|
27
|
+
contact_details (Union[Unset, str]):
|
|
28
|
+
email (Union[Unset, str]):
|
|
29
|
+
phone_number (Union[Unset, str]):
|
|
30
|
+
registration_code (Union[Unset, str]):
|
|
31
|
+
homepage (Union[Unset, str]):
|
|
32
|
+
vat_code (Union[Unset, str]): VAT number
|
|
33
|
+
postal (Union[Unset, str]):
|
|
34
|
+
address (Union[Unset, str]):
|
|
35
|
+
bank_name (Union[Unset, str]):
|
|
36
|
+
latitude (Union[None, Unset, float]):
|
|
37
|
+
longitude (Union[None, Unset, float]):
|
|
38
|
+
bank_account (Union[Unset, str]):
|
|
39
|
+
country (Union[BlankEnum, CountryEnum, Unset]):
|
|
40
|
+
notification_emails (Union[Unset, str]): Comma-separated list of notification email addresses
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
backend_id: Union[Unset, str] = UNSET
|
|
44
|
+
image: Union[File, None, Unset] = UNSET
|
|
45
|
+
name: Union[Unset, str] = UNSET
|
|
46
|
+
slug: Union[Unset, str] = UNSET
|
|
47
|
+
native_name: Union[Unset, str] = UNSET
|
|
48
|
+
abbreviation: Union[Unset, str] = UNSET
|
|
49
|
+
description: Union[Unset, str] = UNSET
|
|
50
|
+
contact_details: Union[Unset, str] = UNSET
|
|
51
|
+
email: Union[Unset, str] = UNSET
|
|
52
|
+
phone_number: Union[Unset, str] = UNSET
|
|
53
|
+
registration_code: Union[Unset, str] = UNSET
|
|
54
|
+
homepage: Union[Unset, str] = UNSET
|
|
55
|
+
vat_code: Union[Unset, str] = UNSET
|
|
56
|
+
postal: Union[Unset, str] = UNSET
|
|
57
|
+
address: Union[Unset, str] = UNSET
|
|
58
|
+
bank_name: Union[Unset, str] = UNSET
|
|
59
|
+
latitude: Union[None, Unset, float] = UNSET
|
|
60
|
+
longitude: Union[None, Unset, float] = UNSET
|
|
61
|
+
bank_account: Union[Unset, str] = UNSET
|
|
62
|
+
country: Union[BlankEnum, CountryEnum, Unset] = UNSET
|
|
63
|
+
notification_emails: Union[Unset, str] = UNSET
|
|
64
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> dict[str, Any]:
|
|
67
|
+
backend_id = self.backend_id
|
|
68
|
+
|
|
69
|
+
image: Union[None, Unset, types.FileTypes]
|
|
70
|
+
if isinstance(self.image, Unset):
|
|
71
|
+
image = UNSET
|
|
72
|
+
elif isinstance(self.image, File):
|
|
73
|
+
image = self.image.to_tuple()
|
|
74
|
+
|
|
75
|
+
else:
|
|
76
|
+
image = self.image
|
|
77
|
+
|
|
78
|
+
name = self.name
|
|
79
|
+
|
|
80
|
+
slug = self.slug
|
|
81
|
+
|
|
82
|
+
native_name = self.native_name
|
|
83
|
+
|
|
84
|
+
abbreviation = self.abbreviation
|
|
85
|
+
|
|
86
|
+
description = self.description
|
|
87
|
+
|
|
88
|
+
contact_details = self.contact_details
|
|
89
|
+
|
|
90
|
+
email = self.email
|
|
91
|
+
|
|
92
|
+
phone_number = self.phone_number
|
|
93
|
+
|
|
94
|
+
registration_code = self.registration_code
|
|
95
|
+
|
|
96
|
+
homepage = self.homepage
|
|
97
|
+
|
|
98
|
+
vat_code = self.vat_code
|
|
99
|
+
|
|
100
|
+
postal = self.postal
|
|
101
|
+
|
|
102
|
+
address = self.address
|
|
103
|
+
|
|
104
|
+
bank_name = self.bank_name
|
|
105
|
+
|
|
106
|
+
latitude: Union[None, Unset, float]
|
|
107
|
+
if isinstance(self.latitude, Unset):
|
|
108
|
+
latitude = UNSET
|
|
109
|
+
else:
|
|
110
|
+
latitude = self.latitude
|
|
111
|
+
|
|
112
|
+
longitude: Union[None, Unset, float]
|
|
113
|
+
if isinstance(self.longitude, Unset):
|
|
114
|
+
longitude = UNSET
|
|
115
|
+
else:
|
|
116
|
+
longitude = self.longitude
|
|
117
|
+
|
|
118
|
+
bank_account = self.bank_account
|
|
119
|
+
|
|
120
|
+
country: Union[Unset, str]
|
|
121
|
+
if isinstance(self.country, Unset):
|
|
122
|
+
country = UNSET
|
|
123
|
+
elif isinstance(self.country, CountryEnum):
|
|
124
|
+
country = self.country.value
|
|
125
|
+
else:
|
|
126
|
+
country = self.country.value
|
|
127
|
+
|
|
128
|
+
notification_emails = self.notification_emails
|
|
129
|
+
|
|
130
|
+
field_dict: dict[str, Any] = {}
|
|
131
|
+
field_dict.update(self.additional_properties)
|
|
132
|
+
field_dict.update({})
|
|
133
|
+
if backend_id is not UNSET:
|
|
134
|
+
field_dict["backend_id"] = backend_id
|
|
135
|
+
if image is not UNSET:
|
|
136
|
+
field_dict["image"] = image
|
|
137
|
+
if name is not UNSET:
|
|
138
|
+
field_dict["name"] = name
|
|
139
|
+
if slug is not UNSET:
|
|
140
|
+
field_dict["slug"] = slug
|
|
141
|
+
if native_name is not UNSET:
|
|
142
|
+
field_dict["native_name"] = native_name
|
|
143
|
+
if abbreviation is not UNSET:
|
|
144
|
+
field_dict["abbreviation"] = abbreviation
|
|
145
|
+
if description is not UNSET:
|
|
146
|
+
field_dict["description"] = description
|
|
147
|
+
if contact_details is not UNSET:
|
|
148
|
+
field_dict["contact_details"] = contact_details
|
|
149
|
+
if email is not UNSET:
|
|
150
|
+
field_dict["email"] = email
|
|
151
|
+
if phone_number is not UNSET:
|
|
152
|
+
field_dict["phone_number"] = phone_number
|
|
153
|
+
if registration_code is not UNSET:
|
|
154
|
+
field_dict["registration_code"] = registration_code
|
|
155
|
+
if homepage is not UNSET:
|
|
156
|
+
field_dict["homepage"] = homepage
|
|
157
|
+
if vat_code is not UNSET:
|
|
158
|
+
field_dict["vat_code"] = vat_code
|
|
159
|
+
if postal is not UNSET:
|
|
160
|
+
field_dict["postal"] = postal
|
|
161
|
+
if address is not UNSET:
|
|
162
|
+
field_dict["address"] = address
|
|
163
|
+
if bank_name is not UNSET:
|
|
164
|
+
field_dict["bank_name"] = bank_name
|
|
165
|
+
if latitude is not UNSET:
|
|
166
|
+
field_dict["latitude"] = latitude
|
|
167
|
+
if longitude is not UNSET:
|
|
168
|
+
field_dict["longitude"] = longitude
|
|
169
|
+
if bank_account is not UNSET:
|
|
170
|
+
field_dict["bank_account"] = bank_account
|
|
171
|
+
if country is not UNSET:
|
|
172
|
+
field_dict["country"] = country
|
|
173
|
+
if notification_emails is not UNSET:
|
|
174
|
+
field_dict["notification_emails"] = notification_emails
|
|
175
|
+
|
|
176
|
+
return field_dict
|
|
177
|
+
|
|
178
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
179
|
+
files: types.RequestFiles = []
|
|
180
|
+
|
|
181
|
+
if not isinstance(self.backend_id, Unset):
|
|
182
|
+
files.append(("backend_id", (None, str(self.backend_id).encode(), "text/plain")))
|
|
183
|
+
|
|
184
|
+
if not isinstance(self.image, Unset):
|
|
185
|
+
if isinstance(self.image, File):
|
|
186
|
+
files.append(("image", self.image.to_tuple()))
|
|
187
|
+
else:
|
|
188
|
+
files.append(("image", (None, str(self.image).encode(), "text/plain")))
|
|
189
|
+
|
|
190
|
+
if not isinstance(self.name, Unset):
|
|
191
|
+
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
|
192
|
+
|
|
193
|
+
if not isinstance(self.slug, Unset):
|
|
194
|
+
files.append(("slug", (None, str(self.slug).encode(), "text/plain")))
|
|
195
|
+
|
|
196
|
+
if not isinstance(self.native_name, Unset):
|
|
197
|
+
files.append(("native_name", (None, str(self.native_name).encode(), "text/plain")))
|
|
198
|
+
|
|
199
|
+
if not isinstance(self.abbreviation, Unset):
|
|
200
|
+
files.append(("abbreviation", (None, str(self.abbreviation).encode(), "text/plain")))
|
|
201
|
+
|
|
202
|
+
if not isinstance(self.description, Unset):
|
|
203
|
+
files.append(("description", (None, str(self.description).encode(), "text/plain")))
|
|
204
|
+
|
|
205
|
+
if not isinstance(self.contact_details, Unset):
|
|
206
|
+
files.append(("contact_details", (None, str(self.contact_details).encode(), "text/plain")))
|
|
207
|
+
|
|
208
|
+
if not isinstance(self.email, Unset):
|
|
209
|
+
files.append(("email", (None, str(self.email).encode(), "text/plain")))
|
|
210
|
+
|
|
211
|
+
if not isinstance(self.phone_number, Unset):
|
|
212
|
+
files.append(("phone_number", (None, str(self.phone_number).encode(), "text/plain")))
|
|
213
|
+
|
|
214
|
+
if not isinstance(self.registration_code, Unset):
|
|
215
|
+
files.append(("registration_code", (None, str(self.registration_code).encode(), "text/plain")))
|
|
216
|
+
|
|
217
|
+
if not isinstance(self.homepage, Unset):
|
|
218
|
+
files.append(("homepage", (None, str(self.homepage).encode(), "text/plain")))
|
|
219
|
+
|
|
220
|
+
if not isinstance(self.vat_code, Unset):
|
|
221
|
+
files.append(("vat_code", (None, str(self.vat_code).encode(), "text/plain")))
|
|
222
|
+
|
|
223
|
+
if not isinstance(self.postal, Unset):
|
|
224
|
+
files.append(("postal", (None, str(self.postal).encode(), "text/plain")))
|
|
225
|
+
|
|
226
|
+
if not isinstance(self.address, Unset):
|
|
227
|
+
files.append(("address", (None, str(self.address).encode(), "text/plain")))
|
|
228
|
+
|
|
229
|
+
if not isinstance(self.bank_name, Unset):
|
|
230
|
+
files.append(("bank_name", (None, str(self.bank_name).encode(), "text/plain")))
|
|
231
|
+
|
|
232
|
+
if not isinstance(self.latitude, Unset):
|
|
233
|
+
if isinstance(self.latitude, float):
|
|
234
|
+
files.append(("latitude", (None, str(self.latitude).encode(), "text/plain")))
|
|
235
|
+
else:
|
|
236
|
+
files.append(("latitude", (None, str(self.latitude).encode(), "text/plain")))
|
|
237
|
+
|
|
238
|
+
if not isinstance(self.longitude, Unset):
|
|
239
|
+
if isinstance(self.longitude, float):
|
|
240
|
+
files.append(("longitude", (None, str(self.longitude).encode(), "text/plain")))
|
|
241
|
+
else:
|
|
242
|
+
files.append(("longitude", (None, str(self.longitude).encode(), "text/plain")))
|
|
243
|
+
|
|
244
|
+
if not isinstance(self.bank_account, Unset):
|
|
245
|
+
files.append(("bank_account", (None, str(self.bank_account).encode(), "text/plain")))
|
|
246
|
+
|
|
247
|
+
if not isinstance(self.country, Unset):
|
|
248
|
+
if isinstance(self.country, CountryEnum):
|
|
249
|
+
files.append(("country", (None, str(self.country.value).encode(), "text/plain")))
|
|
250
|
+
else:
|
|
251
|
+
files.append(("country", (None, str(self.country.value).encode(), "text/plain")))
|
|
252
|
+
|
|
253
|
+
if not isinstance(self.notification_emails, Unset):
|
|
254
|
+
files.append(("notification_emails", (None, str(self.notification_emails).encode(), "text/plain")))
|
|
255
|
+
|
|
256
|
+
for prop_name, prop in self.additional_properties.items():
|
|
257
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
258
|
+
|
|
259
|
+
return files
|
|
260
|
+
|
|
261
|
+
@classmethod
|
|
262
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
263
|
+
d = dict(src_dict)
|
|
264
|
+
backend_id = d.pop("backend_id", UNSET)
|
|
265
|
+
|
|
266
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
267
|
+
if data is None:
|
|
268
|
+
return data
|
|
269
|
+
if isinstance(data, Unset):
|
|
270
|
+
return data
|
|
271
|
+
try:
|
|
272
|
+
if not isinstance(data, bytes):
|
|
273
|
+
raise TypeError()
|
|
274
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
275
|
+
|
|
276
|
+
return image_type_0
|
|
277
|
+
except: # noqa: E722
|
|
278
|
+
pass
|
|
279
|
+
return cast(Union[File, None, Unset], data)
|
|
280
|
+
|
|
281
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
282
|
+
|
|
283
|
+
name = d.pop("name", UNSET)
|
|
284
|
+
|
|
285
|
+
slug = d.pop("slug", UNSET)
|
|
286
|
+
|
|
287
|
+
native_name = d.pop("native_name", UNSET)
|
|
288
|
+
|
|
289
|
+
abbreviation = d.pop("abbreviation", UNSET)
|
|
290
|
+
|
|
291
|
+
description = d.pop("description", UNSET)
|
|
292
|
+
|
|
293
|
+
contact_details = d.pop("contact_details", UNSET)
|
|
294
|
+
|
|
295
|
+
email = d.pop("email", UNSET)
|
|
296
|
+
|
|
297
|
+
phone_number = d.pop("phone_number", UNSET)
|
|
298
|
+
|
|
299
|
+
registration_code = d.pop("registration_code", UNSET)
|
|
300
|
+
|
|
301
|
+
homepage = d.pop("homepage", UNSET)
|
|
302
|
+
|
|
303
|
+
vat_code = d.pop("vat_code", UNSET)
|
|
304
|
+
|
|
305
|
+
postal = d.pop("postal", UNSET)
|
|
306
|
+
|
|
307
|
+
address = d.pop("address", UNSET)
|
|
308
|
+
|
|
309
|
+
bank_name = d.pop("bank_name", UNSET)
|
|
310
|
+
|
|
311
|
+
def _parse_latitude(data: object) -> Union[None, Unset, float]:
|
|
312
|
+
if data is None:
|
|
313
|
+
return data
|
|
314
|
+
if isinstance(data, Unset):
|
|
315
|
+
return data
|
|
316
|
+
return cast(Union[None, Unset, float], data)
|
|
317
|
+
|
|
318
|
+
latitude = _parse_latitude(d.pop("latitude", UNSET))
|
|
319
|
+
|
|
320
|
+
def _parse_longitude(data: object) -> Union[None, Unset, float]:
|
|
321
|
+
if data is None:
|
|
322
|
+
return data
|
|
323
|
+
if isinstance(data, Unset):
|
|
324
|
+
return data
|
|
325
|
+
return cast(Union[None, Unset, float], data)
|
|
326
|
+
|
|
327
|
+
longitude = _parse_longitude(d.pop("longitude", UNSET))
|
|
328
|
+
|
|
329
|
+
bank_account = d.pop("bank_account", UNSET)
|
|
330
|
+
|
|
331
|
+
def _parse_country(data: object) -> Union[BlankEnum, CountryEnum, Unset]:
|
|
332
|
+
if isinstance(data, Unset):
|
|
333
|
+
return data
|
|
334
|
+
try:
|
|
335
|
+
if not isinstance(data, str):
|
|
336
|
+
raise TypeError()
|
|
337
|
+
country_type_0 = CountryEnum(data)
|
|
338
|
+
|
|
339
|
+
return country_type_0
|
|
340
|
+
except: # noqa: E722
|
|
341
|
+
pass
|
|
342
|
+
if not isinstance(data, str):
|
|
343
|
+
raise TypeError()
|
|
344
|
+
country_type_1 = BlankEnum(data)
|
|
345
|
+
|
|
346
|
+
return country_type_1
|
|
347
|
+
|
|
348
|
+
country = _parse_country(d.pop("country", UNSET))
|
|
349
|
+
|
|
350
|
+
notification_emails = d.pop("notification_emails", UNSET)
|
|
351
|
+
|
|
352
|
+
patched_customer_request_multipart = cls(
|
|
353
|
+
backend_id=backend_id,
|
|
354
|
+
image=image,
|
|
355
|
+
name=name,
|
|
356
|
+
slug=slug,
|
|
357
|
+
native_name=native_name,
|
|
358
|
+
abbreviation=abbreviation,
|
|
359
|
+
description=description,
|
|
360
|
+
contact_details=contact_details,
|
|
361
|
+
email=email,
|
|
362
|
+
phone_number=phone_number,
|
|
363
|
+
registration_code=registration_code,
|
|
364
|
+
homepage=homepage,
|
|
365
|
+
vat_code=vat_code,
|
|
366
|
+
postal=postal,
|
|
367
|
+
address=address,
|
|
368
|
+
bank_name=bank_name,
|
|
369
|
+
latitude=latitude,
|
|
370
|
+
longitude=longitude,
|
|
371
|
+
bank_account=bank_account,
|
|
372
|
+
country=country,
|
|
373
|
+
notification_emails=notification_emails,
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
patched_customer_request_multipart.additional_properties = d
|
|
377
|
+
return patched_customer_request_multipart
|
|
378
|
+
|
|
379
|
+
@property
|
|
380
|
+
def additional_keys(self) -> list[str]:
|
|
381
|
+
return list(self.additional_properties.keys())
|
|
382
|
+
|
|
383
|
+
def __getitem__(self, key: str) -> Any:
|
|
384
|
+
return self.additional_properties[key]
|
|
385
|
+
|
|
386
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
387
|
+
self.additional_properties[key] = value
|
|
388
|
+
|
|
389
|
+
def __delitem__(self, key: str) -> None:
|
|
390
|
+
del self.additional_properties[key]
|
|
391
|
+
|
|
392
|
+
def __contains__(self, key: str) -> bool:
|
|
393
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchedExternalLinkRequestForm")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedExternalLinkRequestForm:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
name (Union[Unset, str]):
|
|
19
|
+
description (Union[Unset, str]):
|
|
20
|
+
link (Union[Unset, str]):
|
|
21
|
+
image (Union[File, None, Unset]):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: Union[Unset, str] = UNSET
|
|
25
|
+
description: Union[Unset, str] = UNSET
|
|
26
|
+
link: Union[Unset, str] = UNSET
|
|
27
|
+
image: Union[File, None, Unset] = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
name = self.name
|
|
32
|
+
|
|
33
|
+
description = self.description
|
|
34
|
+
|
|
35
|
+
link = self.link
|
|
36
|
+
|
|
37
|
+
image: Union[None, Unset, types.FileTypes]
|
|
38
|
+
if isinstance(self.image, Unset):
|
|
39
|
+
image = UNSET
|
|
40
|
+
elif isinstance(self.image, File):
|
|
41
|
+
image = self.image.to_tuple()
|
|
42
|
+
|
|
43
|
+
else:
|
|
44
|
+
image = self.image
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update({})
|
|
49
|
+
if name is not UNSET:
|
|
50
|
+
field_dict["name"] = name
|
|
51
|
+
if description is not UNSET:
|
|
52
|
+
field_dict["description"] = description
|
|
53
|
+
if link is not UNSET:
|
|
54
|
+
field_dict["link"] = link
|
|
55
|
+
if image is not UNSET:
|
|
56
|
+
field_dict["image"] = image
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
d = dict(src_dict)
|
|
63
|
+
name = d.pop("name", UNSET)
|
|
64
|
+
|
|
65
|
+
description = d.pop("description", UNSET)
|
|
66
|
+
|
|
67
|
+
link = d.pop("link", UNSET)
|
|
68
|
+
|
|
69
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
70
|
+
if data is None:
|
|
71
|
+
return data
|
|
72
|
+
if isinstance(data, Unset):
|
|
73
|
+
return data
|
|
74
|
+
try:
|
|
75
|
+
if not isinstance(data, bytes):
|
|
76
|
+
raise TypeError()
|
|
77
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
78
|
+
|
|
79
|
+
return image_type_0
|
|
80
|
+
except: # noqa: E722
|
|
81
|
+
pass
|
|
82
|
+
return cast(Union[File, None, Unset], data)
|
|
83
|
+
|
|
84
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
85
|
+
|
|
86
|
+
patched_external_link_request_form = cls(
|
|
87
|
+
name=name,
|
|
88
|
+
description=description,
|
|
89
|
+
link=link,
|
|
90
|
+
image=image,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
patched_external_link_request_form.additional_properties = d
|
|
94
|
+
return patched_external_link_request_form
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def additional_keys(self) -> list[str]:
|
|
98
|
+
return list(self.additional_properties.keys())
|
|
99
|
+
|
|
100
|
+
def __getitem__(self, key: str) -> Any:
|
|
101
|
+
return self.additional_properties[key]
|
|
102
|
+
|
|
103
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
104
|
+
self.additional_properties[key] = value
|
|
105
|
+
|
|
106
|
+
def __delitem__(self, key: str) -> None:
|
|
107
|
+
del self.additional_properties[key]
|
|
108
|
+
|
|
109
|
+
def __contains__(self, key: str) -> bool:
|
|
110
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchedExternalLinkRequestMultipart")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedExternalLinkRequestMultipart:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
name (Union[Unset, str]):
|
|
19
|
+
description (Union[Unset, str]):
|
|
20
|
+
link (Union[Unset, str]):
|
|
21
|
+
image (Union[File, None, Unset]):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: Union[Unset, str] = UNSET
|
|
25
|
+
description: Union[Unset, str] = UNSET
|
|
26
|
+
link: Union[Unset, str] = UNSET
|
|
27
|
+
image: Union[File, None, Unset] = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
name = self.name
|
|
32
|
+
|
|
33
|
+
description = self.description
|
|
34
|
+
|
|
35
|
+
link = self.link
|
|
36
|
+
|
|
37
|
+
image: Union[None, Unset, types.FileTypes]
|
|
38
|
+
if isinstance(self.image, Unset):
|
|
39
|
+
image = UNSET
|
|
40
|
+
elif isinstance(self.image, File):
|
|
41
|
+
image = self.image.to_tuple()
|
|
42
|
+
|
|
43
|
+
else:
|
|
44
|
+
image = self.image
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update({})
|
|
49
|
+
if name is not UNSET:
|
|
50
|
+
field_dict["name"] = name
|
|
51
|
+
if description is not UNSET:
|
|
52
|
+
field_dict["description"] = description
|
|
53
|
+
if link is not UNSET:
|
|
54
|
+
field_dict["link"] = link
|
|
55
|
+
if image is not UNSET:
|
|
56
|
+
field_dict["image"] = image
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
61
|
+
files: types.RequestFiles = []
|
|
62
|
+
|
|
63
|
+
if not isinstance(self.name, Unset):
|
|
64
|
+
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
|
65
|
+
|
|
66
|
+
if not isinstance(self.description, Unset):
|
|
67
|
+
files.append(("description", (None, str(self.description).encode(), "text/plain")))
|
|
68
|
+
|
|
69
|
+
if not isinstance(self.link, Unset):
|
|
70
|
+
files.append(("link", (None, str(self.link).encode(), "text/plain")))
|
|
71
|
+
|
|
72
|
+
if not isinstance(self.image, Unset):
|
|
73
|
+
if isinstance(self.image, File):
|
|
74
|
+
files.append(("image", self.image.to_tuple()))
|
|
75
|
+
else:
|
|
76
|
+
files.append(("image", (None, str(self.image).encode(), "text/plain")))
|
|
77
|
+
|
|
78
|
+
for prop_name, prop in self.additional_properties.items():
|
|
79
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
80
|
+
|
|
81
|
+
return files
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
85
|
+
d = dict(src_dict)
|
|
86
|
+
name = d.pop("name", UNSET)
|
|
87
|
+
|
|
88
|
+
description = d.pop("description", UNSET)
|
|
89
|
+
|
|
90
|
+
link = d.pop("link", UNSET)
|
|
91
|
+
|
|
92
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
93
|
+
if data is None:
|
|
94
|
+
return data
|
|
95
|
+
if isinstance(data, Unset):
|
|
96
|
+
return data
|
|
97
|
+
try:
|
|
98
|
+
if not isinstance(data, bytes):
|
|
99
|
+
raise TypeError()
|
|
100
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
101
|
+
|
|
102
|
+
return image_type_0
|
|
103
|
+
except: # noqa: E722
|
|
104
|
+
pass
|
|
105
|
+
return cast(Union[File, None, Unset], data)
|
|
106
|
+
|
|
107
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
108
|
+
|
|
109
|
+
patched_external_link_request_multipart = cls(
|
|
110
|
+
name=name,
|
|
111
|
+
description=description,
|
|
112
|
+
link=link,
|
|
113
|
+
image=image,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
patched_external_link_request_multipart.additional_properties = d
|
|
117
|
+
return patched_external_link_request_multipart
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def additional_keys(self) -> list[str]:
|
|
121
|
+
return list(self.additional_properties.keys())
|
|
122
|
+
|
|
123
|
+
def __getitem__(self, key: str) -> Any:
|
|
124
|
+
return self.additional_properties[key]
|
|
125
|
+
|
|
126
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
127
|
+
self.additional_properties[key] = value
|
|
128
|
+
|
|
129
|
+
def __delitem__(self, key: str) -> None:
|
|
130
|
+
del self.additional_properties[key]
|
|
131
|
+
|
|
132
|
+
def __contains__(self, key: str) -> bool:
|
|
133
|
+
return key in self.additional_properties
|