add openapi-python-client generator + client
This commit is contained in:
@@ -0,0 +1,475 @@
|
||||
"""Contains all the data models used in inputs/outputs"""
|
||||
|
||||
from .access_management_place import AccessManagementPlace
|
||||
from .accounting_invoices_list_status import AccountingInvoicesListStatus
|
||||
from .add_to_basket_node_extra_info import AddToBasketNodeExtraInfo
|
||||
from .add_to_basket_node_extra_info_group import AddToBasketNodeExtraInfoGroup
|
||||
from .api_token import ApiToken
|
||||
from .billing_information import BillingInformation
|
||||
from .blank_enum import BlankEnum
|
||||
from .cancel_error import CancelError
|
||||
from .category_enum import CategoryEnum
|
||||
from .completion_started import CompletionStarted
|
||||
from .condition import Condition
|
||||
from .confirmation_page_extra_text_active_module import ConfirmationPageExtraTextActiveModule
|
||||
from .confirmation_page_extra_text_configuration import ConfirmationPageExtraTextConfiguration
|
||||
from .core_unitmemberships_list_role import CoreUnitmembershipsListRole
|
||||
from .create_anonymous_login import CreateAnonymousLogin
|
||||
from .create_trusted_email_login import CreateTrustedEmailLogin
|
||||
from .document import Document
|
||||
from .document_type_enum import DocumentTypeEnum
|
||||
from .event import Event
|
||||
from .event_moderation import EventModeration
|
||||
from .event_public_infos import EventPublicInfos
|
||||
from .event_statistics import EventStatistics
|
||||
from .event_statistics_invoices_refunded import EventStatisticsInvoicesRefunded
|
||||
from .event_statistics_invoices_refunded_value import EventStatisticsInvoicesRefundedValue
|
||||
from .event_statistics_invoices_resolved import EventStatisticsInvoicesResolved
|
||||
from .event_statistics_invoices_resolved_value import EventStatisticsInvoicesResolvedValue
|
||||
from .event_status_enum import EventStatusEnum
|
||||
from .events_events_actions_export_create_file_type import EventsEventsActionsExportCreateFileType
|
||||
from .events_events_actions_statistics_retrieve_granularity import EventsEventsActionsStatisticsRetrieveGranularity
|
||||
from .frontend_basket import FrontendBasket
|
||||
from .frontend_login import FrontendLogin
|
||||
from .invoice import Invoice
|
||||
from .left_hand_operand_enum import LeftHandOperandEnum
|
||||
from .logical_operator_enum import LogicalOperatorEnum
|
||||
from .login import Login
|
||||
from .login_jwt import LoginJWT
|
||||
from .login_method import LoginMethod
|
||||
from .login_result import LoginResult
|
||||
from .mode_enum import ModeEnum
|
||||
from .model_form_line_type import ModelFormLineType
|
||||
from .moderation_status_enum import ModerationStatusEnum
|
||||
from .module_auth_anonymous_login_active_module import ModuleAuthAnonymousLoginActiveModule
|
||||
from .module_auth_anonymous_login_configuration import ModuleAuthAnonymousLoginConfiguration
|
||||
from .module_auth_third_party_token_login_active_module import ModuleAuthThirdPartyTokenLoginActiveModule
|
||||
from .module_auth_third_party_token_login_configuration import ModuleAuthThirdPartyTokenLoginConfiguration
|
||||
from .module_auth_trusted_email_active_module import ModuleAuthTrustedEmailActiveModule
|
||||
from .module_auth_trusted_email_configuration import ModuleAuthTrustedEmailConfiguration
|
||||
from .module_completion_email_registration_completed_active_module import (
|
||||
ModuleCompletionEmailRegistrationCompletedActiveModule,
|
||||
)
|
||||
from .module_completion_email_registration_completed_configuration import (
|
||||
ModuleCompletionEmailRegistrationCompletedConfiguration,
|
||||
)
|
||||
from .module_completion_email_registration_creation_active_module import (
|
||||
ModuleCompletionEmailRegistrationCreationActiveModule,
|
||||
)
|
||||
from .module_completion_email_registration_creation_configuration import (
|
||||
ModuleCompletionEmailRegistrationCreationConfiguration,
|
||||
)
|
||||
from .module_completion_pdf_ticket_active_module import ModuleCompletionPDFTicketActiveModule
|
||||
from .module_completion_pdf_ticket_configuration import ModuleCompletionPDFTicketConfiguration
|
||||
from .module_completion_redirect_active_module import ModuleCompletionRedirectActiveModule
|
||||
from .module_completion_redirect_configuration import ModuleCompletionRedirectConfiguration
|
||||
from .module_payment_payrexx_active_module import ModulePaymentPayrexxActiveModule
|
||||
from .module_payment_payrexx_configuration import ModulePaymentPayrexxConfiguration
|
||||
from .module_payment_payrexx_configuration_global_limit import ModulePaymentPayrexxConfigurationGlobalLimit
|
||||
from .module_payment_payrexx_configuration_limit import ModulePaymentPayrexxConfigurationLimit
|
||||
from .module_payment_payrexx_configuration_price_rule import ModulePaymentPayrexxConfigurationPriceRule
|
||||
from .module_payment_point_of_sale_active_module import ModulePaymentPointOfSaleActiveModule
|
||||
from .module_payment_point_of_sale_configuration import ModulePaymentPointOfSaleConfiguration
|
||||
from .module_payment_point_of_sale_configuration_global_limit import ModulePaymentPointOfSaleConfigurationGlobalLimit
|
||||
from .module_payment_point_of_sale_configuration_limit import ModulePaymentPointOfSaleConfigurationLimit
|
||||
from .module_payment_point_of_sale_configuration_price_rule import ModulePaymentPointOfSaleConfigurationPriceRule
|
||||
from .module_registration_access_management_active_module import ModuleRegistrationAccessManagementActiveModule
|
||||
from .module_registration_options_active_module import ModuleRegistrationOptionsActiveModule
|
||||
from .module_registration_options_configuration import ModuleRegistrationOptionsConfiguration
|
||||
from .module_registrations_access_management_configuration import ModuleRegistrationsAccessManagementConfiguration
|
||||
from .modules_basket_frontend_baskets_actions_validate_extra_infos_retrieve_inline_type import (
|
||||
ModulesBasketFrontendBasketsActionsValidateExtraInfosRetrieveInlineType,
|
||||
)
|
||||
from .node import Node
|
||||
from .node_access import NodeAccess
|
||||
from .node_access_m2m import NodeAccessM2M
|
||||
from .node_availability import NodeAvailability
|
||||
from .node_availability_m2m import NodeAvailabilityM2M
|
||||
from .node_cart_configuration import NodeCartConfiguration
|
||||
from .node_configuration import NodeConfiguration
|
||||
from .node_extra_info import NodeExtraInfo
|
||||
from .node_extra_info_group import NodeExtraInfoGroup
|
||||
from .node_extra_info_group_m2m import NodeExtraInfoGroupM2M
|
||||
from .node_limit import NodeLimit
|
||||
from .node_limit_m2m import NodeLimitM2M
|
||||
from .node_limit_usage import NodeLimitUsage
|
||||
from .node_price_rule import NodePriceRule
|
||||
from .node_price_rule_m2m import NodePriceRuleM2M
|
||||
from .node_stock import NodeStock
|
||||
from .node_tag import NodeTag
|
||||
from .operator_enum import OperatorEnum
|
||||
from .paginated_access_management_place_list import PaginatedAccessManagementPlaceList
|
||||
from .paginated_api_token_list import PaginatedApiTokenList
|
||||
from .paginated_billing_information_list import PaginatedBillingInformationList
|
||||
from .paginated_condition_list import PaginatedConditionList
|
||||
from .paginated_confirmation_page_extra_text_active_module_list import (
|
||||
PaginatedConfirmationPageExtraTextActiveModuleList,
|
||||
)
|
||||
from .paginated_document_list import PaginatedDocumentList
|
||||
from .paginated_event_list import PaginatedEventList
|
||||
from .paginated_frontend_basket_list import PaginatedFrontendBasketList
|
||||
from .paginated_frontend_login_list import PaginatedFrontendLoginList
|
||||
from .paginated_invoice_list import PaginatedInvoiceList
|
||||
from .paginated_login_method_list import PaginatedLoginMethodList
|
||||
from .paginated_module_auth_anonymous_login_active_module_list import PaginatedModuleAuthAnonymousLoginActiveModuleList
|
||||
from .paginated_module_auth_third_party_token_login_active_module_list import (
|
||||
PaginatedModuleAuthThirdPartyTokenLoginActiveModuleList,
|
||||
)
|
||||
from .paginated_module_auth_trusted_email_active_module_list import PaginatedModuleAuthTrustedEmailActiveModuleList
|
||||
from .paginated_module_completion_email_registration_completed_active_module_list import (
|
||||
PaginatedModuleCompletionEmailRegistrationCompletedActiveModuleList,
|
||||
)
|
||||
from .paginated_module_completion_email_registration_creation_active_module_list import (
|
||||
PaginatedModuleCompletionEmailRegistrationCreationActiveModuleList,
|
||||
)
|
||||
from .paginated_module_completion_pdf_ticket_active_module_list import (
|
||||
PaginatedModuleCompletionPDFTicketActiveModuleList,
|
||||
)
|
||||
from .paginated_module_completion_redirect_active_module_list import PaginatedModuleCompletionRedirectActiveModuleList
|
||||
from .paginated_module_payment_payrexx_active_module_list import PaginatedModulePaymentPayrexxActiveModuleList
|
||||
from .paginated_module_payment_point_of_sale_active_module_list import PaginatedModulePaymentPointOfSaleActiveModuleList
|
||||
from .paginated_module_registration_access_management_active_module_list import (
|
||||
PaginatedModuleRegistrationAccessManagementActiveModuleList,
|
||||
)
|
||||
from .paginated_module_registration_options_active_module_list import PaginatedModuleRegistrationOptionsActiveModuleList
|
||||
from .paginated_node_access_list import PaginatedNodeAccessList
|
||||
from .paginated_node_access_m2m_list import PaginatedNodeAccessM2MList
|
||||
from .paginated_node_availability_list import PaginatedNodeAvailabilityList
|
||||
from .paginated_node_availability_m2m_list import PaginatedNodeAvailabilityM2MList
|
||||
from .paginated_node_cart_configuration_list import PaginatedNodeCartConfigurationList
|
||||
from .paginated_node_configuration_list import PaginatedNodeConfigurationList
|
||||
from .paginated_node_extra_info_group_list import PaginatedNodeExtraInfoGroupList
|
||||
from .paginated_node_extra_info_group_m2m_list import PaginatedNodeExtraInfoGroupM2MList
|
||||
from .paginated_node_extra_info_list import PaginatedNodeExtraInfoList
|
||||
from .paginated_node_limit_list import PaginatedNodeLimitList
|
||||
from .paginated_node_limit_m2m_list import PaginatedNodeLimitM2MList
|
||||
from .paginated_node_list import PaginatedNodeList
|
||||
from .paginated_node_price_rule_list import PaginatedNodePriceRuleList
|
||||
from .paginated_node_price_rule_m2m_list import PaginatedNodePriceRuleM2MList
|
||||
from .paginated_node_tag_list import PaginatedNodeTagList
|
||||
from .paginated_payment_intent_list import PaginatedPaymentIntentList
|
||||
from .paginated_payment_method_list import PaginatedPaymentMethodList
|
||||
from .paginated_point_of_sale_place_read_only_list import PaginatedPointOfSalePlaceReadOnlyList
|
||||
from .paginated_poly_ticket_user_list import PaginatedPolyTicketUserList
|
||||
from .paginated_promotion_code_list import PaginatedPromotionCodeList
|
||||
from .paginated_selected_node_extra_info_group_list import PaginatedSelectedNodeExtraInfoGroupList
|
||||
from .paginated_selected_node_extra_info_list import PaginatedSelectedNodeExtraInfoList
|
||||
from .paginated_selected_node_list import PaginatedSelectedNodeList
|
||||
from .paginated_selected_promotion_code_list import PaginatedSelectedPromotionCodeList
|
||||
from .paginated_statement_list import PaginatedStatementList
|
||||
from .paginated_unit_list import PaginatedUnitList
|
||||
from .paginated_unit_membership_list import PaginatedUnitMembershipList
|
||||
from .paginated_uploaded_image_list import PaginatedUploadedImageList
|
||||
from .password_change_success import PasswordChangeSuccess
|
||||
from .password_reset_success import PasswordResetSuccess
|
||||
from .patched_access_management_place import PatchedAccessManagementPlace
|
||||
from .patched_condition import PatchedCondition
|
||||
from .patched_confirmation_page_extra_text_active_module import PatchedConfirmationPageExtraTextActiveModule
|
||||
from .patched_event import PatchedEvent
|
||||
from .patched_frontend_basket import PatchedFrontendBasket
|
||||
from .patched_module_auth_anonymous_login_active_module import PatchedModuleAuthAnonymousLoginActiveModule
|
||||
from .patched_module_auth_third_party_token_login_active_module import PatchedModuleAuthThirdPartyTokenLoginActiveModule
|
||||
from .patched_module_auth_trusted_email_active_module import PatchedModuleAuthTrustedEmailActiveModule
|
||||
from .patched_module_completion_email_registration_completed_active_module import (
|
||||
PatchedModuleCompletionEmailRegistrationCompletedActiveModule,
|
||||
)
|
||||
from .patched_module_completion_email_registration_creation_active_module import (
|
||||
PatchedModuleCompletionEmailRegistrationCreationActiveModule,
|
||||
)
|
||||
from .patched_module_completion_pdf_ticket_active_module import PatchedModuleCompletionPDFTicketActiveModule
|
||||
from .patched_module_completion_redirect_active_module import PatchedModuleCompletionRedirectActiveModule
|
||||
from .patched_module_payment_payrexx_active_module import PatchedModulePaymentPayrexxActiveModule
|
||||
from .patched_module_payment_point_of_sale_active_module import PatchedModulePaymentPointOfSaleActiveModule
|
||||
from .patched_module_registration_access_management_active_module import (
|
||||
PatchedModuleRegistrationAccessManagementActiveModule,
|
||||
)
|
||||
from .patched_module_registration_options_active_module import PatchedModuleRegistrationOptionsActiveModule
|
||||
from .patched_node import PatchedNode
|
||||
from .patched_node_access import PatchedNodeAccess
|
||||
from .patched_node_availability import PatchedNodeAvailability
|
||||
from .patched_node_cart_configuration import PatchedNodeCartConfiguration
|
||||
from .patched_node_configuration import PatchedNodeConfiguration
|
||||
from .patched_node_extra_info import PatchedNodeExtraInfo
|
||||
from .patched_node_extra_info_group import PatchedNodeExtraInfoGroup
|
||||
from .patched_node_limit import PatchedNodeLimit
|
||||
from .patched_node_price_rule import PatchedNodePriceRule
|
||||
from .patched_node_tag import PatchedNodeTag
|
||||
from .patched_point_of_sale_place_read_only import PatchedPointOfSalePlaceReadOnly
|
||||
from .patched_poly_ticket_user import PatchedPolyTicketUser
|
||||
from .patched_promotion_code import PatchedPromotionCode
|
||||
from .patched_selected_node_extra_info import PatchedSelectedNodeExtraInfo
|
||||
from .patched_statement import PatchedStatement
|
||||
from .patched_unit import PatchedUnit
|
||||
from .patched_unit_membership import PatchedUnitMembership
|
||||
from .patched_uploaded_image import PatchedUploadedImage
|
||||
from .payment_intent import PaymentIntent
|
||||
from .payment_intent_request_update import PaymentIntentRequestUpdate
|
||||
from .payment_intent_request_update_status_enum import PaymentIntentRequestUpdateStatusEnum
|
||||
from .payment_method import PaymentMethod
|
||||
from .payment_start import PaymentStart
|
||||
from .payrexx_payment import PayrexxPayment
|
||||
from .payrexx_transaction import PayrexxTransaction
|
||||
from .point_of_sale_place import PointOfSalePlace
|
||||
from .point_of_sale_place_read_only import PointOfSalePlaceReadOnly
|
||||
from .poly_ticket_user import PolyTicketUser
|
||||
from .privacy_level_enum import PrivacyLevelEnum
|
||||
from .promotion_code import PromotionCode
|
||||
from .refund import Refund
|
||||
from .schema_retrieve_format import SchemaRetrieveFormat
|
||||
from .schema_retrieve_lang import SchemaRetrieveLang
|
||||
from .schema_retrieve_response_200 import SchemaRetrieveResponse200
|
||||
from .selected_node import SelectedNode
|
||||
from .selected_node_creation import SelectedNodeCreation
|
||||
from .selected_node_deletion import SelectedNodeDeletion
|
||||
from .selected_node_extra_info import SelectedNodeExtraInfo
|
||||
from .selected_node_extra_info_group import SelectedNodeExtraInfoGroup
|
||||
from .selected_node_status_enum import SelectedNodeStatusEnum
|
||||
from .selected_promotion_code import SelectedPromotionCode
|
||||
from .statement import Statement
|
||||
from .ticket_office_article_calculated_price import TicketOfficeArticleCalculatedPrice
|
||||
from .ticket_office_infos import TicketOfficeInfos
|
||||
from .ticket_office_node_configuration import TicketOfficeNodeConfiguration
|
||||
from .ticket_office_node_extra_info import TicketOfficeNodeExtraInfo
|
||||
from .ticket_office_node_extra_info_group import TicketOfficeNodeExtraInfoGroup
|
||||
from .ticket_office_node_limit import TicketOfficeNodeLimit
|
||||
from .ticket_office_node_tag import TicketOfficeNodeTag
|
||||
from .unit import Unit
|
||||
from .unit_member_ship_creation_by_email import UnitMemberShipCreationByEmail
|
||||
from .unit_member_ship_creation_by_email_role_enum import UnitMemberShipCreationByEmailRoleEnum
|
||||
from .unit_membership import UnitMembership
|
||||
from .unit_membership_role_enum import UnitMembershipRoleEnum
|
||||
from .uploaded_image import UploadedImage
|
||||
from .user_password_change import UserPasswordChange
|
||||
from .user_password_reset import UserPasswordReset
|
||||
from .user_password_reset_request import UserPasswordResetRequest
|
||||
from .user_registration import UserRegistration
|
||||
from .user_verification import UserVerification
|
||||
from .validate_third_party_token_login import ValidateThirdPartyTokenLogin
|
||||
from .validate_trusted_email_login import ValidateTrustedEmailLogin
|
||||
from .verification_error import VerificationError
|
||||
from .verification_success import VerificationSuccess
|
||||
from .webhooks import Webhooks
|
||||
|
||||
__all__ = (
|
||||
"AccessManagementPlace",
|
||||
"AccountingInvoicesListStatus",
|
||||
"AddToBasketNodeExtraInfo",
|
||||
"AddToBasketNodeExtraInfoGroup",
|
||||
"ApiToken",
|
||||
"BillingInformation",
|
||||
"BlankEnum",
|
||||
"CancelError",
|
||||
"CategoryEnum",
|
||||
"CompletionStarted",
|
||||
"Condition",
|
||||
"ConfirmationPageExtraTextActiveModule",
|
||||
"ConfirmationPageExtraTextConfiguration",
|
||||
"CoreUnitmembershipsListRole",
|
||||
"CreateAnonymousLogin",
|
||||
"CreateTrustedEmailLogin",
|
||||
"Document",
|
||||
"DocumentTypeEnum",
|
||||
"Event",
|
||||
"EventModeration",
|
||||
"EventPublicInfos",
|
||||
"EventsEventsActionsExportCreateFileType",
|
||||
"EventsEventsActionsStatisticsRetrieveGranularity",
|
||||
"EventStatistics",
|
||||
"EventStatisticsInvoicesRefunded",
|
||||
"EventStatisticsInvoicesRefundedValue",
|
||||
"EventStatisticsInvoicesResolved",
|
||||
"EventStatisticsInvoicesResolvedValue",
|
||||
"EventStatusEnum",
|
||||
"FrontendBasket",
|
||||
"FrontendLogin",
|
||||
"Invoice",
|
||||
"LeftHandOperandEnum",
|
||||
"LogicalOperatorEnum",
|
||||
"Login",
|
||||
"LoginJWT",
|
||||
"LoginMethod",
|
||||
"LoginResult",
|
||||
"ModeEnum",
|
||||
"ModelFormLineType",
|
||||
"ModerationStatusEnum",
|
||||
"ModuleAuthAnonymousLoginActiveModule",
|
||||
"ModuleAuthAnonymousLoginConfiguration",
|
||||
"ModuleAuthThirdPartyTokenLoginActiveModule",
|
||||
"ModuleAuthThirdPartyTokenLoginConfiguration",
|
||||
"ModuleAuthTrustedEmailActiveModule",
|
||||
"ModuleAuthTrustedEmailConfiguration",
|
||||
"ModuleCompletionEmailRegistrationCompletedActiveModule",
|
||||
"ModuleCompletionEmailRegistrationCompletedConfiguration",
|
||||
"ModuleCompletionEmailRegistrationCreationActiveModule",
|
||||
"ModuleCompletionEmailRegistrationCreationConfiguration",
|
||||
"ModuleCompletionPDFTicketActiveModule",
|
||||
"ModuleCompletionPDFTicketConfiguration",
|
||||
"ModuleCompletionRedirectActiveModule",
|
||||
"ModuleCompletionRedirectConfiguration",
|
||||
"ModulePaymentPayrexxActiveModule",
|
||||
"ModulePaymentPayrexxConfiguration",
|
||||
"ModulePaymentPayrexxConfigurationGlobalLimit",
|
||||
"ModulePaymentPayrexxConfigurationLimit",
|
||||
"ModulePaymentPayrexxConfigurationPriceRule",
|
||||
"ModulePaymentPointOfSaleActiveModule",
|
||||
"ModulePaymentPointOfSaleConfiguration",
|
||||
"ModulePaymentPointOfSaleConfigurationGlobalLimit",
|
||||
"ModulePaymentPointOfSaleConfigurationLimit",
|
||||
"ModulePaymentPointOfSaleConfigurationPriceRule",
|
||||
"ModuleRegistrationAccessManagementActiveModule",
|
||||
"ModuleRegistrationOptionsActiveModule",
|
||||
"ModuleRegistrationOptionsConfiguration",
|
||||
"ModuleRegistrationsAccessManagementConfiguration",
|
||||
"ModulesBasketFrontendBasketsActionsValidateExtraInfosRetrieveInlineType",
|
||||
"Node",
|
||||
"NodeAccess",
|
||||
"NodeAccessM2M",
|
||||
"NodeAvailability",
|
||||
"NodeAvailabilityM2M",
|
||||
"NodeCartConfiguration",
|
||||
"NodeConfiguration",
|
||||
"NodeExtraInfo",
|
||||
"NodeExtraInfoGroup",
|
||||
"NodeExtraInfoGroupM2M",
|
||||
"NodeLimit",
|
||||
"NodeLimitM2M",
|
||||
"NodeLimitUsage",
|
||||
"NodePriceRule",
|
||||
"NodePriceRuleM2M",
|
||||
"NodeStock",
|
||||
"NodeTag",
|
||||
"OperatorEnum",
|
||||
"PaginatedAccessManagementPlaceList",
|
||||
"PaginatedApiTokenList",
|
||||
"PaginatedBillingInformationList",
|
||||
"PaginatedConditionList",
|
||||
"PaginatedConfirmationPageExtraTextActiveModuleList",
|
||||
"PaginatedDocumentList",
|
||||
"PaginatedEventList",
|
||||
"PaginatedFrontendBasketList",
|
||||
"PaginatedFrontendLoginList",
|
||||
"PaginatedInvoiceList",
|
||||
"PaginatedLoginMethodList",
|
||||
"PaginatedModuleAuthAnonymousLoginActiveModuleList",
|
||||
"PaginatedModuleAuthThirdPartyTokenLoginActiveModuleList",
|
||||
"PaginatedModuleAuthTrustedEmailActiveModuleList",
|
||||
"PaginatedModuleCompletionEmailRegistrationCompletedActiveModuleList",
|
||||
"PaginatedModuleCompletionEmailRegistrationCreationActiveModuleList",
|
||||
"PaginatedModuleCompletionPDFTicketActiveModuleList",
|
||||
"PaginatedModuleCompletionRedirectActiveModuleList",
|
||||
"PaginatedModulePaymentPayrexxActiveModuleList",
|
||||
"PaginatedModulePaymentPointOfSaleActiveModuleList",
|
||||
"PaginatedModuleRegistrationAccessManagementActiveModuleList",
|
||||
"PaginatedModuleRegistrationOptionsActiveModuleList",
|
||||
"PaginatedNodeAccessList",
|
||||
"PaginatedNodeAccessM2MList",
|
||||
"PaginatedNodeAvailabilityList",
|
||||
"PaginatedNodeAvailabilityM2MList",
|
||||
"PaginatedNodeCartConfigurationList",
|
||||
"PaginatedNodeConfigurationList",
|
||||
"PaginatedNodeExtraInfoGroupList",
|
||||
"PaginatedNodeExtraInfoGroupM2MList",
|
||||
"PaginatedNodeExtraInfoList",
|
||||
"PaginatedNodeLimitList",
|
||||
"PaginatedNodeLimitM2MList",
|
||||
"PaginatedNodeList",
|
||||
"PaginatedNodePriceRuleList",
|
||||
"PaginatedNodePriceRuleM2MList",
|
||||
"PaginatedNodeTagList",
|
||||
"PaginatedPaymentIntentList",
|
||||
"PaginatedPaymentMethodList",
|
||||
"PaginatedPointOfSalePlaceReadOnlyList",
|
||||
"PaginatedPolyTicketUserList",
|
||||
"PaginatedPromotionCodeList",
|
||||
"PaginatedSelectedNodeExtraInfoGroupList",
|
||||
"PaginatedSelectedNodeExtraInfoList",
|
||||
"PaginatedSelectedNodeList",
|
||||
"PaginatedSelectedPromotionCodeList",
|
||||
"PaginatedStatementList",
|
||||
"PaginatedUnitList",
|
||||
"PaginatedUnitMembershipList",
|
||||
"PaginatedUploadedImageList",
|
||||
"PasswordChangeSuccess",
|
||||
"PasswordResetSuccess",
|
||||
"PatchedAccessManagementPlace",
|
||||
"PatchedCondition",
|
||||
"PatchedConfirmationPageExtraTextActiveModule",
|
||||
"PatchedEvent",
|
||||
"PatchedFrontendBasket",
|
||||
"PatchedModuleAuthAnonymousLoginActiveModule",
|
||||
"PatchedModuleAuthThirdPartyTokenLoginActiveModule",
|
||||
"PatchedModuleAuthTrustedEmailActiveModule",
|
||||
"PatchedModuleCompletionEmailRegistrationCompletedActiveModule",
|
||||
"PatchedModuleCompletionEmailRegistrationCreationActiveModule",
|
||||
"PatchedModuleCompletionPDFTicketActiveModule",
|
||||
"PatchedModuleCompletionRedirectActiveModule",
|
||||
"PatchedModulePaymentPayrexxActiveModule",
|
||||
"PatchedModulePaymentPointOfSaleActiveModule",
|
||||
"PatchedModuleRegistrationAccessManagementActiveModule",
|
||||
"PatchedModuleRegistrationOptionsActiveModule",
|
||||
"PatchedNode",
|
||||
"PatchedNodeAccess",
|
||||
"PatchedNodeAvailability",
|
||||
"PatchedNodeCartConfiguration",
|
||||
"PatchedNodeConfiguration",
|
||||
"PatchedNodeExtraInfo",
|
||||
"PatchedNodeExtraInfoGroup",
|
||||
"PatchedNodeLimit",
|
||||
"PatchedNodePriceRule",
|
||||
"PatchedNodeTag",
|
||||
"PatchedPointOfSalePlaceReadOnly",
|
||||
"PatchedPolyTicketUser",
|
||||
"PatchedPromotionCode",
|
||||
"PatchedSelectedNodeExtraInfo",
|
||||
"PatchedStatement",
|
||||
"PatchedUnit",
|
||||
"PatchedUnitMembership",
|
||||
"PatchedUploadedImage",
|
||||
"PaymentIntent",
|
||||
"PaymentIntentRequestUpdate",
|
||||
"PaymentIntentRequestUpdateStatusEnum",
|
||||
"PaymentMethod",
|
||||
"PaymentStart",
|
||||
"PayrexxPayment",
|
||||
"PayrexxTransaction",
|
||||
"PointOfSalePlace",
|
||||
"PointOfSalePlaceReadOnly",
|
||||
"PolyTicketUser",
|
||||
"PrivacyLevelEnum",
|
||||
"PromotionCode",
|
||||
"Refund",
|
||||
"SchemaRetrieveFormat",
|
||||
"SchemaRetrieveLang",
|
||||
"SchemaRetrieveResponse200",
|
||||
"SelectedNode",
|
||||
"SelectedNodeCreation",
|
||||
"SelectedNodeDeletion",
|
||||
"SelectedNodeExtraInfo",
|
||||
"SelectedNodeExtraInfoGroup",
|
||||
"SelectedNodeStatusEnum",
|
||||
"SelectedPromotionCode",
|
||||
"Statement",
|
||||
"TicketOfficeArticleCalculatedPrice",
|
||||
"TicketOfficeInfos",
|
||||
"TicketOfficeNodeConfiguration",
|
||||
"TicketOfficeNodeExtraInfo",
|
||||
"TicketOfficeNodeExtraInfoGroup",
|
||||
"TicketOfficeNodeLimit",
|
||||
"TicketOfficeNodeTag",
|
||||
"Unit",
|
||||
"UnitMembership",
|
||||
"UnitMemberShipCreationByEmail",
|
||||
"UnitMemberShipCreationByEmailRoleEnum",
|
||||
"UnitMembershipRoleEnum",
|
||||
"UploadedImage",
|
||||
"UserPasswordChange",
|
||||
"UserPasswordReset",
|
||||
"UserPasswordResetRequest",
|
||||
"UserRegistration",
|
||||
"UserVerification",
|
||||
"ValidateThirdPartyTokenLogin",
|
||||
"ValidateTrustedEmailLogin",
|
||||
"VerificationError",
|
||||
"VerificationSuccess",
|
||||
"Webhooks",
|
||||
)
|
||||
@@ -0,0 +1,151 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AccessManagementPlace")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AccessManagementPlace:
|
||||
"""Serializer for AccessManagementPlace model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
name (str):
|
||||
configuration (int):
|
||||
monomode_testing_url (str): URL of the access management scanner for this place, in testing mode.
|
||||
monomode_url (str): URL of the access management scanner for this place.
|
||||
expires_at (Union[None, Unset, datetime.datetime]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
name: str
|
||||
configuration: int
|
||||
monomode_testing_url: str
|
||||
monomode_url: str
|
||||
expires_at: Union[None, Unset, datetime.datetime] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
name = self.name
|
||||
|
||||
configuration = self.configuration
|
||||
|
||||
monomode_testing_url = self.monomode_testing_url
|
||||
|
||||
monomode_url = self.monomode_url
|
||||
|
||||
expires_at: Union[None, Unset, str]
|
||||
if isinstance(self.expires_at, Unset):
|
||||
expires_at = UNSET
|
||||
elif isinstance(self.expires_at, datetime.datetime):
|
||||
expires_at = self.expires_at.isoformat()
|
||||
else:
|
||||
expires_at = self.expires_at
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"name": name,
|
||||
"configuration": configuration,
|
||||
"monomode_testing_url": monomode_testing_url,
|
||||
"monomode_url": monomode_url,
|
||||
}
|
||||
)
|
||||
if expires_at is not UNSET:
|
||||
field_dict["expires_at"] = expires_at
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
files.append(("configuration", (None, str(self.configuration).encode(), "text/plain")))
|
||||
|
||||
files.append(("monomode_testing_url", (None, str(self.monomode_testing_url).encode(), "text/plain")))
|
||||
|
||||
files.append(("monomode_url", (None, str(self.monomode_url).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.expires_at, Unset):
|
||||
if isinstance(self.expires_at, datetime.datetime):
|
||||
files.append(("expires_at", (None, self.expires_at.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("expires_at", (None, str(self.expires_at).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
configuration = d.pop("configuration")
|
||||
|
||||
monomode_testing_url = d.pop("monomode_testing_url")
|
||||
|
||||
monomode_url = d.pop("monomode_url")
|
||||
|
||||
def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
expires_at_type_0 = isoparse(data)
|
||||
|
||||
return expires_at_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
||||
|
||||
access_management_place = cls(
|
||||
id=id,
|
||||
name=name,
|
||||
configuration=configuration,
|
||||
monomode_testing_url=monomode_testing_url,
|
||||
monomode_url=monomode_url,
|
||||
expires_at=expires_at,
|
||||
)
|
||||
|
||||
access_management_place.additional_properties = d
|
||||
return access_management_place
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AccountingInvoicesListStatus(str, Enum):
|
||||
CANCELLED = "cancelled"
|
||||
CREATED = "created"
|
||||
RESOLVED = "resolved"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,69 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="AddToBasketNodeExtraInfo")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddToBasketNodeExtraInfo:
|
||||
"""A serializer to be used exclusively inside the AddToBasketNodeExtraInfoGroupSerializer.
|
||||
This is used to specify which NodeExtraInfo you are submitting a value for, and the value itself in one go
|
||||
|
||||
Attributes:
|
||||
node_extra_info (int):
|
||||
value (str):
|
||||
"""
|
||||
|
||||
node_extra_info: int
|
||||
value: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
node_extra_info = self.node_extra_info
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"node_extra_info": node_extra_info,
|
||||
"value": value,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
node_extra_info = d.pop("node_extra_info")
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
add_to_basket_node_extra_info = cls(
|
||||
node_extra_info=node_extra_info,
|
||||
value=value,
|
||||
)
|
||||
|
||||
add_to_basket_node_extra_info.additional_properties = d
|
||||
return add_to_basket_node_extra_info
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.add_to_basket_node_extra_info import AddToBasketNodeExtraInfo
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddToBasketNodeExtraInfoGroup")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddToBasketNodeExtraInfoGroup:
|
||||
"""A serializer to be used exclusively inside the SelectedNodeCreationSerializer.
|
||||
This facilates submitting the values (responses) for all NodeExtraInfos of a NodeExtraInfoGroup in one go
|
||||
|
||||
Attributes:
|
||||
node_extra_infos (list['AddToBasketNodeExtraInfo']):
|
||||
node_extra_info_group (int):
|
||||
"""
|
||||
|
||||
node_extra_infos: list["AddToBasketNodeExtraInfo"]
|
||||
node_extra_info_group: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
node_extra_infos = []
|
||||
for node_extra_infos_item_data in self.node_extra_infos:
|
||||
node_extra_infos_item = node_extra_infos_item_data.to_dict()
|
||||
node_extra_infos.append(node_extra_infos_item)
|
||||
|
||||
node_extra_info_group = self.node_extra_info_group
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"node_extra_infos": node_extra_infos,
|
||||
"node_extra_info_group": node_extra_info_group,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.add_to_basket_node_extra_info import AddToBasketNodeExtraInfo
|
||||
|
||||
d = dict(src_dict)
|
||||
node_extra_infos = []
|
||||
_node_extra_infos = d.pop("node_extra_infos")
|
||||
for node_extra_infos_item_data in _node_extra_infos:
|
||||
node_extra_infos_item = AddToBasketNodeExtraInfo.from_dict(node_extra_infos_item_data)
|
||||
|
||||
node_extra_infos.append(node_extra_infos_item)
|
||||
|
||||
node_extra_info_group = d.pop("node_extra_info_group")
|
||||
|
||||
add_to_basket_node_extra_info_group = cls(
|
||||
node_extra_infos=node_extra_infos,
|
||||
node_extra_info_group=node_extra_info_group,
|
||||
)
|
||||
|
||||
add_to_basket_node_extra_info_group.additional_properties = d
|
||||
return add_to_basket_node_extra_info_group
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,125 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
T = TypeVar("T", bound="ApiToken")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ApiToken:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
user (Union[None, int]):
|
||||
frontend_logins (list[int]):
|
||||
is_automatic (bool): True if the token has been generated automatically
|
||||
name (str): Informative name, for you :)
|
||||
expiration (Union[None, datetime.datetime]): When the token should expire. Leave blank for an infinitely valid
|
||||
token (not recommended!)
|
||||
"""
|
||||
|
||||
id: int
|
||||
user: Union[None, int]
|
||||
frontend_logins: list[int]
|
||||
is_automatic: bool
|
||||
name: str
|
||||
expiration: Union[None, datetime.datetime]
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
user: Union[None, int]
|
||||
user = self.user
|
||||
|
||||
frontend_logins = self.frontend_logins
|
||||
|
||||
is_automatic = self.is_automatic
|
||||
|
||||
name = self.name
|
||||
|
||||
expiration: Union[None, str]
|
||||
if isinstance(self.expiration, datetime.datetime):
|
||||
expiration = self.expiration.isoformat()
|
||||
else:
|
||||
expiration = self.expiration
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"user": user,
|
||||
"frontend_logins": frontend_logins,
|
||||
"is_automatic": is_automatic,
|
||||
"name": name,
|
||||
"expiration": expiration,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
def _parse_user(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
user = _parse_user(d.pop("user"))
|
||||
|
||||
frontend_logins = cast(list[int], d.pop("frontend_logins"))
|
||||
|
||||
is_automatic = d.pop("is_automatic")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
def _parse_expiration(data: object) -> Union[None, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
expiration_type_0 = isoparse(data)
|
||||
|
||||
return expiration_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, datetime.datetime], data)
|
||||
|
||||
expiration = _parse_expiration(d.pop("expiration"))
|
||||
|
||||
api_token = cls(
|
||||
id=id,
|
||||
user=user,
|
||||
frontend_logins=frontend_logins,
|
||||
is_automatic=is_automatic,
|
||||
name=name,
|
||||
expiration=expiration,
|
||||
)
|
||||
|
||||
api_token.additional_properties = d
|
||||
return api_token
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,212 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="BillingInformation")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BillingInformation:
|
||||
"""Serializer for BillingInformation model
|
||||
Requires to be logged in as a user or to provide a frontend login associated with your request
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
email (str):
|
||||
user (Union[None, int]):
|
||||
frontendbasket_set (list[int]):
|
||||
first_name (Union[Unset, str]):
|
||||
last_name (Union[Unset, str]):
|
||||
address (Union[Unset, str]):
|
||||
postal_code (Union[Unset, str]):
|
||||
city (Union[Unset, str]):
|
||||
country (Union[Unset, str]):
|
||||
created_by (Union[None, Unset, int]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
email: str
|
||||
user: Union[None, int]
|
||||
frontendbasket_set: list[int]
|
||||
first_name: Union[Unset, str] = UNSET
|
||||
last_name: Union[Unset, str] = UNSET
|
||||
address: Union[Unset, str] = UNSET
|
||||
postal_code: Union[Unset, str] = UNSET
|
||||
city: Union[Unset, str] = UNSET
|
||||
country: Union[Unset, str] = UNSET
|
||||
created_by: Union[None, Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
email = self.email
|
||||
|
||||
user: Union[None, int]
|
||||
user = self.user
|
||||
|
||||
frontendbasket_set = self.frontendbasket_set
|
||||
|
||||
first_name = self.first_name
|
||||
|
||||
last_name = self.last_name
|
||||
|
||||
address = self.address
|
||||
|
||||
postal_code = self.postal_code
|
||||
|
||||
city = self.city
|
||||
|
||||
country = self.country
|
||||
|
||||
created_by: Union[None, Unset, int]
|
||||
if isinstance(self.created_by, Unset):
|
||||
created_by = UNSET
|
||||
else:
|
||||
created_by = self.created_by
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"email": email,
|
||||
"user": user,
|
||||
"frontendbasket_set": frontendbasket_set,
|
||||
}
|
||||
)
|
||||
if first_name is not UNSET:
|
||||
field_dict["first_name"] = first_name
|
||||
if last_name is not UNSET:
|
||||
field_dict["last_name"] = last_name
|
||||
if address is not UNSET:
|
||||
field_dict["address"] = address
|
||||
if postal_code is not UNSET:
|
||||
field_dict["postal_code"] = postal_code
|
||||
if city is not UNSET:
|
||||
field_dict["city"] = city
|
||||
if country is not UNSET:
|
||||
field_dict["country"] = country
|
||||
if created_by is not UNSET:
|
||||
field_dict["created_by"] = created_by
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("email", (None, str(self.email).encode(), "text/plain")))
|
||||
|
||||
if isinstance(self.user, int):
|
||||
files.append(("user", (None, str(self.user).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("user", (None, str(self.user).encode(), "text/plain")))
|
||||
|
||||
for frontendbasket_set_item_element in self.frontendbasket_set:
|
||||
files.append(("frontendbasket_set", (None, str(frontendbasket_set_item_element).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.first_name, Unset):
|
||||
files.append(("first_name", (None, str(self.first_name).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.last_name, Unset):
|
||||
files.append(("last_name", (None, str(self.last_name).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.address, Unset):
|
||||
files.append(("address", (None, str(self.address).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.postal_code, Unset):
|
||||
files.append(("postal_code", (None, str(self.postal_code).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.city, Unset):
|
||||
files.append(("city", (None, str(self.city).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.country, Unset):
|
||||
files.append(("country", (None, str(self.country).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.created_by, Unset):
|
||||
if isinstance(self.created_by, int):
|
||||
files.append(("created_by", (None, str(self.created_by).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("created_by", (None, str(self.created_by).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
email = d.pop("email")
|
||||
|
||||
def _parse_user(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
user = _parse_user(d.pop("user"))
|
||||
|
||||
frontendbasket_set = cast(list[int], d.pop("frontendbasket_set"))
|
||||
|
||||
first_name = d.pop("first_name", UNSET)
|
||||
|
||||
last_name = d.pop("last_name", UNSET)
|
||||
|
||||
address = d.pop("address", UNSET)
|
||||
|
||||
postal_code = d.pop("postal_code", UNSET)
|
||||
|
||||
city = d.pop("city", UNSET)
|
||||
|
||||
country = d.pop("country", UNSET)
|
||||
|
||||
def _parse_created_by(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
created_by = _parse_created_by(d.pop("created_by", UNSET))
|
||||
|
||||
billing_information = cls(
|
||||
id=id,
|
||||
email=email,
|
||||
user=user,
|
||||
frontendbasket_set=frontendbasket_set,
|
||||
first_name=first_name,
|
||||
last_name=last_name,
|
||||
address=address,
|
||||
postal_code=postal_code,
|
||||
city=city,
|
||||
country=country,
|
||||
created_by=created_by,
|
||||
)
|
||||
|
||||
billing_information.additional_properties = d
|
||||
return billing_information
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class BlankEnum(str, Enum):
|
||||
VALUE_0 = ""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,59 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="CancelError")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CancelError:
|
||||
"""
|
||||
Attributes:
|
||||
error (str): Error in case the payment intent was not in a cancellable state (paid or already cancelled).
|
||||
"""
|
||||
|
||||
error: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
error = self.error
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"error": error,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
error = d.pop("error")
|
||||
|
||||
cancel_error = cls(
|
||||
error=error,
|
||||
)
|
||||
|
||||
cancel_error.additional_properties = d
|
||||
return cancel_error
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CategoryEnum(str, Enum):
|
||||
ACCOMODATION = "accomodation"
|
||||
ACTIVITY = "activity"
|
||||
GROUP = "group"
|
||||
ITEM = "item"
|
||||
TICKET = "ticket"
|
||||
TYPE = "type"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,72 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="CompletionStarted")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CompletionStarted:
|
||||
"""Serializer for CompletionStartedViewSet
|
||||
|
||||
Attributes:
|
||||
basket_id (int): The ID of the frontend basket.
|
||||
"""
|
||||
|
||||
basket_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
basket_id = self.basket_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"basket_id": basket_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("basket_id", (None, str(self.basket_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
basket_id = d.pop("basket_id")
|
||||
|
||||
completion_started = cls(
|
||||
basket_id=basket_id,
|
||||
)
|
||||
|
||||
completion_started.additional_properties = d
|
||||
return completion_started
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,129 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..models.logical_operator_enum import LogicalOperatorEnum
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Condition")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Condition:
|
||||
"""Serializer (read/write) for `Condition` model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
logical_operator (LogicalOperatorEnum): * `or` - OR
|
||||
* `and` - AND
|
||||
name (Union[Unset, str]):
|
||||
is_implicit (Union[Unset, bool]): can store a combination of conditions as a single condition
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
logical_operator: LogicalOperatorEnum
|
||||
name: Union[Unset, str] = UNSET
|
||||
is_implicit: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
logical_operator = self.logical_operator.value
|
||||
|
||||
name = self.name
|
||||
|
||||
is_implicit = self.is_implicit
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"logical_operator": logical_operator,
|
||||
}
|
||||
)
|
||||
if name is not UNSET:
|
||||
field_dict["name"] = name
|
||||
if is_implicit is not UNSET:
|
||||
field_dict["is_implicit"] = is_implicit
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("logical_operator", (None, str(self.logical_operator.value).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.name, Unset):
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_implicit, Unset):
|
||||
files.append(("is_implicit", (None, str(self.is_implicit).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
logical_operator = LogicalOperatorEnum(d.pop("logical_operator"))
|
||||
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
is_implicit = d.pop("is_implicit", UNSET)
|
||||
|
||||
condition = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
logical_operator=logical_operator,
|
||||
name=name,
|
||||
is_implicit=is_implicit,
|
||||
)
|
||||
|
||||
condition.additional_properties = d
|
||||
return condition
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.confirmation_page_extra_text_configuration import ConfirmationPageExtraTextConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ConfirmationPageExtraTextActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ConfirmationPageExtraTextActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleCompletionConfirmationPageExtraText`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ConfirmationPageExtraTextConfiguration): Serializer for
|
||||
`ModuleCompletionConfirmationPageExtraTextConfiguration` nested in
|
||||
`ConfirmationPageExtraTextActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ConfirmationPageExtraTextConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.confirmation_page_extra_text_configuration import ConfirmationPageExtraTextConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ConfirmationPageExtraTextConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
confirmation_page_extra_text_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
confirmation_page_extra_text_active_module.additional_properties = d
|
||||
return confirmation_page_extra_text_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ConfirmationPageExtraTextConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ConfirmationPageExtraTextConfiguration:
|
||||
"""Serializer for `ModuleCompletionConfirmationPageExtraTextConfiguration` nested in
|
||||
`ConfirmationPageExtraTextActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
text (Union[Unset, str]): Text that is displayed on the order confirmation page. Some restricted HTML markup is
|
||||
allowed, everything else is filtered out automatically.
|
||||
image (Union[None, Unset, int]): The image used for the module
|
||||
is_text_used (Union[Unset, bool]):
|
||||
is_image_used (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
text: Union[Unset, str] = UNSET
|
||||
image: Union[None, Unset, int] = UNSET
|
||||
is_text_used: Union[Unset, bool] = UNSET
|
||||
is_image_used: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
text = self.text
|
||||
|
||||
image: Union[None, Unset, int]
|
||||
if isinstance(self.image, Unset):
|
||||
image = UNSET
|
||||
else:
|
||||
image = self.image
|
||||
|
||||
is_text_used = self.is_text_used
|
||||
|
||||
is_image_used = self.is_image_used
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
if text is not UNSET:
|
||||
field_dict["text"] = text
|
||||
if image is not UNSET:
|
||||
field_dict["image"] = image
|
||||
if is_text_used is not UNSET:
|
||||
field_dict["is_text_used"] = is_text_used
|
||||
if is_image_used is not UNSET:
|
||||
field_dict["is_image_used"] = is_image_used
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
text = d.pop("text", UNSET)
|
||||
|
||||
def _parse_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
image = _parse_image(d.pop("image", UNSET))
|
||||
|
||||
is_text_used = d.pop("is_text_used", UNSET)
|
||||
|
||||
is_image_used = d.pop("is_image_used", UNSET)
|
||||
|
||||
confirmation_page_extra_text_configuration = cls(
|
||||
id=id,
|
||||
text=text,
|
||||
image=image,
|
||||
is_text_used=is_text_used,
|
||||
is_image_used=is_image_used,
|
||||
)
|
||||
|
||||
confirmation_page_extra_text_configuration.additional_properties = d
|
||||
return confirmation_page_extra_text_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CoreUnitmembershipsListRole(str, Enum):
|
||||
MEMBER = "member"
|
||||
OWNER = "owner"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,86 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateAnonymousLogin")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CreateAnonymousLogin:
|
||||
"""Serializer used for AnonymousLogin creation.
|
||||
Adds `testing` (default to False) in data if not given.
|
||||
|
||||
Attributes:
|
||||
active_module_id (int):
|
||||
testing (Union[Unset, bool]): Default: False.
|
||||
"""
|
||||
|
||||
active_module_id: int
|
||||
testing: Union[Unset, bool] = False
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
active_module_id = self.active_module_id
|
||||
|
||||
testing = self.testing
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"active_module_id": active_module_id,
|
||||
}
|
||||
)
|
||||
if testing is not UNSET:
|
||||
field_dict["testing"] = testing
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("active_module_id", (None, str(self.active_module_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.testing, Unset):
|
||||
files.append(("testing", (None, str(self.testing).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
active_module_id = d.pop("active_module_id")
|
||||
|
||||
testing = d.pop("testing", UNSET)
|
||||
|
||||
create_anonymous_login = cls(
|
||||
active_module_id=active_module_id,
|
||||
testing=testing,
|
||||
)
|
||||
|
||||
create_anonymous_login.additional_properties = d
|
||||
return create_anonymous_login
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,96 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateTrustedEmailLogin")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CreateTrustedEmailLogin:
|
||||
"""Serializer used for TrustedEmailLogin creation.
|
||||
Adds `testing` (default to False) in data if not given and forces `email` to be provided.
|
||||
|
||||
Attributes:
|
||||
active_module_id (int):
|
||||
email (str):
|
||||
testing (Union[Unset, bool]): Default: False.
|
||||
"""
|
||||
|
||||
active_module_id: int
|
||||
email: str
|
||||
testing: Union[Unset, bool] = False
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
active_module_id = self.active_module_id
|
||||
|
||||
email = self.email
|
||||
|
||||
testing = self.testing
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"active_module_id": active_module_id,
|
||||
"email": email,
|
||||
}
|
||||
)
|
||||
if testing is not UNSET:
|
||||
field_dict["testing"] = testing
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("active_module_id", (None, str(self.active_module_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("email", (None, str(self.email).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.testing, Unset):
|
||||
files.append(("testing", (None, str(self.testing).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
active_module_id = d.pop("active_module_id")
|
||||
|
||||
email = d.pop("email")
|
||||
|
||||
testing = d.pop("testing", UNSET)
|
||||
|
||||
create_trusted_email_login = cls(
|
||||
active_module_id=active_module_id,
|
||||
email=email,
|
||||
testing=testing,
|
||||
)
|
||||
|
||||
create_trusted_email_login.additional_properties = d
|
||||
return create_trusted_email_login
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,105 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..models.document_type_enum import DocumentTypeEnum
|
||||
|
||||
T = TypeVar("T", bound="Document")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Document:
|
||||
"""Serializer for `Document` model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
is_active (bool):
|
||||
type_ (DocumentTypeEnum): * `privacy_policy` - Privacy policy
|
||||
* `terms_of_service` - Terms of service
|
||||
* `imprint` - Imprint
|
||||
file (str):
|
||||
"""
|
||||
|
||||
id: int
|
||||
is_active: bool
|
||||
type_: DocumentTypeEnum
|
||||
file: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
is_active = self.is_active
|
||||
|
||||
type_ = self.type_.value
|
||||
|
||||
file = self.file
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"is_active": is_active,
|
||||
"type": type_,
|
||||
"file": file,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("is_active", (None, str(self.is_active).encode(), "text/plain")))
|
||||
|
||||
files.append(("type", (None, str(self.type_.value).encode(), "text/plain")))
|
||||
|
||||
files.append(("file", (None, str(self.file).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
is_active = d.pop("is_active")
|
||||
|
||||
type_ = DocumentTypeEnum(d.pop("type"))
|
||||
|
||||
file = d.pop("file")
|
||||
|
||||
document = cls(
|
||||
id=id,
|
||||
is_active=is_active,
|
||||
type_=type_,
|
||||
file=file,
|
||||
)
|
||||
|
||||
document.additional_properties = d
|
||||
return document
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class DocumentTypeEnum(str, Enum):
|
||||
IMPRINT = "imprint"
|
||||
PRIVACY_POLICY = "privacy_policy"
|
||||
TERMS_OF_SERVICE = "terms_of_service"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,708 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from .. import types
|
||||
from ..models.event_status_enum import EventStatusEnum
|
||||
from ..models.moderation_status_enum import ModerationStatusEnum
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Event")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Event:
|
||||
"""Serializer for Node model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
unit_id (int):
|
||||
name (str):
|
||||
moderation_status (ModerationStatusEnum): * `not_requested` - Not requested
|
||||
* `requested` - Requested
|
||||
* `change_requested` - Change requested
|
||||
* `validated` - Validated
|
||||
are_registrations_allowed (bool):
|
||||
are_payments_allowed (bool):
|
||||
frontend_title (str): Main name of the event shown to end users. I.e. shown on the Ticket Office webpage
|
||||
frontend_path (str): Root of public path of the event url
|
||||
location_address (str):
|
||||
ticket_office_url (str):
|
||||
ticket_office_testing_url (str):
|
||||
is_status_public (bool):
|
||||
status (Union[Unset, EventStatusEnum]): * `draft` - Draft
|
||||
* `public` - Public
|
||||
* `closed` - Closed (force)
|
||||
* `archived` - Archived
|
||||
registrations_start_date (Union[None, Unset, datetime.datetime]):
|
||||
payments_start_date (Union[None, Unset, datetime.datetime]):
|
||||
payments_end_date (Union[None, Unset, datetime.datetime]):
|
||||
closed_start_date (Union[None, Unset, datetime.date]):
|
||||
registrations_end_date (Union[None, Unset, datetime.datetime]):
|
||||
start_date (Union[None, Unset, datetime.datetime]):
|
||||
end_date (Union[None, Unset, datetime.datetime]):
|
||||
custom_key (Union[Unset, str]):
|
||||
welcome_text (Union[Unset, str]): Welcome text displayed on the Ticket Office event page. Some restricted HTML
|
||||
markup is allowed, everything else is filtered out automatically.
|
||||
frontend_url (Union[Unset, str]): External url provided by the organizer. I.e. their website or social media
|
||||
page
|
||||
frontend_organizers (Union[Unset, str]): Name of the organizer, displayed on the Ticket Office event page
|
||||
multiple_registration_per_login (Union[Unset, bool]):
|
||||
user_nickname_enabled (Union[Unset, bool]):
|
||||
user_registration_link_unique (Union[Unset, bool]):
|
||||
description_header_image (Union[None, Unset, int]):
|
||||
terms_of_service (Union[Unset, str]):
|
||||
location_text (Union[Unset, str]):
|
||||
location (Union[None, Unset, str]):
|
||||
is_public_visible (Union[Unset, bool]):
|
||||
is_unit_visible (Union[Unset, bool]):
|
||||
is_basket_item_modification_allowed (Union[Unset, bool]): This field informs the front end on what actions
|
||||
should be allowed or prevented, in the front end only.
|
||||
is_in_lausanne (Union[Unset, bool]): if the event physically takes place in the city of Lausanne, set this
|
||||
boolean so that taxes are calculated properly
|
||||
"""
|
||||
|
||||
id: int
|
||||
unit_id: int
|
||||
name: str
|
||||
moderation_status: ModerationStatusEnum
|
||||
are_registrations_allowed: bool
|
||||
are_payments_allowed: bool
|
||||
frontend_title: str
|
||||
frontend_path: str
|
||||
location_address: str
|
||||
ticket_office_url: str
|
||||
ticket_office_testing_url: str
|
||||
is_status_public: bool
|
||||
status: Union[Unset, EventStatusEnum] = UNSET
|
||||
registrations_start_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
payments_start_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
payments_end_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
closed_start_date: Union[None, Unset, datetime.date] = UNSET
|
||||
registrations_end_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
start_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
end_date: Union[None, Unset, datetime.datetime] = UNSET
|
||||
custom_key: Union[Unset, str] = UNSET
|
||||
welcome_text: Union[Unset, str] = UNSET
|
||||
frontend_url: Union[Unset, str] = UNSET
|
||||
frontend_organizers: Union[Unset, str] = UNSET
|
||||
multiple_registration_per_login: Union[Unset, bool] = UNSET
|
||||
user_nickname_enabled: Union[Unset, bool] = UNSET
|
||||
user_registration_link_unique: Union[Unset, bool] = UNSET
|
||||
description_header_image: Union[None, Unset, int] = UNSET
|
||||
terms_of_service: Union[Unset, str] = UNSET
|
||||
location_text: Union[Unset, str] = UNSET
|
||||
location: Union[None, Unset, str] = UNSET
|
||||
is_public_visible: Union[Unset, bool] = UNSET
|
||||
is_unit_visible: Union[Unset, bool] = UNSET
|
||||
is_basket_item_modification_allowed: Union[Unset, bool] = UNSET
|
||||
is_in_lausanne: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
unit_id = self.unit_id
|
||||
|
||||
name = self.name
|
||||
|
||||
moderation_status = self.moderation_status.value
|
||||
|
||||
are_registrations_allowed = self.are_registrations_allowed
|
||||
|
||||
are_payments_allowed = self.are_payments_allowed
|
||||
|
||||
frontend_title = self.frontend_title
|
||||
|
||||
frontend_path = self.frontend_path
|
||||
|
||||
location_address = self.location_address
|
||||
|
||||
ticket_office_url = self.ticket_office_url
|
||||
|
||||
ticket_office_testing_url = self.ticket_office_testing_url
|
||||
|
||||
is_status_public = self.is_status_public
|
||||
|
||||
status: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status.value
|
||||
|
||||
registrations_start_date: Union[None, Unset, str]
|
||||
if isinstance(self.registrations_start_date, Unset):
|
||||
registrations_start_date = UNSET
|
||||
elif isinstance(self.registrations_start_date, datetime.datetime):
|
||||
registrations_start_date = self.registrations_start_date.isoformat()
|
||||
else:
|
||||
registrations_start_date = self.registrations_start_date
|
||||
|
||||
payments_start_date: Union[None, Unset, str]
|
||||
if isinstance(self.payments_start_date, Unset):
|
||||
payments_start_date = UNSET
|
||||
elif isinstance(self.payments_start_date, datetime.datetime):
|
||||
payments_start_date = self.payments_start_date.isoformat()
|
||||
else:
|
||||
payments_start_date = self.payments_start_date
|
||||
|
||||
payments_end_date: Union[None, Unset, str]
|
||||
if isinstance(self.payments_end_date, Unset):
|
||||
payments_end_date = UNSET
|
||||
elif isinstance(self.payments_end_date, datetime.datetime):
|
||||
payments_end_date = self.payments_end_date.isoformat()
|
||||
else:
|
||||
payments_end_date = self.payments_end_date
|
||||
|
||||
closed_start_date: Union[None, Unset, str]
|
||||
if isinstance(self.closed_start_date, Unset):
|
||||
closed_start_date = UNSET
|
||||
elif isinstance(self.closed_start_date, datetime.date):
|
||||
closed_start_date = self.closed_start_date.isoformat()
|
||||
else:
|
||||
closed_start_date = self.closed_start_date
|
||||
|
||||
registrations_end_date: Union[None, Unset, str]
|
||||
if isinstance(self.registrations_end_date, Unset):
|
||||
registrations_end_date = UNSET
|
||||
elif isinstance(self.registrations_end_date, datetime.datetime):
|
||||
registrations_end_date = self.registrations_end_date.isoformat()
|
||||
else:
|
||||
registrations_end_date = self.registrations_end_date
|
||||
|
||||
start_date: Union[None, Unset, str]
|
||||
if isinstance(self.start_date, Unset):
|
||||
start_date = UNSET
|
||||
elif isinstance(self.start_date, datetime.datetime):
|
||||
start_date = self.start_date.isoformat()
|
||||
else:
|
||||
start_date = self.start_date
|
||||
|
||||
end_date: Union[None, Unset, str]
|
||||
if isinstance(self.end_date, Unset):
|
||||
end_date = UNSET
|
||||
elif isinstance(self.end_date, datetime.datetime):
|
||||
end_date = self.end_date.isoformat()
|
||||
else:
|
||||
end_date = self.end_date
|
||||
|
||||
custom_key = self.custom_key
|
||||
|
||||
welcome_text = self.welcome_text
|
||||
|
||||
frontend_url = self.frontend_url
|
||||
|
||||
frontend_organizers = self.frontend_organizers
|
||||
|
||||
multiple_registration_per_login = self.multiple_registration_per_login
|
||||
|
||||
user_nickname_enabled = self.user_nickname_enabled
|
||||
|
||||
user_registration_link_unique = self.user_registration_link_unique
|
||||
|
||||
description_header_image: Union[None, Unset, int]
|
||||
if isinstance(self.description_header_image, Unset):
|
||||
description_header_image = UNSET
|
||||
else:
|
||||
description_header_image = self.description_header_image
|
||||
|
||||
terms_of_service = self.terms_of_service
|
||||
|
||||
location_text = self.location_text
|
||||
|
||||
location: Union[None, Unset, str]
|
||||
if isinstance(self.location, Unset):
|
||||
location = UNSET
|
||||
else:
|
||||
location = self.location
|
||||
|
||||
is_public_visible = self.is_public_visible
|
||||
|
||||
is_unit_visible = self.is_unit_visible
|
||||
|
||||
is_basket_item_modification_allowed = self.is_basket_item_modification_allowed
|
||||
|
||||
is_in_lausanne = self.is_in_lausanne
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"unit_id": unit_id,
|
||||
"name": name,
|
||||
"moderation_status": moderation_status,
|
||||
"are_registrations_allowed": are_registrations_allowed,
|
||||
"are_payments_allowed": are_payments_allowed,
|
||||
"frontend_title": frontend_title,
|
||||
"frontend_path": frontend_path,
|
||||
"location_address": location_address,
|
||||
"ticket_office_url": ticket_office_url,
|
||||
"ticket_office_testing_url": ticket_office_testing_url,
|
||||
"is_status_public": is_status_public,
|
||||
}
|
||||
)
|
||||
if status is not UNSET:
|
||||
field_dict["status"] = status
|
||||
if registrations_start_date is not UNSET:
|
||||
field_dict["registrations_start_date"] = registrations_start_date
|
||||
if payments_start_date is not UNSET:
|
||||
field_dict["payments_start_date"] = payments_start_date
|
||||
if payments_end_date is not UNSET:
|
||||
field_dict["payments_end_date"] = payments_end_date
|
||||
if closed_start_date is not UNSET:
|
||||
field_dict["closed_start_date"] = closed_start_date
|
||||
if registrations_end_date is not UNSET:
|
||||
field_dict["registrations_end_date"] = registrations_end_date
|
||||
if start_date is not UNSET:
|
||||
field_dict["start_date"] = start_date
|
||||
if end_date is not UNSET:
|
||||
field_dict["end_date"] = end_date
|
||||
if custom_key is not UNSET:
|
||||
field_dict["custom_key"] = custom_key
|
||||
if welcome_text is not UNSET:
|
||||
field_dict["welcome_text"] = welcome_text
|
||||
if frontend_url is not UNSET:
|
||||
field_dict["frontend_url"] = frontend_url
|
||||
if frontend_organizers is not UNSET:
|
||||
field_dict["frontend_organizers"] = frontend_organizers
|
||||
if multiple_registration_per_login is not UNSET:
|
||||
field_dict["multiple_registration_per_login"] = multiple_registration_per_login
|
||||
if user_nickname_enabled is not UNSET:
|
||||
field_dict["user_nickname_enabled"] = user_nickname_enabled
|
||||
if user_registration_link_unique is not UNSET:
|
||||
field_dict["user_registration_link_unique"] = user_registration_link_unique
|
||||
if description_header_image is not UNSET:
|
||||
field_dict["description_header_image"] = description_header_image
|
||||
if terms_of_service is not UNSET:
|
||||
field_dict["terms_of_service"] = terms_of_service
|
||||
if location_text is not UNSET:
|
||||
field_dict["location_text"] = location_text
|
||||
if location is not UNSET:
|
||||
field_dict["location"] = location
|
||||
if is_public_visible is not UNSET:
|
||||
field_dict["is_public_visible"] = is_public_visible
|
||||
if is_unit_visible is not UNSET:
|
||||
field_dict["is_unit_visible"] = is_unit_visible
|
||||
if is_basket_item_modification_allowed is not UNSET:
|
||||
field_dict["is_basket_item_modification_allowed"] = is_basket_item_modification_allowed
|
||||
if is_in_lausanne is not UNSET:
|
||||
field_dict["is_in_lausanne"] = is_in_lausanne
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("unit_id", (None, str(self.unit_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
files.append(("moderation_status", (None, str(self.moderation_status.value).encode(), "text/plain")))
|
||||
|
||||
files.append(("are_registrations_allowed", (None, str(self.are_registrations_allowed).encode(), "text/plain")))
|
||||
|
||||
files.append(("are_payments_allowed", (None, str(self.are_payments_allowed).encode(), "text/plain")))
|
||||
|
||||
files.append(("frontend_title", (None, str(self.frontend_title).encode(), "text/plain")))
|
||||
|
||||
files.append(("frontend_path", (None, str(self.frontend_path).encode(), "text/plain")))
|
||||
|
||||
files.append(("location_address", (None, str(self.location_address).encode(), "text/plain")))
|
||||
|
||||
files.append(("ticket_office_url", (None, str(self.ticket_office_url).encode(), "text/plain")))
|
||||
|
||||
files.append(("ticket_office_testing_url", (None, str(self.ticket_office_testing_url).encode(), "text/plain")))
|
||||
|
||||
files.append(("is_status_public", (None, str(self.is_status_public).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.status, Unset):
|
||||
files.append(("status", (None, str(self.status.value).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.registrations_start_date, Unset):
|
||||
if isinstance(self.registrations_start_date, datetime.datetime):
|
||||
files.append(
|
||||
(
|
||||
"registrations_start_date",
|
||||
(None, self.registrations_start_date.isoformat().encode(), "text/plain"),
|
||||
)
|
||||
)
|
||||
else:
|
||||
files.append(
|
||||
("registrations_start_date", (None, str(self.registrations_start_date).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.payments_start_date, Unset):
|
||||
if isinstance(self.payments_start_date, datetime.datetime):
|
||||
files.append(
|
||||
("payments_start_date", (None, self.payments_start_date.isoformat().encode(), "text/plain"))
|
||||
)
|
||||
else:
|
||||
files.append(("payments_start_date", (None, str(self.payments_start_date).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.payments_end_date, Unset):
|
||||
if isinstance(self.payments_end_date, datetime.datetime):
|
||||
files.append(("payments_end_date", (None, self.payments_end_date.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("payments_end_date", (None, str(self.payments_end_date).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.closed_start_date, Unset):
|
||||
if isinstance(self.closed_start_date, datetime.date):
|
||||
files.append(("closed_start_date", (None, self.closed_start_date.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("closed_start_date", (None, str(self.closed_start_date).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.registrations_end_date, Unset):
|
||||
if isinstance(self.registrations_end_date, datetime.datetime):
|
||||
files.append(
|
||||
("registrations_end_date", (None, self.registrations_end_date.isoformat().encode(), "text/plain"))
|
||||
)
|
||||
else:
|
||||
files.append(
|
||||
("registrations_end_date", (None, str(self.registrations_end_date).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.start_date, Unset):
|
||||
if isinstance(self.start_date, datetime.datetime):
|
||||
files.append(("start_date", (None, self.start_date.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("start_date", (None, str(self.start_date).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.end_date, Unset):
|
||||
if isinstance(self.end_date, datetime.datetime):
|
||||
files.append(("end_date", (None, self.end_date.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("end_date", (None, str(self.end_date).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.custom_key, Unset):
|
||||
files.append(("custom_key", (None, str(self.custom_key).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.welcome_text, Unset):
|
||||
files.append(("welcome_text", (None, str(self.welcome_text).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.frontend_url, Unset):
|
||||
files.append(("frontend_url", (None, str(self.frontend_url).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.frontend_organizers, Unset):
|
||||
files.append(("frontend_organizers", (None, str(self.frontend_organizers).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.multiple_registration_per_login, Unset):
|
||||
files.append(
|
||||
(
|
||||
"multiple_registration_per_login",
|
||||
(None, str(self.multiple_registration_per_login).encode(), "text/plain"),
|
||||
)
|
||||
)
|
||||
|
||||
if not isinstance(self.user_nickname_enabled, Unset):
|
||||
files.append(("user_nickname_enabled", (None, str(self.user_nickname_enabled).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.user_registration_link_unique, Unset):
|
||||
files.append(
|
||||
(
|
||||
"user_registration_link_unique",
|
||||
(None, str(self.user_registration_link_unique).encode(), "text/plain"),
|
||||
)
|
||||
)
|
||||
|
||||
if not isinstance(self.description_header_image, Unset):
|
||||
if isinstance(self.description_header_image, int):
|
||||
files.append(
|
||||
("description_header_image", (None, str(self.description_header_image).encode(), "text/plain"))
|
||||
)
|
||||
else:
|
||||
files.append(
|
||||
("description_header_image", (None, str(self.description_header_image).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.terms_of_service, Unset):
|
||||
files.append(("terms_of_service", (None, str(self.terms_of_service).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.location_text, Unset):
|
||||
files.append(("location_text", (None, str(self.location_text).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.location, Unset):
|
||||
if isinstance(self.location, str):
|
||||
files.append(("location", (None, str(self.location).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("location", (None, str(self.location).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_public_visible, Unset):
|
||||
files.append(("is_public_visible", (None, str(self.is_public_visible).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_unit_visible, Unset):
|
||||
files.append(("is_unit_visible", (None, str(self.is_unit_visible).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_basket_item_modification_allowed, Unset):
|
||||
files.append(
|
||||
(
|
||||
"is_basket_item_modification_allowed",
|
||||
(None, str(self.is_basket_item_modification_allowed).encode(), "text/plain"),
|
||||
)
|
||||
)
|
||||
|
||||
if not isinstance(self.is_in_lausanne, Unset):
|
||||
files.append(("is_in_lausanne", (None, str(self.is_in_lausanne).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
unit_id = d.pop("unit_id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
moderation_status = ModerationStatusEnum(d.pop("moderation_status"))
|
||||
|
||||
are_registrations_allowed = d.pop("are_registrations_allowed")
|
||||
|
||||
are_payments_allowed = d.pop("are_payments_allowed")
|
||||
|
||||
frontend_title = d.pop("frontend_title")
|
||||
|
||||
frontend_path = d.pop("frontend_path")
|
||||
|
||||
location_address = d.pop("location_address")
|
||||
|
||||
ticket_office_url = d.pop("ticket_office_url")
|
||||
|
||||
ticket_office_testing_url = d.pop("ticket_office_testing_url")
|
||||
|
||||
is_status_public = d.pop("is_status_public")
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, EventStatusEnum]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = EventStatusEnum(_status)
|
||||
|
||||
def _parse_registrations_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
registrations_start_date_type_0 = isoparse(data)
|
||||
|
||||
return registrations_start_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
registrations_start_date = _parse_registrations_start_date(d.pop("registrations_start_date", UNSET))
|
||||
|
||||
def _parse_payments_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
payments_start_date_type_0 = isoparse(data)
|
||||
|
||||
return payments_start_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
payments_start_date = _parse_payments_start_date(d.pop("payments_start_date", UNSET))
|
||||
|
||||
def _parse_payments_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
payments_end_date_type_0 = isoparse(data)
|
||||
|
||||
return payments_end_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
payments_end_date = _parse_payments_end_date(d.pop("payments_end_date", UNSET))
|
||||
|
||||
def _parse_closed_start_date(data: object) -> Union[None, Unset, datetime.date]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
closed_start_date_type_0 = isoparse(data).date()
|
||||
|
||||
return closed_start_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.date], data)
|
||||
|
||||
closed_start_date = _parse_closed_start_date(d.pop("closed_start_date", UNSET))
|
||||
|
||||
def _parse_registrations_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
registrations_end_date_type_0 = isoparse(data)
|
||||
|
||||
return registrations_end_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
registrations_end_date = _parse_registrations_end_date(d.pop("registrations_end_date", UNSET))
|
||||
|
||||
def _parse_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
start_date_type_0 = isoparse(data)
|
||||
|
||||
return start_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
start_date = _parse_start_date(d.pop("start_date", UNSET))
|
||||
|
||||
def _parse_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
end_date_type_0 = isoparse(data)
|
||||
|
||||
return end_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
end_date = _parse_end_date(d.pop("end_date", UNSET))
|
||||
|
||||
custom_key = d.pop("custom_key", UNSET)
|
||||
|
||||
welcome_text = d.pop("welcome_text", UNSET)
|
||||
|
||||
frontend_url = d.pop("frontend_url", UNSET)
|
||||
|
||||
frontend_organizers = d.pop("frontend_organizers", UNSET)
|
||||
|
||||
multiple_registration_per_login = d.pop("multiple_registration_per_login", UNSET)
|
||||
|
||||
user_nickname_enabled = d.pop("user_nickname_enabled", UNSET)
|
||||
|
||||
user_registration_link_unique = d.pop("user_registration_link_unique", UNSET)
|
||||
|
||||
def _parse_description_header_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
description_header_image = _parse_description_header_image(d.pop("description_header_image", UNSET))
|
||||
|
||||
terms_of_service = d.pop("terms_of_service", UNSET)
|
||||
|
||||
location_text = d.pop("location_text", UNSET)
|
||||
|
||||
def _parse_location(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
location = _parse_location(d.pop("location", UNSET))
|
||||
|
||||
is_public_visible = d.pop("is_public_visible", UNSET)
|
||||
|
||||
is_unit_visible = d.pop("is_unit_visible", UNSET)
|
||||
|
||||
is_basket_item_modification_allowed = d.pop("is_basket_item_modification_allowed", UNSET)
|
||||
|
||||
is_in_lausanne = d.pop("is_in_lausanne", UNSET)
|
||||
|
||||
event = cls(
|
||||
id=id,
|
||||
unit_id=unit_id,
|
||||
name=name,
|
||||
moderation_status=moderation_status,
|
||||
are_registrations_allowed=are_registrations_allowed,
|
||||
are_payments_allowed=are_payments_allowed,
|
||||
frontend_title=frontend_title,
|
||||
frontend_path=frontend_path,
|
||||
location_address=location_address,
|
||||
ticket_office_url=ticket_office_url,
|
||||
ticket_office_testing_url=ticket_office_testing_url,
|
||||
is_status_public=is_status_public,
|
||||
status=status,
|
||||
registrations_start_date=registrations_start_date,
|
||||
payments_start_date=payments_start_date,
|
||||
payments_end_date=payments_end_date,
|
||||
closed_start_date=closed_start_date,
|
||||
registrations_end_date=registrations_end_date,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
custom_key=custom_key,
|
||||
welcome_text=welcome_text,
|
||||
frontend_url=frontend_url,
|
||||
frontend_organizers=frontend_organizers,
|
||||
multiple_registration_per_login=multiple_registration_per_login,
|
||||
user_nickname_enabled=user_nickname_enabled,
|
||||
user_registration_link_unique=user_registration_link_unique,
|
||||
description_header_image=description_header_image,
|
||||
terms_of_service=terms_of_service,
|
||||
location_text=location_text,
|
||||
location=location,
|
||||
is_public_visible=is_public_visible,
|
||||
is_unit_visible=is_unit_visible,
|
||||
is_basket_item_modification_allowed=is_basket_item_modification_allowed,
|
||||
is_in_lausanne=is_in_lausanne,
|
||||
)
|
||||
|
||||
event.additional_properties = d
|
||||
return event
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,86 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="EventModeration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventModeration:
|
||||
"""Write only serializer, used by admin to validate an event.
|
||||
|
||||
Attributes:
|
||||
is_valid (bool): Whether the event is deemed valid by an admin.
|
||||
required_changes (Union[Unset, str]): Short description of what the user should modify on his event, so we can
|
||||
publish it.
|
||||
"""
|
||||
|
||||
is_valid: bool
|
||||
required_changes: Union[Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
is_valid = self.is_valid
|
||||
|
||||
required_changes = self.required_changes
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"is_valid": is_valid,
|
||||
}
|
||||
)
|
||||
if required_changes is not UNSET:
|
||||
field_dict["required_changes"] = required_changes
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("is_valid", (None, str(self.is_valid).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.required_changes, Unset):
|
||||
files.append(("required_changes", (None, str(self.required_changes).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
is_valid = d.pop("is_valid")
|
||||
|
||||
required_changes = d.pop("required_changes", UNSET)
|
||||
|
||||
event_moderation = cls(
|
||||
is_valid=is_valid,
|
||||
required_changes=required_changes,
|
||||
)
|
||||
|
||||
event_moderation.additional_properties = d
|
||||
return event_moderation
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,221 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
T = TypeVar("T", bound="EventPublicInfos")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventPublicInfos:
|
||||
"""Serializer for the public infos endpoint
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
are_registrations_allowed (bool):
|
||||
are_payments_allowed (bool):
|
||||
welcome_text (str): Welcome text displayed on the Ticket Office event page
|
||||
frontend_url (str): External url provided by the organizer. I.e. their website or social media page
|
||||
frontend_title (str): Main name of the event shown to end users. I.e. shown on the Ticket Office webpage
|
||||
frontend_organizers (str): Name of the organizer, displayed on the Ticket Office event page
|
||||
description_header_image (Union[None, int]):
|
||||
start_date (Union[None, datetime.datetime]):
|
||||
end_date (Union[None, datetime.datetime]):
|
||||
location_text (str):
|
||||
location (Union[None, str]):
|
||||
location_address (str):
|
||||
is_basket_item_modification_allowed (bool): This field informs the front end on what actions should be allowed
|
||||
or prevented, in the front end only.
|
||||
is_status_public (bool):
|
||||
"""
|
||||
|
||||
id: int
|
||||
are_registrations_allowed: bool
|
||||
are_payments_allowed: bool
|
||||
welcome_text: str
|
||||
frontend_url: str
|
||||
frontend_title: str
|
||||
frontend_organizers: str
|
||||
description_header_image: Union[None, int]
|
||||
start_date: Union[None, datetime.datetime]
|
||||
end_date: Union[None, datetime.datetime]
|
||||
location_text: str
|
||||
location: Union[None, str]
|
||||
location_address: str
|
||||
is_basket_item_modification_allowed: bool
|
||||
is_status_public: bool
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
are_registrations_allowed = self.are_registrations_allowed
|
||||
|
||||
are_payments_allowed = self.are_payments_allowed
|
||||
|
||||
welcome_text = self.welcome_text
|
||||
|
||||
frontend_url = self.frontend_url
|
||||
|
||||
frontend_title = self.frontend_title
|
||||
|
||||
frontend_organizers = self.frontend_organizers
|
||||
|
||||
description_header_image: Union[None, int]
|
||||
description_header_image = self.description_header_image
|
||||
|
||||
start_date: Union[None, str]
|
||||
if isinstance(self.start_date, datetime.datetime):
|
||||
start_date = self.start_date.isoformat()
|
||||
else:
|
||||
start_date = self.start_date
|
||||
|
||||
end_date: Union[None, str]
|
||||
if isinstance(self.end_date, datetime.datetime):
|
||||
end_date = self.end_date.isoformat()
|
||||
else:
|
||||
end_date = self.end_date
|
||||
|
||||
location_text = self.location_text
|
||||
|
||||
location: Union[None, str]
|
||||
location = self.location
|
||||
|
||||
location_address = self.location_address
|
||||
|
||||
is_basket_item_modification_allowed = self.is_basket_item_modification_allowed
|
||||
|
||||
is_status_public = self.is_status_public
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"are_registrations_allowed": are_registrations_allowed,
|
||||
"are_payments_allowed": are_payments_allowed,
|
||||
"welcome_text": welcome_text,
|
||||
"frontend_url": frontend_url,
|
||||
"frontend_title": frontend_title,
|
||||
"frontend_organizers": frontend_organizers,
|
||||
"description_header_image": description_header_image,
|
||||
"start_date": start_date,
|
||||
"end_date": end_date,
|
||||
"location_text": location_text,
|
||||
"location": location,
|
||||
"location_address": location_address,
|
||||
"is_basket_item_modification_allowed": is_basket_item_modification_allowed,
|
||||
"is_status_public": is_status_public,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
are_registrations_allowed = d.pop("are_registrations_allowed")
|
||||
|
||||
are_payments_allowed = d.pop("are_payments_allowed")
|
||||
|
||||
welcome_text = d.pop("welcome_text")
|
||||
|
||||
frontend_url = d.pop("frontend_url")
|
||||
|
||||
frontend_title = d.pop("frontend_title")
|
||||
|
||||
frontend_organizers = d.pop("frontend_organizers")
|
||||
|
||||
def _parse_description_header_image(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
description_header_image = _parse_description_header_image(d.pop("description_header_image"))
|
||||
|
||||
def _parse_start_date(data: object) -> Union[None, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
start_date_type_0 = isoparse(data)
|
||||
|
||||
return start_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, datetime.datetime], data)
|
||||
|
||||
start_date = _parse_start_date(d.pop("start_date"))
|
||||
|
||||
def _parse_end_date(data: object) -> Union[None, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
end_date_type_0 = isoparse(data)
|
||||
|
||||
return end_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, datetime.datetime], data)
|
||||
|
||||
end_date = _parse_end_date(d.pop("end_date"))
|
||||
|
||||
location_text = d.pop("location_text")
|
||||
|
||||
def _parse_location(data: object) -> Union[None, str]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, str], data)
|
||||
|
||||
location = _parse_location(d.pop("location"))
|
||||
|
||||
location_address = d.pop("location_address")
|
||||
|
||||
is_basket_item_modification_allowed = d.pop("is_basket_item_modification_allowed")
|
||||
|
||||
is_status_public = d.pop("is_status_public")
|
||||
|
||||
event_public_infos = cls(
|
||||
id=id,
|
||||
are_registrations_allowed=are_registrations_allowed,
|
||||
are_payments_allowed=are_payments_allowed,
|
||||
welcome_text=welcome_text,
|
||||
frontend_url=frontend_url,
|
||||
frontend_title=frontend_title,
|
||||
frontend_organizers=frontend_organizers,
|
||||
description_header_image=description_header_image,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
location_text=location_text,
|
||||
location=location,
|
||||
location_address=location_address,
|
||||
is_basket_item_modification_allowed=is_basket_item_modification_allowed,
|
||||
is_status_public=is_status_public,
|
||||
)
|
||||
|
||||
event_public_infos.additional_properties = d
|
||||
return event_public_infos
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,108 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.event_statistics_invoices_refunded import EventStatisticsInvoicesRefunded
|
||||
from ..models.event_statistics_invoices_refunded_value import EventStatisticsInvoicesRefundedValue
|
||||
from ..models.event_statistics_invoices_resolved import EventStatisticsInvoicesResolved
|
||||
from ..models.event_statistics_invoices_resolved_value import EventStatisticsInvoicesResolvedValue
|
||||
|
||||
|
||||
T = TypeVar("T", bound="EventStatistics")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventStatistics:
|
||||
"""Serializer for the action event-statistics used to display the dashboard of an event
|
||||
|
||||
Attributes:
|
||||
invoices_resolved (EventStatisticsInvoicesResolved): associate the number of invoices resolved (INCLUDING the
|
||||
refunded ones) per timestamps
|
||||
invoices_resolved_value (EventStatisticsInvoicesResolvedValue): associate the value of the total amount from the
|
||||
invoices resolved (INCLUDING the refunded ones) per timestamps
|
||||
invoices_refunded (EventStatisticsInvoicesRefunded): associate the number of invoices refunded (only those FULLY
|
||||
refunded) per timestamps
|
||||
invoices_refunded_value (EventStatisticsInvoicesRefundedValue): associate the value of the total amount from
|
||||
invoices refunded (= invoices with negative amounts) per timestamps
|
||||
invoices_in_progress (int): the count of invoices that are still in progress
|
||||
"""
|
||||
|
||||
invoices_resolved: "EventStatisticsInvoicesResolved"
|
||||
invoices_resolved_value: "EventStatisticsInvoicesResolvedValue"
|
||||
invoices_refunded: "EventStatisticsInvoicesRefunded"
|
||||
invoices_refunded_value: "EventStatisticsInvoicesRefundedValue"
|
||||
invoices_in_progress: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
invoices_resolved = self.invoices_resolved.to_dict()
|
||||
|
||||
invoices_resolved_value = self.invoices_resolved_value.to_dict()
|
||||
|
||||
invoices_refunded = self.invoices_refunded.to_dict()
|
||||
|
||||
invoices_refunded_value = self.invoices_refunded_value.to_dict()
|
||||
|
||||
invoices_in_progress = self.invoices_in_progress
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"invoices_resolved": invoices_resolved,
|
||||
"invoices_resolved_value": invoices_resolved_value,
|
||||
"invoices_refunded": invoices_refunded,
|
||||
"invoices_refunded_value": invoices_refunded_value,
|
||||
"invoices_in_progress": invoices_in_progress,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.event_statistics_invoices_refunded import EventStatisticsInvoicesRefunded
|
||||
from ..models.event_statistics_invoices_refunded_value import EventStatisticsInvoicesRefundedValue
|
||||
from ..models.event_statistics_invoices_resolved import EventStatisticsInvoicesResolved
|
||||
from ..models.event_statistics_invoices_resolved_value import EventStatisticsInvoicesResolvedValue
|
||||
|
||||
d = dict(src_dict)
|
||||
invoices_resolved = EventStatisticsInvoicesResolved.from_dict(d.pop("invoices_resolved"))
|
||||
|
||||
invoices_resolved_value = EventStatisticsInvoicesResolvedValue.from_dict(d.pop("invoices_resolved_value"))
|
||||
|
||||
invoices_refunded = EventStatisticsInvoicesRefunded.from_dict(d.pop("invoices_refunded"))
|
||||
|
||||
invoices_refunded_value = EventStatisticsInvoicesRefundedValue.from_dict(d.pop("invoices_refunded_value"))
|
||||
|
||||
invoices_in_progress = d.pop("invoices_in_progress")
|
||||
|
||||
event_statistics = cls(
|
||||
invoices_resolved=invoices_resolved,
|
||||
invoices_resolved_value=invoices_resolved_value,
|
||||
invoices_refunded=invoices_refunded,
|
||||
invoices_refunded_value=invoices_refunded_value,
|
||||
invoices_in_progress=invoices_in_progress,
|
||||
)
|
||||
|
||||
event_statistics.additional_properties = d
|
||||
return event_statistics
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="EventStatisticsInvoicesRefunded")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventStatisticsInvoicesRefunded:
|
||||
"""associate the number of invoices refunded (only those FULLY refunded) per timestamps"""
|
||||
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event_statistics_invoices_refunded = cls()
|
||||
|
||||
event_statistics_invoices_refunded.additional_properties = d
|
||||
return event_statistics_invoices_refunded
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="EventStatisticsInvoicesRefundedValue")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventStatisticsInvoicesRefundedValue:
|
||||
"""associate the value of the total amount from invoices refunded (= invoices with negative amounts) per timestamps"""
|
||||
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event_statistics_invoices_refunded_value = cls()
|
||||
|
||||
event_statistics_invoices_refunded_value.additional_properties = d
|
||||
return event_statistics_invoices_refunded_value
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="EventStatisticsInvoicesResolved")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventStatisticsInvoicesResolved:
|
||||
"""associate the number of invoices resolved (INCLUDING the refunded ones) per timestamps"""
|
||||
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event_statistics_invoices_resolved = cls()
|
||||
|
||||
event_statistics_invoices_resolved.additional_properties = d
|
||||
return event_statistics_invoices_resolved
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="EventStatisticsInvoicesResolvedValue")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class EventStatisticsInvoicesResolvedValue:
|
||||
"""associate the value of the total amount from the invoices resolved (INCLUDING the refunded ones) per timestamps"""
|
||||
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event_statistics_invoices_resolved_value = cls()
|
||||
|
||||
event_statistics_invoices_resolved_value.additional_properties = d
|
||||
return event_statistics_invoices_resolved_value
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class EventStatusEnum(str, Enum):
|
||||
ARCHIVED = "archived"
|
||||
CLOSED = "closed"
|
||||
DRAFT = "draft"
|
||||
PUBLIC = "public"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class EventsEventsActionsExportCreateFileType(str, Enum):
|
||||
CSV = "csv"
|
||||
XLSX = "xlsx"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class EventsEventsActionsStatisticsRetrieveGranularity(str, Enum):
|
||||
DAY = "day"
|
||||
FIVE_MINUTE = "five_minute"
|
||||
HOUR = "hour"
|
||||
TIMESTAMP = "timestamp"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,200 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FrontendBasket")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class FrontendBasket:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
testing (bool):
|
||||
created_by_id (int): The id of the frontendlogin that created the basket.
|
||||
total (str):
|
||||
total_display (str):
|
||||
invoices (list[int]):
|
||||
unikey (str): Return a unique and checksummed-ish key
|
||||
status (str):
|
||||
registrations_count (int): The number of root Selected Nodes linked to this basket.
|
||||
invoices_total (float): Invoices total amount.
|
||||
invoices_total_exceeds_basket_total (bool): Whether the invoices total amount exceeds the basket total.
|
||||
billing_information_id (Union[Unset, int]): The id of the billing information linked to the basket.
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
testing: bool
|
||||
created_by_id: int
|
||||
total: str
|
||||
total_display: str
|
||||
invoices: list[int]
|
||||
unikey: str
|
||||
status: str
|
||||
registrations_count: int
|
||||
invoices_total: float
|
||||
invoices_total_exceeds_basket_total: bool
|
||||
billing_information_id: Union[Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
testing = self.testing
|
||||
|
||||
created_by_id = self.created_by_id
|
||||
|
||||
total = self.total
|
||||
|
||||
total_display = self.total_display
|
||||
|
||||
invoices = self.invoices
|
||||
|
||||
unikey = self.unikey
|
||||
|
||||
status = self.status
|
||||
|
||||
registrations_count = self.registrations_count
|
||||
|
||||
invoices_total = self.invoices_total
|
||||
|
||||
invoices_total_exceeds_basket_total = self.invoices_total_exceeds_basket_total
|
||||
|
||||
billing_information_id = self.billing_information_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"testing": testing,
|
||||
"created_by_id": created_by_id,
|
||||
"total": total,
|
||||
"total_display": total_display,
|
||||
"invoices": invoices,
|
||||
"unikey": unikey,
|
||||
"status": status,
|
||||
"registrations_count": registrations_count,
|
||||
"invoices_total": invoices_total,
|
||||
"invoices_total_exceeds_basket_total": invoices_total_exceeds_basket_total,
|
||||
}
|
||||
)
|
||||
if billing_information_id is not UNSET:
|
||||
field_dict["billing_information_id"] = billing_information_id
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("testing", (None, str(self.testing).encode(), "text/plain")))
|
||||
|
||||
files.append(("created_by_id", (None, str(self.created_by_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("total", (None, str(self.total).encode(), "text/plain")))
|
||||
|
||||
files.append(("total_display", (None, str(self.total_display).encode(), "text/plain")))
|
||||
|
||||
for invoices_item_element in self.invoices:
|
||||
files.append(("invoices", (None, str(invoices_item_element).encode(), "text/plain")))
|
||||
|
||||
files.append(("unikey", (None, str(self.unikey).encode(), "text/plain")))
|
||||
|
||||
files.append(("status", (None, str(self.status).encode(), "text/plain")))
|
||||
|
||||
files.append(("registrations_count", (None, str(self.registrations_count).encode(), "text/plain")))
|
||||
|
||||
files.append(("invoices_total", (None, str(self.invoices_total).encode(), "text/plain")))
|
||||
|
||||
files.append(
|
||||
(
|
||||
"invoices_total_exceeds_basket_total",
|
||||
(None, str(self.invoices_total_exceeds_basket_total).encode(), "text/plain"),
|
||||
)
|
||||
)
|
||||
|
||||
if not isinstance(self.billing_information_id, Unset):
|
||||
files.append(("billing_information_id", (None, str(self.billing_information_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
testing = d.pop("testing")
|
||||
|
||||
created_by_id = d.pop("created_by_id")
|
||||
|
||||
total = d.pop("total")
|
||||
|
||||
total_display = d.pop("total_display")
|
||||
|
||||
invoices = cast(list[int], d.pop("invoices"))
|
||||
|
||||
unikey = d.pop("unikey")
|
||||
|
||||
status = d.pop("status")
|
||||
|
||||
registrations_count = d.pop("registrations_count")
|
||||
|
||||
invoices_total = d.pop("invoices_total")
|
||||
|
||||
invoices_total_exceeds_basket_total = d.pop("invoices_total_exceeds_basket_total")
|
||||
|
||||
billing_information_id = d.pop("billing_information_id", UNSET)
|
||||
|
||||
frontend_basket = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
testing=testing,
|
||||
created_by_id=created_by_id,
|
||||
total=total,
|
||||
total_display=total_display,
|
||||
invoices=invoices,
|
||||
unikey=unikey,
|
||||
status=status,
|
||||
registrations_count=registrations_count,
|
||||
invoices_total=invoices_total,
|
||||
invoices_total_exceeds_basket_total=invoices_total_exceeds_basket_total,
|
||||
billing_information_id=billing_information_id,
|
||||
)
|
||||
|
||||
frontend_basket.additional_properties = d
|
||||
return frontend_basket
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,120 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="FrontendLogin")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class FrontendLogin:
|
||||
"""Serializer for FrontendLogin
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
testing (bool):
|
||||
email (Union[None, str]):
|
||||
username (str):
|
||||
user (Union[None, int]):
|
||||
display (str):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
testing: bool
|
||||
email: Union[None, str]
|
||||
username: str
|
||||
user: Union[None, int]
|
||||
display: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
testing = self.testing
|
||||
|
||||
email: Union[None, str]
|
||||
email = self.email
|
||||
|
||||
username = self.username
|
||||
|
||||
user: Union[None, int]
|
||||
user = self.user
|
||||
|
||||
display = self.display
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"testing": testing,
|
||||
"email": email,
|
||||
"username": username,
|
||||
"user": user,
|
||||
"display": display,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
testing = d.pop("testing")
|
||||
|
||||
def _parse_email(data: object) -> Union[None, str]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, str], data)
|
||||
|
||||
email = _parse_email(d.pop("email"))
|
||||
|
||||
username = d.pop("username")
|
||||
|
||||
def _parse_user(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
user = _parse_user(d.pop("user"))
|
||||
|
||||
display = d.pop("display")
|
||||
|
||||
frontend_login = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
testing=testing,
|
||||
email=email,
|
||||
username=username,
|
||||
user=user,
|
||||
display=display,
|
||||
)
|
||||
|
||||
frontend_login.additional_properties = d
|
||||
return frontend_login
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,141 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
T = TypeVar("T", bound="Invoice")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Invoice:
|
||||
"""Serializer for `Invoice` model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
amount (str):
|
||||
due_date (Union[None, datetime.datetime]):
|
||||
created_at (datetime.datetime):
|
||||
basket (Union[None, int]):
|
||||
is_cancelled (bool):
|
||||
related_invoices (list[int]):
|
||||
is_resolved (bool):
|
||||
"""
|
||||
|
||||
id: int
|
||||
amount: str
|
||||
due_date: Union[None, datetime.datetime]
|
||||
created_at: datetime.datetime
|
||||
basket: Union[None, int]
|
||||
is_cancelled: bool
|
||||
related_invoices: list[int]
|
||||
is_resolved: bool
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
amount = self.amount
|
||||
|
||||
due_date: Union[None, str]
|
||||
if isinstance(self.due_date, datetime.datetime):
|
||||
due_date = self.due_date.isoformat()
|
||||
else:
|
||||
due_date = self.due_date
|
||||
|
||||
created_at = self.created_at.isoformat()
|
||||
|
||||
basket: Union[None, int]
|
||||
basket = self.basket
|
||||
|
||||
is_cancelled = self.is_cancelled
|
||||
|
||||
related_invoices = self.related_invoices
|
||||
|
||||
is_resolved = self.is_resolved
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"amount": amount,
|
||||
"due_date": due_date,
|
||||
"created_at": created_at,
|
||||
"basket": basket,
|
||||
"is_cancelled": is_cancelled,
|
||||
"related_invoices": related_invoices,
|
||||
"is_resolved": is_resolved,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
amount = d.pop("amount")
|
||||
|
||||
def _parse_due_date(data: object) -> Union[None, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
due_date_type_0 = isoparse(data)
|
||||
|
||||
return due_date_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, datetime.datetime], data)
|
||||
|
||||
due_date = _parse_due_date(d.pop("due_date"))
|
||||
|
||||
created_at = isoparse(d.pop("created_at"))
|
||||
|
||||
def _parse_basket(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
basket = _parse_basket(d.pop("basket"))
|
||||
|
||||
is_cancelled = d.pop("is_cancelled")
|
||||
|
||||
related_invoices = cast(list[int], d.pop("related_invoices"))
|
||||
|
||||
is_resolved = d.pop("is_resolved")
|
||||
|
||||
invoice = cls(
|
||||
id=id,
|
||||
amount=amount,
|
||||
due_date=due_date,
|
||||
created_at=created_at,
|
||||
basket=basket,
|
||||
is_cancelled=is_cancelled,
|
||||
related_invoices=related_invoices,
|
||||
is_resolved=is_resolved,
|
||||
)
|
||||
|
||||
invoice.additional_properties = d
|
||||
return invoice
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class LeftHandOperandEnum(str, Enum):
|
||||
LOGIN = "login"
|
||||
NODE = "node"
|
||||
PROMOTION_CODE = "promotion_code"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class LogicalOperatorEnum(str, Enum):
|
||||
AND = "and"
|
||||
OR = "or"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,82 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="Login")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Login:
|
||||
"""Serializer used only for PolyTicketUser login.
|
||||
|
||||
Attributes:
|
||||
email (str): The email associated with your account
|
||||
password (str): The password associated with your account
|
||||
"""
|
||||
|
||||
email: str
|
||||
password: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
email = self.email
|
||||
|
||||
password = self.password
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"email": email,
|
||||
"password": password,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("email", (None, str(self.email).encode(), "text/plain")))
|
||||
|
||||
files.append(("password", (None, str(self.password).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
email = d.pop("email")
|
||||
|
||||
password = d.pop("password")
|
||||
|
||||
login = cls(
|
||||
email=email,
|
||||
password=password,
|
||||
)
|
||||
|
||||
login.additional_properties = d
|
||||
return login
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,60 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="LoginJWT")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class LoginJWT:
|
||||
"""Serializer used to return the login access token.
|
||||
|
||||
Attributes:
|
||||
jwt (str): The login JWT access token
|
||||
"""
|
||||
|
||||
jwt: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
jwt = self.jwt
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"jwt": jwt,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
jwt = d.pop("jwt")
|
||||
|
||||
login_jwt = cls(
|
||||
jwt=jwt,
|
||||
)
|
||||
|
||||
login_jwt.additional_properties = d
|
||||
return login_jwt
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,84 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="LoginMethod")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class LoginMethod:
|
||||
"""A serializer returning info for a login method
|
||||
|
||||
Attributes:
|
||||
active_module_id (int): The id of the login method's active module
|
||||
key (str):
|
||||
name (str): Title of the login method
|
||||
description (str): Description of the login method
|
||||
"""
|
||||
|
||||
active_module_id: int
|
||||
key: str
|
||||
name: str
|
||||
description: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
active_module_id = self.active_module_id
|
||||
|
||||
key = self.key
|
||||
|
||||
name = self.name
|
||||
|
||||
description = self.description
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"active_module_id": active_module_id,
|
||||
"key": key,
|
||||
"name": name,
|
||||
"description": description,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
active_module_id = d.pop("active_module_id")
|
||||
|
||||
key = d.pop("key")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
description = d.pop("description")
|
||||
|
||||
login_method = cls(
|
||||
active_module_id=active_module_id,
|
||||
key=key,
|
||||
name=name,
|
||||
description=description,
|
||||
)
|
||||
|
||||
login_method.additional_properties = d
|
||||
return login_method
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,60 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="LoginResult")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class LoginResult:
|
||||
"""Serializer used only to return the token after a user login.
|
||||
|
||||
Attributes:
|
||||
token (str): A JWT to be used in Bearer authentication in further requests.
|
||||
"""
|
||||
|
||||
token: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
token = self.token
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"token": token,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
token = d.pop("token")
|
||||
|
||||
login_result = cls(
|
||||
token=token,
|
||||
)
|
||||
|
||||
login_result.additional_properties = d
|
||||
return login_result
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,12 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ModeEnum(str, Enum):
|
||||
DIVIDE = "divide"
|
||||
MULTIPLY = "multiply"
|
||||
PLUS = "plus"
|
||||
PLUS_PERCENT = "plus_percent"
|
||||
SET = "set"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,19 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ModelFormLineType(str, Enum):
|
||||
BOOLEAN = "boolean"
|
||||
CHOICE = "choice"
|
||||
COUNTRY = "country"
|
||||
DATE = "date"
|
||||
DATETIME = "datetime"
|
||||
DATE_MAJOR = "date_major"
|
||||
EMAIL = "email"
|
||||
FILE = "file"
|
||||
NUMERICAL = "numerical"
|
||||
PHONE = "phone"
|
||||
TEXT = "text"
|
||||
TEXTAREA = "textarea"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ModerationStatusEnum(str, Enum):
|
||||
CHANGE_REQUESTED = "change_requested"
|
||||
NOT_REQUESTED = "not_requested"
|
||||
REQUESTED = "requested"
|
||||
VALIDATED = "validated"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_auth_anonymous_login_configuration import ModuleAuthAnonymousLoginConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthAnonymousLoginActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthAnonymousLoginActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleAuthAnonymousLogin`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleAuthAnonymousLoginConfiguration): Serializer for `ModuleAuthAnonymousLoginConfiguration` nested in
|
||||
`ModuleAuthAnonymousLoginActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleAuthAnonymousLoginConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_auth_anonymous_login_configuration import ModuleAuthAnonymousLoginConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleAuthAnonymousLoginConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_auth_anonymous_login_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_auth_anonymous_login_active_module.additional_properties = d
|
||||
return module_auth_anonymous_login_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthAnonymousLoginConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthAnonymousLoginConfiguration:
|
||||
"""Serializer for `ModuleAuthAnonymousLoginConfiguration` nested in `ModuleAuthAnonymousLoginActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
"""
|
||||
|
||||
id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
module_auth_anonymous_login_configuration = cls(
|
||||
id=id,
|
||||
)
|
||||
|
||||
module_auth_anonymous_login_configuration.additional_properties = d
|
||||
return module_auth_anonymous_login_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_auth_third_party_token_login_configuration import ModuleAuthThirdPartyTokenLoginConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthThirdPartyTokenLoginActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthThirdPartyTokenLoginActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleAuthThirdPartyTokenLogin`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleAuthThirdPartyTokenLoginConfiguration): Serializer for
|
||||
`ModuleAuthThirdPartyTokenLoginConfiguration` nested in `ModuleAuthThirdPartyTokenLoginActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleAuthThirdPartyTokenLoginConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_auth_third_party_token_login_configuration import (
|
||||
ModuleAuthThirdPartyTokenLoginConfiguration,
|
||||
)
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleAuthThirdPartyTokenLoginConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_auth_third_party_token_login_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_auth_third_party_token_login_active_module.additional_properties = d
|
||||
return module_auth_third_party_token_login_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthThirdPartyTokenLoginConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthThirdPartyTokenLoginConfiguration:
|
||||
"""Serializer for `ModuleAuthThirdPartyTokenLoginConfiguration` nested in
|
||||
`ModuleAuthThirdPartyTokenLoginActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
jwt_secret_key (str): Secret key for the JWT token (any string).
|
||||
"""
|
||||
|
||||
id: int
|
||||
jwt_secret_key: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
jwt_secret_key = self.jwt_secret_key
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"jwt_secret_key": jwt_secret_key,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
jwt_secret_key = d.pop("jwt_secret_key")
|
||||
|
||||
module_auth_third_party_token_login_configuration = cls(
|
||||
id=id,
|
||||
jwt_secret_key=jwt_secret_key,
|
||||
)
|
||||
|
||||
module_auth_third_party_token_login_configuration.additional_properties = d
|
||||
return module_auth_third_party_token_login_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_auth_trusted_email_configuration import ModuleAuthTrustedEmailConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthTrustedEmailActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthTrustedEmailActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleAuthTrustedEmail`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleAuthTrustedEmailConfiguration): Serializer for `ModuleAuthTrustedEmailConfiguration` nested in
|
||||
`ModuleAuthTrustedEmailActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleAuthTrustedEmailConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_auth_trusted_email_configuration import ModuleAuthTrustedEmailConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleAuthTrustedEmailConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_auth_trusted_email_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_auth_trusted_email_active_module.additional_properties = d
|
||||
return module_auth_trusted_email_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModuleAuthTrustedEmailConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleAuthTrustedEmailConfiguration:
|
||||
"""Serializer for `ModuleAuthTrustedEmailConfiguration` nested in `ModuleAuthTrustedEmailActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
"""
|
||||
|
||||
id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
module_auth_trusted_email_configuration = cls(
|
||||
id=id,
|
||||
)
|
||||
|
||||
module_auth_trusted_email_configuration.additional_properties = d
|
||||
return module_auth_trusted_email_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_completion_email_registration_completed_configuration import (
|
||||
ModuleCompletionEmailRegistrationCompletedConfiguration,
|
||||
)
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionEmailRegistrationCompletedActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionEmailRegistrationCompletedActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleCompletionEmailRegistrationCompleted`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleCompletionEmailRegistrationCompletedConfiguration): Serializer for
|
||||
`ModuleCompletionEmailRegistrationCompletedConfiguration` nested in
|
||||
`ModuleCompletionEmailRegistrationCompletedActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleCompletionEmailRegistrationCompletedConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_completion_email_registration_completed_configuration import (
|
||||
ModuleCompletionEmailRegistrationCompletedConfiguration,
|
||||
)
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleCompletionEmailRegistrationCompletedConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_completion_email_registration_completed_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_completion_email_registration_completed_active_module.additional_properties = d
|
||||
return module_completion_email_registration_completed_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionEmailRegistrationCompletedConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionEmailRegistrationCompletedConfiguration:
|
||||
"""Serializer for `ModuleCompletionEmailRegistrationCompletedConfiguration` nested in
|
||||
`ModuleCompletionEmailRegistrationCompletedActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
ticket_content (Union[Unset, str]):
|
||||
event_details_dates (Union[Unset, str]):
|
||||
event_details_location_text (Union[Unset, str]):
|
||||
event_details_location_image (Union[None, Unset, str]):
|
||||
text (Union[Unset, str]): custom text to be displayed on the confirmation email. Some restricted HTML markup is
|
||||
allowed, everything else is filtered out automatically.
|
||||
image (Union[None, Unset, int]): The image used for the module
|
||||
is_text_used (Union[Unset, bool]):
|
||||
is_image_used (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
ticket_content: Union[Unset, str] = UNSET
|
||||
event_details_dates: Union[Unset, str] = UNSET
|
||||
event_details_location_text: Union[Unset, str] = UNSET
|
||||
event_details_location_image: Union[None, Unset, str] = UNSET
|
||||
text: Union[Unset, str] = UNSET
|
||||
image: Union[None, Unset, int] = UNSET
|
||||
is_text_used: Union[Unset, bool] = UNSET
|
||||
is_image_used: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
ticket_content = self.ticket_content
|
||||
|
||||
event_details_dates = self.event_details_dates
|
||||
|
||||
event_details_location_text = self.event_details_location_text
|
||||
|
||||
event_details_location_image: Union[None, Unset, str]
|
||||
if isinstance(self.event_details_location_image, Unset):
|
||||
event_details_location_image = UNSET
|
||||
else:
|
||||
event_details_location_image = self.event_details_location_image
|
||||
|
||||
text = self.text
|
||||
|
||||
image: Union[None, Unset, int]
|
||||
if isinstance(self.image, Unset):
|
||||
image = UNSET
|
||||
else:
|
||||
image = self.image
|
||||
|
||||
is_text_used = self.is_text_used
|
||||
|
||||
is_image_used = self.is_image_used
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
if ticket_content is not UNSET:
|
||||
field_dict["ticket_content"] = ticket_content
|
||||
if event_details_dates is not UNSET:
|
||||
field_dict["event_details_dates"] = event_details_dates
|
||||
if event_details_location_text is not UNSET:
|
||||
field_dict["event_details_location_text"] = event_details_location_text
|
||||
if event_details_location_image is not UNSET:
|
||||
field_dict["event_details_location_image"] = event_details_location_image
|
||||
if text is not UNSET:
|
||||
field_dict["text"] = text
|
||||
if image is not UNSET:
|
||||
field_dict["image"] = image
|
||||
if is_text_used is not UNSET:
|
||||
field_dict["is_text_used"] = is_text_used
|
||||
if is_image_used is not UNSET:
|
||||
field_dict["is_image_used"] = is_image_used
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
ticket_content = d.pop("ticket_content", UNSET)
|
||||
|
||||
event_details_dates = d.pop("event_details_dates", UNSET)
|
||||
|
||||
event_details_location_text = d.pop("event_details_location_text", UNSET)
|
||||
|
||||
def _parse_event_details_location_image(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
event_details_location_image = _parse_event_details_location_image(d.pop("event_details_location_image", UNSET))
|
||||
|
||||
text = d.pop("text", UNSET)
|
||||
|
||||
def _parse_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
image = _parse_image(d.pop("image", UNSET))
|
||||
|
||||
is_text_used = d.pop("is_text_used", UNSET)
|
||||
|
||||
is_image_used = d.pop("is_image_used", UNSET)
|
||||
|
||||
module_completion_email_registration_completed_configuration = cls(
|
||||
id=id,
|
||||
ticket_content=ticket_content,
|
||||
event_details_dates=event_details_dates,
|
||||
event_details_location_text=event_details_location_text,
|
||||
event_details_location_image=event_details_location_image,
|
||||
text=text,
|
||||
image=image,
|
||||
is_text_used=is_text_used,
|
||||
is_image_used=is_image_used,
|
||||
)
|
||||
|
||||
module_completion_email_registration_completed_configuration.additional_properties = d
|
||||
return module_completion_email_registration_completed_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_completion_email_registration_creation_configuration import (
|
||||
ModuleCompletionEmailRegistrationCreationConfiguration,
|
||||
)
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionEmailRegistrationCreationActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionEmailRegistrationCreationActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleCompletionEmailRegistrationCreation`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleCompletionEmailRegistrationCreationConfiguration): Serializer for
|
||||
`ModuleCompletionEmailRegistrationCreationConfiguration` nested in
|
||||
`ModuleCompletionEmailRegistrationCreationActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleCompletionEmailRegistrationCreationConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_completion_email_registration_creation_configuration import (
|
||||
ModuleCompletionEmailRegistrationCreationConfiguration,
|
||||
)
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleCompletionEmailRegistrationCreationConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_completion_email_registration_creation_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_completion_email_registration_creation_active_module.additional_properties = d
|
||||
return module_completion_email_registration_creation_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionEmailRegistrationCreationConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionEmailRegistrationCreationConfiguration:
|
||||
"""Serializer for `ModuleCompletionEmailRegistrationCreationConfiguration` nested in
|
||||
`ModuleCompletionEmailRegistrationCreationActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
delay (Union[Unset, int]): delay time in minutes
|
||||
is_disabled_if_paid (Union[Unset, bool]):
|
||||
text (Union[Unset, str]): custom text to be displayed on the reminder email. Some restricted HTML markup is
|
||||
allowed, everything else is filtered out automatically.
|
||||
image (Union[None, Unset, int]): The image used for the module
|
||||
is_text_used (Union[Unset, bool]):
|
||||
is_image_used (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
delay: Union[Unset, int] = UNSET
|
||||
is_disabled_if_paid: Union[Unset, bool] = UNSET
|
||||
text: Union[Unset, str] = UNSET
|
||||
image: Union[None, Unset, int] = UNSET
|
||||
is_text_used: Union[Unset, bool] = UNSET
|
||||
is_image_used: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
delay = self.delay
|
||||
|
||||
is_disabled_if_paid = self.is_disabled_if_paid
|
||||
|
||||
text = self.text
|
||||
|
||||
image: Union[None, Unset, int]
|
||||
if isinstance(self.image, Unset):
|
||||
image = UNSET
|
||||
else:
|
||||
image = self.image
|
||||
|
||||
is_text_used = self.is_text_used
|
||||
|
||||
is_image_used = self.is_image_used
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
if delay is not UNSET:
|
||||
field_dict["delay"] = delay
|
||||
if is_disabled_if_paid is not UNSET:
|
||||
field_dict["is_disabled_if_paid"] = is_disabled_if_paid
|
||||
if text is not UNSET:
|
||||
field_dict["text"] = text
|
||||
if image is not UNSET:
|
||||
field_dict["image"] = image
|
||||
if is_text_used is not UNSET:
|
||||
field_dict["is_text_used"] = is_text_used
|
||||
if is_image_used is not UNSET:
|
||||
field_dict["is_image_used"] = is_image_used
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
delay = d.pop("delay", UNSET)
|
||||
|
||||
is_disabled_if_paid = d.pop("is_disabled_if_paid", UNSET)
|
||||
|
||||
text = d.pop("text", UNSET)
|
||||
|
||||
def _parse_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
image = _parse_image(d.pop("image", UNSET))
|
||||
|
||||
is_text_used = d.pop("is_text_used", UNSET)
|
||||
|
||||
is_image_used = d.pop("is_image_used", UNSET)
|
||||
|
||||
module_completion_email_registration_creation_configuration = cls(
|
||||
id=id,
|
||||
delay=delay,
|
||||
is_disabled_if_paid=is_disabled_if_paid,
|
||||
text=text,
|
||||
image=image,
|
||||
is_text_used=is_text_used,
|
||||
is_image_used=is_image_used,
|
||||
)
|
||||
|
||||
module_completion_email_registration_creation_configuration.additional_properties = d
|
||||
return module_completion_email_registration_creation_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_completion_pdf_ticket_configuration import ModuleCompletionPDFTicketConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionPDFTicketActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionPDFTicketActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleCompletionPDFTicket`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleCompletionPDFTicketConfiguration): Serializer for `ModuleCompletionPDFTicketConfiguration` nested
|
||||
in `ModuleCompletionPDFTicketActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleCompletionPDFTicketConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_completion_pdf_ticket_configuration import ModuleCompletionPDFTicketConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleCompletionPDFTicketConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_completion_pdf_ticket_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_completion_pdf_ticket_active_module.additional_properties = d
|
||||
return module_completion_pdf_ticket_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionPDFTicketConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionPDFTicketConfiguration:
|
||||
"""Serializer for `ModuleCompletionPDFTicketConfiguration` nested in `ModuleCompletionPDFTicketActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
text (Union[Unset, str]): The complementary informations's text on the PDF ticket. Some restricted HTML markup
|
||||
is allowed, everything else is filtered out automatically.
|
||||
image (Union[None, Unset, int]): The image used for the module
|
||||
is_text_used (Union[Unset, bool]):
|
||||
is_image_used (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
text: Union[Unset, str] = UNSET
|
||||
image: Union[None, Unset, int] = UNSET
|
||||
is_text_used: Union[Unset, bool] = UNSET
|
||||
is_image_used: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
text = self.text
|
||||
|
||||
image: Union[None, Unset, int]
|
||||
if isinstance(self.image, Unset):
|
||||
image = UNSET
|
||||
else:
|
||||
image = self.image
|
||||
|
||||
is_text_used = self.is_text_used
|
||||
|
||||
is_image_used = self.is_image_used
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
if text is not UNSET:
|
||||
field_dict["text"] = text
|
||||
if image is not UNSET:
|
||||
field_dict["image"] = image
|
||||
if is_text_used is not UNSET:
|
||||
field_dict["is_text_used"] = is_text_used
|
||||
if is_image_used is not UNSET:
|
||||
field_dict["is_image_used"] = is_image_used
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
text = d.pop("text", UNSET)
|
||||
|
||||
def _parse_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
image = _parse_image(d.pop("image", UNSET))
|
||||
|
||||
is_text_used = d.pop("is_text_used", UNSET)
|
||||
|
||||
is_image_used = d.pop("is_image_used", UNSET)
|
||||
|
||||
module_completion_pdf_ticket_configuration = cls(
|
||||
id=id,
|
||||
text=text,
|
||||
image=image,
|
||||
is_text_used=is_text_used,
|
||||
is_image_used=is_image_used,
|
||||
)
|
||||
|
||||
module_completion_pdf_ticket_configuration.additional_properties = d
|
||||
return module_completion_pdf_ticket_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_completion_redirect_configuration import ModuleCompletionRedirectConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionRedirectActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionRedirectActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleCompletionRedirect`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleCompletionRedirectConfiguration): Serializer for `ModuleCompletionRedirectConfiguration` nested in
|
||||
`ModuleCompletionRedirectActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleCompletionRedirectConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_completion_redirect_configuration import ModuleCompletionRedirectConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleCompletionRedirectConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_completion_redirect_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_completion_redirect_active_module.additional_properties = d
|
||||
return module_completion_redirect_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModuleCompletionRedirectConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleCompletionRedirectConfiguration:
|
||||
"""Serializer for `ModuleCompletionRedirectConfiguration` nested in `ModuleCompletionRedirectActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
redirect_url (str): Redirect URL once the payment is done.
|
||||
"""
|
||||
|
||||
id: int
|
||||
redirect_url: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
redirect_url = self.redirect_url
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"redirect_url": redirect_url,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
redirect_url = d.pop("redirect_url")
|
||||
|
||||
module_completion_redirect_configuration = cls(
|
||||
id=id,
|
||||
redirect_url=redirect_url,
|
||||
)
|
||||
|
||||
module_completion_redirect_configuration.additional_properties = d
|
||||
return module_completion_redirect_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_payment_payrexx_configuration import ModulePaymentPayrexxConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPayrexxActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPayrexxActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModulePaymentPayrexx`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModulePaymentPayrexxConfiguration): Serializer for `ModulePaymentPayrexxConfiguration` nested in
|
||||
`ModulePaymentPayrexxActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModulePaymentPayrexxConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_payment_payrexx_configuration import ModulePaymentPayrexxConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModulePaymentPayrexxConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_payment_payrexx_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_payment_payrexx_active_module.additional_properties = d
|
||||
return module_payment_payrexx_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_payment_payrexx_configuration_global_limit import ModulePaymentPayrexxConfigurationGlobalLimit
|
||||
from ..models.module_payment_payrexx_configuration_limit import ModulePaymentPayrexxConfigurationLimit
|
||||
from ..models.module_payment_payrexx_configuration_price_rule import ModulePaymentPayrexxConfigurationPriceRule
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPayrexxConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPayrexxConfiguration:
|
||||
"""Serializer for `ModulePaymentPayrexxConfiguration` nested in `ModulePaymentPayrexxActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
price_rules (list['ModulePaymentPayrexxConfigurationPriceRule']):
|
||||
limits (list['ModulePaymentPayrexxConfigurationLimit']):
|
||||
global_limits (list['ModulePaymentPayrexxConfigurationGlobalLimit']):
|
||||
is_feature_disabled (Union[Unset, bool]):
|
||||
payment_list_title (Union[Unset, str]):
|
||||
payment_list_description (Union[Unset, str]):
|
||||
timeout (Union[None, Unset, int]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
price_rules: list["ModulePaymentPayrexxConfigurationPriceRule"]
|
||||
limits: list["ModulePaymentPayrexxConfigurationLimit"]
|
||||
global_limits: list["ModulePaymentPayrexxConfigurationGlobalLimit"]
|
||||
is_feature_disabled: Union[Unset, bool] = UNSET
|
||||
payment_list_title: Union[Unset, str] = UNSET
|
||||
payment_list_description: Union[Unset, str] = UNSET
|
||||
timeout: Union[None, Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
price_rules = []
|
||||
for price_rules_item_data in self.price_rules:
|
||||
price_rules_item = price_rules_item_data.to_dict()
|
||||
price_rules.append(price_rules_item)
|
||||
|
||||
limits = []
|
||||
for limits_item_data in self.limits:
|
||||
limits_item = limits_item_data.to_dict()
|
||||
limits.append(limits_item)
|
||||
|
||||
global_limits = []
|
||||
for global_limits_item_data in self.global_limits:
|
||||
global_limits_item = global_limits_item_data.to_dict()
|
||||
global_limits.append(global_limits_item)
|
||||
|
||||
is_feature_disabled = self.is_feature_disabled
|
||||
|
||||
payment_list_title = self.payment_list_title
|
||||
|
||||
payment_list_description = self.payment_list_description
|
||||
|
||||
timeout: Union[None, Unset, int]
|
||||
if isinstance(self.timeout, Unset):
|
||||
timeout = UNSET
|
||||
else:
|
||||
timeout = self.timeout
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"price_rules": price_rules,
|
||||
"limits": limits,
|
||||
"global_limits": global_limits,
|
||||
}
|
||||
)
|
||||
if is_feature_disabled is not UNSET:
|
||||
field_dict["is_feature_disabled"] = is_feature_disabled
|
||||
if payment_list_title is not UNSET:
|
||||
field_dict["payment_list_title"] = payment_list_title
|
||||
if payment_list_description is not UNSET:
|
||||
field_dict["payment_list_description"] = payment_list_description
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_payment_payrexx_configuration_global_limit import (
|
||||
ModulePaymentPayrexxConfigurationGlobalLimit,
|
||||
)
|
||||
from ..models.module_payment_payrexx_configuration_limit import ModulePaymentPayrexxConfigurationLimit
|
||||
from ..models.module_payment_payrexx_configuration_price_rule import ModulePaymentPayrexxConfigurationPriceRule
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
price_rules = []
|
||||
_price_rules = d.pop("price_rules")
|
||||
for price_rules_item_data in _price_rules:
|
||||
price_rules_item = ModulePaymentPayrexxConfigurationPriceRule.from_dict(price_rules_item_data)
|
||||
|
||||
price_rules.append(price_rules_item)
|
||||
|
||||
limits = []
|
||||
_limits = d.pop("limits")
|
||||
for limits_item_data in _limits:
|
||||
limits_item = ModulePaymentPayrexxConfigurationLimit.from_dict(limits_item_data)
|
||||
|
||||
limits.append(limits_item)
|
||||
|
||||
global_limits = []
|
||||
_global_limits = d.pop("global_limits")
|
||||
for global_limits_item_data in _global_limits:
|
||||
global_limits_item = ModulePaymentPayrexxConfigurationGlobalLimit.from_dict(global_limits_item_data)
|
||||
|
||||
global_limits.append(global_limits_item)
|
||||
|
||||
is_feature_disabled = d.pop("is_feature_disabled", UNSET)
|
||||
|
||||
payment_list_title = d.pop("payment_list_title", UNSET)
|
||||
|
||||
payment_list_description = d.pop("payment_list_description", UNSET)
|
||||
|
||||
def _parse_timeout(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
timeout = _parse_timeout(d.pop("timeout", UNSET))
|
||||
|
||||
module_payment_payrexx_configuration = cls(
|
||||
id=id,
|
||||
price_rules=price_rules,
|
||||
limits=limits,
|
||||
global_limits=global_limits,
|
||||
is_feature_disabled=is_feature_disabled,
|
||||
payment_list_title=payment_list_title,
|
||||
payment_list_description=payment_list_description,
|
||||
timeout=timeout,
|
||||
)
|
||||
|
||||
module_payment_payrexx_configuration.additional_properties = d
|
||||
return module_payment_payrexx_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPayrexxConfigurationGlobalLimit")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPayrexxConfigurationGlobalLimit:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
order (int):
|
||||
key (str):
|
||||
conditions_json (Union[None, str]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
order: int
|
||||
key: str
|
||||
conditions_json: Union[None, str]
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
order = self.order
|
||||
|
||||
key = self.key
|
||||
|
||||
conditions_json: Union[None, str]
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"order": order,
|
||||
"key": key,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
key = d.pop("key")
|
||||
|
||||
def _parse_conditions_json(data: object) -> Union[None, str]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, str], data)
|
||||
|
||||
conditions_json = _parse_conditions_json(d.pop("conditions_json"))
|
||||
|
||||
module_payment_payrexx_configuration_global_limit = cls(
|
||||
id=id,
|
||||
order=order,
|
||||
key=key,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_payrexx_configuration_global_limit.additional_properties = d
|
||||
return module_payment_payrexx_configuration_global_limit
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPayrexxConfigurationLimit")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPayrexxConfigurationLimit:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
order (int):
|
||||
global_order (int):
|
||||
label (str):
|
||||
maximum (int):
|
||||
conditions_json (Union[None, str]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
order: int
|
||||
global_order: int
|
||||
label: str
|
||||
maximum: int
|
||||
conditions_json: Union[None, str]
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
order = self.order
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
label = self.label
|
||||
|
||||
maximum = self.maximum
|
||||
|
||||
conditions_json: Union[None, str]
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"order": order,
|
||||
"global_order": global_order,
|
||||
"label": label,
|
||||
"maximum": maximum,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
maximum = d.pop("maximum")
|
||||
|
||||
def _parse_conditions_json(data: object) -> Union[None, str]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, str], data)
|
||||
|
||||
conditions_json = _parse_conditions_json(d.pop("conditions_json"))
|
||||
|
||||
module_payment_payrexx_configuration_limit = cls(
|
||||
id=id,
|
||||
order=order,
|
||||
global_order=global_order,
|
||||
label=label,
|
||||
maximum=maximum,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_payrexx_configuration_limit.additional_properties = d
|
||||
return module_payment_payrexx_configuration_limit
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..models.mode_enum import ModeEnum
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPayrexxConfigurationPriceRule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPayrexxConfigurationPriceRule:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
global_order (int):
|
||||
order (int):
|
||||
mode (ModeEnum): * `plus` - + [Current price + value]
|
||||
* `set` - = [Set price to]
|
||||
* `plus_percent` - +% [Current price + current price * value / 100]
|
||||
* `multiply` - * [Current price * value]
|
||||
* `divide` - / [Current price / value]
|
||||
value (str):
|
||||
label (str):
|
||||
should_propagate (bool): does this rule apply on children of the node
|
||||
conditions_json (Union[None, str]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
global_order: int
|
||||
order: int
|
||||
mode: ModeEnum
|
||||
value: str
|
||||
label: str
|
||||
should_propagate: bool
|
||||
conditions_json: Union[None, str]
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
order = self.order
|
||||
|
||||
mode = self.mode.value
|
||||
|
||||
value = self.value
|
||||
|
||||
label = self.label
|
||||
|
||||
should_propagate = self.should_propagate
|
||||
|
||||
conditions_json: Union[None, str]
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"global_order": global_order,
|
||||
"order": order,
|
||||
"mode": mode,
|
||||
"value": value,
|
||||
"label": label,
|
||||
"should_propagate": should_propagate,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
mode = ModeEnum(d.pop("mode"))
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
should_propagate = d.pop("should_propagate")
|
||||
|
||||
def _parse_conditions_json(data: object) -> Union[None, str]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, str], data)
|
||||
|
||||
conditions_json = _parse_conditions_json(d.pop("conditions_json"))
|
||||
|
||||
module_payment_payrexx_configuration_price_rule = cls(
|
||||
id=id,
|
||||
global_order=global_order,
|
||||
order=order,
|
||||
mode=mode,
|
||||
value=value,
|
||||
label=label,
|
||||
should_propagate=should_propagate,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_payrexx_configuration_price_rule.additional_properties = d
|
||||
return module_payment_payrexx_configuration_price_rule
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_payment_point_of_sale_configuration import ModulePaymentPointOfSaleConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPointOfSaleActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPointOfSaleActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModulePaymentPointOfSale`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModulePaymentPointOfSaleConfiguration): Serializer for `ModulePaymentPointOfSaleConfiguration` nested in
|
||||
`ModulePaymentPointOfSaleActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModulePaymentPointOfSaleConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_payment_point_of_sale_configuration import ModulePaymentPointOfSaleConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModulePaymentPointOfSaleConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_payment_point_of_sale_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_payment_point_of_sale_active_module.additional_properties = d
|
||||
return module_payment_point_of_sale_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_payment_point_of_sale_configuration_global_limit import (
|
||||
ModulePaymentPointOfSaleConfigurationGlobalLimit,
|
||||
)
|
||||
from ..models.module_payment_point_of_sale_configuration_limit import ModulePaymentPointOfSaleConfigurationLimit
|
||||
from ..models.module_payment_point_of_sale_configuration_price_rule import (
|
||||
ModulePaymentPointOfSaleConfigurationPriceRule,
|
||||
)
|
||||
from ..models.point_of_sale_place import PointOfSalePlace
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPointOfSaleConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPointOfSaleConfiguration:
|
||||
"""Serializer for `ModulePaymentPointOfSaleConfiguration` nested in `ModulePaymentPointOfSaleActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
places (list['PointOfSalePlace']):
|
||||
price_rules (list['ModulePaymentPointOfSaleConfigurationPriceRule']):
|
||||
limits (list['ModulePaymentPointOfSaleConfigurationLimit']):
|
||||
global_limits (list['ModulePaymentPointOfSaleConfigurationGlobalLimit']):
|
||||
is_feature_disabled (Union[Unset, bool]):
|
||||
payment_list_title (Union[Unset, str]):
|
||||
payment_list_description (Union[Unset, str]):
|
||||
places_list_title (Union[Unset, str]):
|
||||
places_list_text (Union[Unset, str]):
|
||||
timeout (Union[None, Unset, int]): In minutes
|
||||
"""
|
||||
|
||||
id: int
|
||||
places: list["PointOfSalePlace"]
|
||||
price_rules: list["ModulePaymentPointOfSaleConfigurationPriceRule"]
|
||||
limits: list["ModulePaymentPointOfSaleConfigurationLimit"]
|
||||
global_limits: list["ModulePaymentPointOfSaleConfigurationGlobalLimit"]
|
||||
is_feature_disabled: Union[Unset, bool] = UNSET
|
||||
payment_list_title: Union[Unset, str] = UNSET
|
||||
payment_list_description: Union[Unset, str] = UNSET
|
||||
places_list_title: Union[Unset, str] = UNSET
|
||||
places_list_text: Union[Unset, str] = UNSET
|
||||
timeout: Union[None, Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
places = []
|
||||
for places_item_data in self.places:
|
||||
places_item = places_item_data.to_dict()
|
||||
places.append(places_item)
|
||||
|
||||
price_rules = []
|
||||
for price_rules_item_data in self.price_rules:
|
||||
price_rules_item = price_rules_item_data.to_dict()
|
||||
price_rules.append(price_rules_item)
|
||||
|
||||
limits = []
|
||||
for limits_item_data in self.limits:
|
||||
limits_item = limits_item_data.to_dict()
|
||||
limits.append(limits_item)
|
||||
|
||||
global_limits = []
|
||||
for global_limits_item_data in self.global_limits:
|
||||
global_limits_item = global_limits_item_data.to_dict()
|
||||
global_limits.append(global_limits_item)
|
||||
|
||||
is_feature_disabled = self.is_feature_disabled
|
||||
|
||||
payment_list_title = self.payment_list_title
|
||||
|
||||
payment_list_description = self.payment_list_description
|
||||
|
||||
places_list_title = self.places_list_title
|
||||
|
||||
places_list_text = self.places_list_text
|
||||
|
||||
timeout: Union[None, Unset, int]
|
||||
if isinstance(self.timeout, Unset):
|
||||
timeout = UNSET
|
||||
else:
|
||||
timeout = self.timeout
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"places": places,
|
||||
"price_rules": price_rules,
|
||||
"limits": limits,
|
||||
"global_limits": global_limits,
|
||||
}
|
||||
)
|
||||
if is_feature_disabled is not UNSET:
|
||||
field_dict["is_feature_disabled"] = is_feature_disabled
|
||||
if payment_list_title is not UNSET:
|
||||
field_dict["payment_list_title"] = payment_list_title
|
||||
if payment_list_description is not UNSET:
|
||||
field_dict["payment_list_description"] = payment_list_description
|
||||
if places_list_title is not UNSET:
|
||||
field_dict["places_list_title"] = places_list_title
|
||||
if places_list_text is not UNSET:
|
||||
field_dict["places_list_text"] = places_list_text
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_payment_point_of_sale_configuration_global_limit import (
|
||||
ModulePaymentPointOfSaleConfigurationGlobalLimit,
|
||||
)
|
||||
from ..models.module_payment_point_of_sale_configuration_limit import ModulePaymentPointOfSaleConfigurationLimit
|
||||
from ..models.module_payment_point_of_sale_configuration_price_rule import (
|
||||
ModulePaymentPointOfSaleConfigurationPriceRule,
|
||||
)
|
||||
from ..models.point_of_sale_place import PointOfSalePlace
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
places = []
|
||||
_places = d.pop("places")
|
||||
for places_item_data in _places:
|
||||
places_item = PointOfSalePlace.from_dict(places_item_data)
|
||||
|
||||
places.append(places_item)
|
||||
|
||||
price_rules = []
|
||||
_price_rules = d.pop("price_rules")
|
||||
for price_rules_item_data in _price_rules:
|
||||
price_rules_item = ModulePaymentPointOfSaleConfigurationPriceRule.from_dict(price_rules_item_data)
|
||||
|
||||
price_rules.append(price_rules_item)
|
||||
|
||||
limits = []
|
||||
_limits = d.pop("limits")
|
||||
for limits_item_data in _limits:
|
||||
limits_item = ModulePaymentPointOfSaleConfigurationLimit.from_dict(limits_item_data)
|
||||
|
||||
limits.append(limits_item)
|
||||
|
||||
global_limits = []
|
||||
_global_limits = d.pop("global_limits")
|
||||
for global_limits_item_data in _global_limits:
|
||||
global_limits_item = ModulePaymentPointOfSaleConfigurationGlobalLimit.from_dict(global_limits_item_data)
|
||||
|
||||
global_limits.append(global_limits_item)
|
||||
|
||||
is_feature_disabled = d.pop("is_feature_disabled", UNSET)
|
||||
|
||||
payment_list_title = d.pop("payment_list_title", UNSET)
|
||||
|
||||
payment_list_description = d.pop("payment_list_description", UNSET)
|
||||
|
||||
places_list_title = d.pop("places_list_title", UNSET)
|
||||
|
||||
places_list_text = d.pop("places_list_text", UNSET)
|
||||
|
||||
def _parse_timeout(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
timeout = _parse_timeout(d.pop("timeout", UNSET))
|
||||
|
||||
module_payment_point_of_sale_configuration = cls(
|
||||
id=id,
|
||||
places=places,
|
||||
price_rules=price_rules,
|
||||
limits=limits,
|
||||
global_limits=global_limits,
|
||||
is_feature_disabled=is_feature_disabled,
|
||||
payment_list_title=payment_list_title,
|
||||
payment_list_description=payment_list_description,
|
||||
places_list_title=places_list_title,
|
||||
places_list_text=places_list_text,
|
||||
timeout=timeout,
|
||||
)
|
||||
|
||||
module_payment_point_of_sale_configuration.additional_properties = d
|
||||
return module_payment_point_of_sale_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPointOfSaleConfigurationGlobalLimit")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPointOfSaleConfigurationGlobalLimit:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
order (int):
|
||||
key (str):
|
||||
conditions_json (str):
|
||||
"""
|
||||
|
||||
id: int
|
||||
order: int
|
||||
key: str
|
||||
conditions_json: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
order = self.order
|
||||
|
||||
key = self.key
|
||||
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"order": order,
|
||||
"key": key,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
key = d.pop("key")
|
||||
|
||||
conditions_json = d.pop("conditions_json")
|
||||
|
||||
module_payment_point_of_sale_configuration_global_limit = cls(
|
||||
id=id,
|
||||
order=order,
|
||||
key=key,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_point_of_sale_configuration_global_limit.additional_properties = d
|
||||
return module_payment_point_of_sale_configuration_global_limit
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPointOfSaleConfigurationLimit")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPointOfSaleConfigurationLimit:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
order (int):
|
||||
global_order (int):
|
||||
label (str):
|
||||
maximum (int):
|
||||
conditions_json (str):
|
||||
"""
|
||||
|
||||
id: int
|
||||
order: int
|
||||
global_order: int
|
||||
label: str
|
||||
maximum: int
|
||||
conditions_json: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
order = self.order
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
label = self.label
|
||||
|
||||
maximum = self.maximum
|
||||
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"order": order,
|
||||
"global_order": global_order,
|
||||
"label": label,
|
||||
"maximum": maximum,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
maximum = d.pop("maximum")
|
||||
|
||||
conditions_json = d.pop("conditions_json")
|
||||
|
||||
module_payment_point_of_sale_configuration_limit = cls(
|
||||
id=id,
|
||||
order=order,
|
||||
global_order=global_order,
|
||||
label=label,
|
||||
maximum=maximum,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_point_of_sale_configuration_limit.additional_properties = d
|
||||
return module_payment_point_of_sale_configuration_limit
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..models.mode_enum import ModeEnum
|
||||
|
||||
T = TypeVar("T", bound="ModulePaymentPointOfSaleConfigurationPriceRule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModulePaymentPointOfSaleConfigurationPriceRule:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
global_order (int):
|
||||
order (int):
|
||||
mode (ModeEnum): * `plus` - + [Current price + value]
|
||||
* `set` - = [Set price to]
|
||||
* `plus_percent` - +% [Current price + current price * value / 100]
|
||||
* `multiply` - * [Current price * value]
|
||||
* `divide` - / [Current price / value]
|
||||
value (str):
|
||||
label (str):
|
||||
should_propagate (bool): does this rule apply on children of the node
|
||||
conditions_json (str):
|
||||
"""
|
||||
|
||||
id: int
|
||||
global_order: int
|
||||
order: int
|
||||
mode: ModeEnum
|
||||
value: str
|
||||
label: str
|
||||
should_propagate: bool
|
||||
conditions_json: str
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
order = self.order
|
||||
|
||||
mode = self.mode.value
|
||||
|
||||
value = self.value
|
||||
|
||||
label = self.label
|
||||
|
||||
should_propagate = self.should_propagate
|
||||
|
||||
conditions_json = self.conditions_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"global_order": global_order,
|
||||
"order": order,
|
||||
"mode": mode,
|
||||
"value": value,
|
||||
"label": label,
|
||||
"should_propagate": should_propagate,
|
||||
"conditions_json": conditions_json,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
mode = ModeEnum(d.pop("mode"))
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
should_propagate = d.pop("should_propagate")
|
||||
|
||||
conditions_json = d.pop("conditions_json")
|
||||
|
||||
module_payment_point_of_sale_configuration_price_rule = cls(
|
||||
id=id,
|
||||
global_order=global_order,
|
||||
order=order,
|
||||
mode=mode,
|
||||
value=value,
|
||||
label=label,
|
||||
should_propagate=should_propagate,
|
||||
conditions_json=conditions_json,
|
||||
)
|
||||
|
||||
module_payment_point_of_sale_configuration_price_rule.additional_properties = d
|
||||
return module_payment_point_of_sale_configuration_price_rule
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_registrations_access_management_configuration import (
|
||||
ModuleRegistrationsAccessManagementConfiguration,
|
||||
)
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleRegistrationAccessManagementActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleRegistrationAccessManagementActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleRegistrationOptions`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleRegistrationsAccessManagementConfiguration): Serializer for
|
||||
`ModuleRegistrationOptionsConfiguration` nested in `ModuleRegistrationOptionsActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleRegistrationsAccessManagementConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_registrations_access_management_configuration import (
|
||||
ModuleRegistrationsAccessManagementConfiguration,
|
||||
)
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleRegistrationsAccessManagementConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_registration_access_management_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_registration_access_management_active_module.additional_properties = d
|
||||
return module_registration_access_management_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import json
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.module_registration_options_configuration import ModuleRegistrationOptionsConfiguration
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ModuleRegistrationOptionsActiveModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleRegistrationOptionsActiveModule:
|
||||
"""Serializer for `ActiveModule` linked to `ModuleRegistrationOptions`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
config (ModuleRegistrationOptionsConfiguration): Serializer for `ModuleRegistrationOptionsConfiguration` nested
|
||||
in `ModuleRegistrationOptionsActiveModuleSerializer`
|
||||
is_deleted (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
config: "ModuleRegistrationOptionsConfiguration"
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
config = self.config.to_dict()
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"config": config,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("config", (None, json.dumps(self.config.to_dict()).encode(), "application/json")))
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.module_registration_options_configuration import ModuleRegistrationOptionsConfiguration
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
config = ModuleRegistrationOptionsConfiguration.from_dict(d.pop("config"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
module_registration_options_active_module = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
config=config,
|
||||
is_deleted=is_deleted,
|
||||
)
|
||||
|
||||
module_registration_options_active_module.additional_properties = d
|
||||
return module_registration_options_active_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ModuleRegistrationOptionsConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleRegistrationOptionsConfiguration:
|
||||
"""Serializer for `ModuleRegistrationOptionsConfiguration` nested in `ModuleRegistrationOptionsActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
root_node (Union[None, int]):
|
||||
title (Union[Unset, str]):
|
||||
description (Union[Unset, str]):
|
||||
title_summary (Union[Unset, str]):
|
||||
display_summary (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
root_node: Union[None, int]
|
||||
title: Union[Unset, str] = UNSET
|
||||
description: Union[Unset, str] = UNSET
|
||||
title_summary: Union[Unset, str] = UNSET
|
||||
display_summary: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
root_node: Union[None, int]
|
||||
root_node = self.root_node
|
||||
|
||||
title = self.title
|
||||
|
||||
description = self.description
|
||||
|
||||
title_summary = self.title_summary
|
||||
|
||||
display_summary = self.display_summary
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"root_node": root_node,
|
||||
}
|
||||
)
|
||||
if title is not UNSET:
|
||||
field_dict["title"] = title
|
||||
if description is not UNSET:
|
||||
field_dict["description"] = description
|
||||
if title_summary is not UNSET:
|
||||
field_dict["title_summary"] = title_summary
|
||||
if display_summary is not UNSET:
|
||||
field_dict["display_summary"] = display_summary
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
def _parse_root_node(data: object) -> Union[None, int]:
|
||||
if data is None:
|
||||
return data
|
||||
return cast(Union[None, int], data)
|
||||
|
||||
root_node = _parse_root_node(d.pop("root_node"))
|
||||
|
||||
title = d.pop("title", UNSET)
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
title_summary = d.pop("title_summary", UNSET)
|
||||
|
||||
display_summary = d.pop("display_summary", UNSET)
|
||||
|
||||
module_registration_options_configuration = cls(
|
||||
id=id,
|
||||
root_node=root_node,
|
||||
title=title,
|
||||
description=description,
|
||||
title_summary=title_summary,
|
||||
display_summary=display_summary,
|
||||
)
|
||||
|
||||
module_registration_options_configuration.additional_properties = d
|
||||
return module_registration_options_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="ModuleRegistrationsAccessManagementConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ModuleRegistrationsAccessManagementConfiguration:
|
||||
"""Serializer for `ModuleRegistrationOptionsConfiguration` nested in `ModuleRegistrationOptionsActiveModuleSerializer`
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
"""
|
||||
|
||||
id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
module_registrations_access_management_configuration = cls(
|
||||
id=id,
|
||||
)
|
||||
|
||||
module_registrations_access_management_configuration.additional_properties = d
|
||||
return module_registrations_access_management_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ModulesBasketFrontendBasketsActionsValidateExtraInfosRetrieveInlineType(str, Enum):
|
||||
ALL = "all"
|
||||
INLINE_ONLY = "inline_only"
|
||||
NO_INLINE = "no_inline"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,158 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Node")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class Node:
|
||||
"""Serializer for Node model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
order (int): Local order between nodes that share the same parent
|
||||
parent_id (int):
|
||||
configuration_id (int):
|
||||
children_ids (list[int]):
|
||||
event (int):
|
||||
event_id (int):
|
||||
internal_key (Union[Unset, str]):
|
||||
cart_configuration_id (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
order: int
|
||||
parent_id: int
|
||||
configuration_id: int
|
||||
children_ids: list[int]
|
||||
event: int
|
||||
event_id: int
|
||||
internal_key: Union[Unset, str] = UNSET
|
||||
cart_configuration_id: Union[Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
order = self.order
|
||||
|
||||
parent_id = self.parent_id
|
||||
|
||||
configuration_id = self.configuration_id
|
||||
|
||||
children_ids = self.children_ids
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
internal_key = self.internal_key
|
||||
|
||||
cart_configuration_id = self.cart_configuration_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"order": order,
|
||||
"parent_id": parent_id,
|
||||
"configuration_id": configuration_id,
|
||||
"children_ids": children_ids,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if internal_key is not UNSET:
|
||||
field_dict["internal_key"] = internal_key
|
||||
if cart_configuration_id is not UNSET:
|
||||
field_dict["cart_configuration_id"] = cart_configuration_id
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("order", (None, str(self.order).encode(), "text/plain")))
|
||||
|
||||
files.append(("parent_id", (None, str(self.parent_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("configuration_id", (None, str(self.configuration_id).encode(), "text/plain")))
|
||||
|
||||
for children_ids_item_element in self.children_ids:
|
||||
files.append(("children_ids", (None, str(children_ids_item_element).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.internal_key, Unset):
|
||||
files.append(("internal_key", (None, str(self.internal_key).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.cart_configuration_id, Unset):
|
||||
files.append(("cart_configuration_id", (None, str(self.cart_configuration_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
parent_id = d.pop("parent_id")
|
||||
|
||||
configuration_id = d.pop("configuration_id")
|
||||
|
||||
children_ids = cast(list[int], d.pop("children_ids"))
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
internal_key = d.pop("internal_key", UNSET)
|
||||
|
||||
cart_configuration_id = d.pop("cart_configuration_id", UNSET)
|
||||
|
||||
node = cls(
|
||||
id=id,
|
||||
order=order,
|
||||
parent_id=parent_id,
|
||||
configuration_id=configuration_id,
|
||||
children_ids=children_ids,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
internal_key=internal_key,
|
||||
cart_configuration_id=cart_configuration_id,
|
||||
)
|
||||
|
||||
node.additional_properties = d
|
||||
return node
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,141 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeAccess")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeAccess:
|
||||
"""Serializer (read/write) for `NodeAccess` model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
label (str):
|
||||
node_configuration_ids (list[int]):
|
||||
condition_id (Union[Unset, int]):
|
||||
is_accessible (Union[Unset, bool]): if True and user matches the conditions they should have access to the node,
|
||||
if False and user matches the conditions they should not have access to the node
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
label: str
|
||||
node_configuration_ids: list[int]
|
||||
condition_id: Union[Unset, int] = UNSET
|
||||
is_accessible: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
label = self.label
|
||||
|
||||
node_configuration_ids = self.node_configuration_ids
|
||||
|
||||
condition_id = self.condition_id
|
||||
|
||||
is_accessible = self.is_accessible
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"label": label,
|
||||
"node_configuration_ids": node_configuration_ids,
|
||||
}
|
||||
)
|
||||
if condition_id is not UNSET:
|
||||
field_dict["condition_id"] = condition_id
|
||||
if is_accessible is not UNSET:
|
||||
field_dict["is_accessible"] = is_accessible
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("label", (None, str(self.label).encode(), "text/plain")))
|
||||
|
||||
for node_configuration_ids_item_element in self.node_configuration_ids:
|
||||
files.append(
|
||||
("node_configuration_ids", (None, str(node_configuration_ids_item_element).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.condition_id, Unset):
|
||||
files.append(("condition_id", (None, str(self.condition_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_accessible, Unset):
|
||||
files.append(("is_accessible", (None, str(self.is_accessible).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
node_configuration_ids = cast(list[int], d.pop("node_configuration_ids"))
|
||||
|
||||
condition_id = d.pop("condition_id", UNSET)
|
||||
|
||||
is_accessible = d.pop("is_accessible", UNSET)
|
||||
|
||||
node_access = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
label=label,
|
||||
node_configuration_ids=node_configuration_ids,
|
||||
condition_id=condition_id,
|
||||
is_accessible=is_accessible,
|
||||
)
|
||||
|
||||
node_access.additional_properties = d
|
||||
return node_access
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodeAccessM2M")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeAccessM2M:
|
||||
"""Serializer (read/write) for `NodeAccessM2M` relation model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
access_id (int):
|
||||
node_configuration_id (int):
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
access_id: int
|
||||
node_configuration_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
access_id = self.access_id
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"access_id": access_id,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("access_id", (None, str(self.access_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
access_id = d.pop("access_id")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
node_access_m2m = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
access_id=access_id,
|
||||
node_configuration_id=node_configuration_id,
|
||||
)
|
||||
|
||||
node_access_m2m.additional_properties = d
|
||||
return node_access_m2m
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,202 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeAvailability")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeAvailability:
|
||||
"""Serializer (read/write) for NodeAvailability model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
name (str):
|
||||
node_configuration_ids (list[int]):
|
||||
event (int):
|
||||
event_id (int):
|
||||
condition_id (Union[Unset, int]):
|
||||
starts_at (Union[None, Unset, datetime.datetime]):
|
||||
ends_at (Union[None, Unset, datetime.datetime]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
name: str
|
||||
node_configuration_ids: list[int]
|
||||
event: int
|
||||
event_id: int
|
||||
condition_id: Union[Unset, int] = UNSET
|
||||
starts_at: Union[None, Unset, datetime.datetime] = UNSET
|
||||
ends_at: Union[None, Unset, datetime.datetime] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
name = self.name
|
||||
|
||||
node_configuration_ids = self.node_configuration_ids
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
condition_id = self.condition_id
|
||||
|
||||
starts_at: Union[None, Unset, str]
|
||||
if isinstance(self.starts_at, Unset):
|
||||
starts_at = UNSET
|
||||
elif isinstance(self.starts_at, datetime.datetime):
|
||||
starts_at = self.starts_at.isoformat()
|
||||
else:
|
||||
starts_at = self.starts_at
|
||||
|
||||
ends_at: Union[None, Unset, str]
|
||||
if isinstance(self.ends_at, Unset):
|
||||
ends_at = UNSET
|
||||
elif isinstance(self.ends_at, datetime.datetime):
|
||||
ends_at = self.ends_at.isoformat()
|
||||
else:
|
||||
ends_at = self.ends_at
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"name": name,
|
||||
"node_configuration_ids": node_configuration_ids,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if condition_id is not UNSET:
|
||||
field_dict["condition_id"] = condition_id
|
||||
if starts_at is not UNSET:
|
||||
field_dict["starts_at"] = starts_at
|
||||
if ends_at is not UNSET:
|
||||
field_dict["ends_at"] = ends_at
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
for node_configuration_ids_item_element in self.node_configuration_ids:
|
||||
files.append(
|
||||
("node_configuration_ids", (None, str(node_configuration_ids_item_element).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.condition_id, Unset):
|
||||
files.append(("condition_id", (None, str(self.condition_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.starts_at, Unset):
|
||||
if isinstance(self.starts_at, datetime.datetime):
|
||||
files.append(("starts_at", (None, self.starts_at.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("starts_at", (None, str(self.starts_at).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.ends_at, Unset):
|
||||
if isinstance(self.ends_at, datetime.datetime):
|
||||
files.append(("ends_at", (None, self.ends_at.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("ends_at", (None, str(self.ends_at).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
node_configuration_ids = cast(list[int], d.pop("node_configuration_ids"))
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
condition_id = d.pop("condition_id", UNSET)
|
||||
|
||||
def _parse_starts_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
starts_at_type_0 = isoparse(data)
|
||||
|
||||
return starts_at_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
starts_at = _parse_starts_at(d.pop("starts_at", UNSET))
|
||||
|
||||
def _parse_ends_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
ends_at_type_0 = isoparse(data)
|
||||
|
||||
return ends_at_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
ends_at = _parse_ends_at(d.pop("ends_at", UNSET))
|
||||
|
||||
node_availability = cls(
|
||||
id=id,
|
||||
name=name,
|
||||
node_configuration_ids=node_configuration_ids,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
condition_id=condition_id,
|
||||
starts_at=starts_at,
|
||||
ends_at=ends_at,
|
||||
)
|
||||
|
||||
node_availability.additional_properties = d
|
||||
return node_availability
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodeAvailabilityM2M")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeAvailabilityM2M:
|
||||
"""Serializer (read/write) for `NodeAvailabilityM2M` relation model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
availability_id (int):
|
||||
node_configuration_id (int):
|
||||
event (int):
|
||||
event_id (int):
|
||||
"""
|
||||
|
||||
id: int
|
||||
availability_id: int
|
||||
node_configuration_id: int
|
||||
event: int
|
||||
event_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
availability_id = self.availability_id
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"availability_id": availability_id,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("availability_id", (None, str(self.availability_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
availability_id = d.pop("availability_id")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
node_availability_m2m = cls(
|
||||
id=id,
|
||||
availability_id=availability_id,
|
||||
node_configuration_id=node_configuration_id,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
)
|
||||
|
||||
node_availability_m2m.additional_properties = d
|
||||
return node_availability_m2m
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,129 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeCartConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeCartConfiguration:
|
||||
"""Serializer (read/write) for NodeCartConfiguration model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
event_id (int):
|
||||
weight (Union[Unset, int]):
|
||||
range_min (Union[Unset, int]):
|
||||
range_max (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
event_id: int
|
||||
weight: Union[Unset, int] = UNSET
|
||||
range_min: Union[Unset, int] = UNSET
|
||||
range_max: Union[Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
weight = self.weight
|
||||
|
||||
range_min = self.range_min
|
||||
|
||||
range_max = self.range_max
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if weight is not UNSET:
|
||||
field_dict["weight"] = weight
|
||||
if range_min is not UNSET:
|
||||
field_dict["range_min"] = range_min
|
||||
if range_max is not UNSET:
|
||||
field_dict["range_max"] = range_max
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.weight, Unset):
|
||||
files.append(("weight", (None, str(self.weight).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.range_min, Unset):
|
||||
files.append(("range_min", (None, str(self.range_min).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.range_max, Unset):
|
||||
files.append(("range_max", (None, str(self.range_max).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
weight = d.pop("weight", UNSET)
|
||||
|
||||
range_min = d.pop("range_min", UNSET)
|
||||
|
||||
range_max = d.pop("range_max", UNSET)
|
||||
|
||||
node_cart_configuration = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
weight=weight,
|
||||
range_min=range_min,
|
||||
range_max=range_max,
|
||||
)
|
||||
|
||||
node_cart_configuration.additional_properties = d
|
||||
return node_cart_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,359 @@
|
||||
import datetime
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from .. import types
|
||||
from ..models.category_enum import CategoryEnum
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeConfiguration")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeConfiguration:
|
||||
"""Serializer (read/write) for NodeConfiguration model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
event (int):
|
||||
event_id (int):
|
||||
description (Union[Unset, str]): description for the node. Some restricted HTML markup is allowed, everything
|
||||
else is filtered out automatically.
|
||||
title (Union[Unset, str]):
|
||||
category (Union[Unset, CategoryEnum]): * `ticket` - Ticket
|
||||
* `item` - Item
|
||||
* `activity` - Activity
|
||||
* `accomodation` - Accomodation
|
||||
* `type` - Type
|
||||
* `group` - Group
|
||||
image (Union[None, Unset, int]):
|
||||
image_style (Union[Unset, Any]):
|
||||
item_style (Union[Unset, Any]):
|
||||
display_price_difference (Union[Unset, bool]):
|
||||
display_limits_difference (Union[Unset, bool]):
|
||||
is_title_displayable (Union[Unset, bool]):
|
||||
is_image_displayable (Union[Unset, bool]):
|
||||
is_description_displayable (Union[Unset, bool]):
|
||||
is_tags_displayable (Union[Unset, bool]):
|
||||
starts_at (Union[None, Unset, datetime.datetime]): Optional start datetime for this node. For display only.
|
||||
ends_at (Union[None, Unset, datetime.datetime]): Optional end datetime for this node. For display only.
|
||||
is_subject_to_lausanne_tax (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
event: int
|
||||
event_id: int
|
||||
description: Union[Unset, str] = UNSET
|
||||
title: Union[Unset, str] = UNSET
|
||||
category: Union[Unset, CategoryEnum] = UNSET
|
||||
image: Union[None, Unset, int] = UNSET
|
||||
image_style: Union[Unset, Any] = UNSET
|
||||
item_style: Union[Unset, Any] = UNSET
|
||||
display_price_difference: Union[Unset, bool] = UNSET
|
||||
display_limits_difference: Union[Unset, bool] = UNSET
|
||||
is_title_displayable: Union[Unset, bool] = UNSET
|
||||
is_image_displayable: Union[Unset, bool] = UNSET
|
||||
is_description_displayable: Union[Unset, bool] = UNSET
|
||||
is_tags_displayable: Union[Unset, bool] = UNSET
|
||||
starts_at: Union[None, Unset, datetime.datetime] = UNSET
|
||||
ends_at: Union[None, Unset, datetime.datetime] = UNSET
|
||||
is_subject_to_lausanne_tax: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
description = self.description
|
||||
|
||||
title = self.title
|
||||
|
||||
category: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.category, Unset):
|
||||
category = self.category.value
|
||||
|
||||
image: Union[None, Unset, int]
|
||||
if isinstance(self.image, Unset):
|
||||
image = UNSET
|
||||
else:
|
||||
image = self.image
|
||||
|
||||
image_style = self.image_style
|
||||
|
||||
item_style = self.item_style
|
||||
|
||||
display_price_difference = self.display_price_difference
|
||||
|
||||
display_limits_difference = self.display_limits_difference
|
||||
|
||||
is_title_displayable = self.is_title_displayable
|
||||
|
||||
is_image_displayable = self.is_image_displayable
|
||||
|
||||
is_description_displayable = self.is_description_displayable
|
||||
|
||||
is_tags_displayable = self.is_tags_displayable
|
||||
|
||||
starts_at: Union[None, Unset, str]
|
||||
if isinstance(self.starts_at, Unset):
|
||||
starts_at = UNSET
|
||||
elif isinstance(self.starts_at, datetime.datetime):
|
||||
starts_at = self.starts_at.isoformat()
|
||||
else:
|
||||
starts_at = self.starts_at
|
||||
|
||||
ends_at: Union[None, Unset, str]
|
||||
if isinstance(self.ends_at, Unset):
|
||||
ends_at = UNSET
|
||||
elif isinstance(self.ends_at, datetime.datetime):
|
||||
ends_at = self.ends_at.isoformat()
|
||||
else:
|
||||
ends_at = self.ends_at
|
||||
|
||||
is_subject_to_lausanne_tax = self.is_subject_to_lausanne_tax
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if description is not UNSET:
|
||||
field_dict["description"] = description
|
||||
if title is not UNSET:
|
||||
field_dict["title"] = title
|
||||
if category is not UNSET:
|
||||
field_dict["category"] = category
|
||||
if image is not UNSET:
|
||||
field_dict["image"] = image
|
||||
if image_style is not UNSET:
|
||||
field_dict["image_style"] = image_style
|
||||
if item_style is not UNSET:
|
||||
field_dict["item_style"] = item_style
|
||||
if display_price_difference is not UNSET:
|
||||
field_dict["display_price_difference"] = display_price_difference
|
||||
if display_limits_difference is not UNSET:
|
||||
field_dict["display_limits_difference"] = display_limits_difference
|
||||
if is_title_displayable is not UNSET:
|
||||
field_dict["is_title_displayable"] = is_title_displayable
|
||||
if is_image_displayable is not UNSET:
|
||||
field_dict["is_image_displayable"] = is_image_displayable
|
||||
if is_description_displayable is not UNSET:
|
||||
field_dict["is_description_displayable"] = is_description_displayable
|
||||
if is_tags_displayable is not UNSET:
|
||||
field_dict["is_tags_displayable"] = is_tags_displayable
|
||||
if starts_at is not UNSET:
|
||||
field_dict["starts_at"] = starts_at
|
||||
if ends_at is not UNSET:
|
||||
field_dict["ends_at"] = ends_at
|
||||
if is_subject_to_lausanne_tax is not UNSET:
|
||||
field_dict["is_subject_to_lausanne_tax"] = is_subject_to_lausanne_tax
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.description, Unset):
|
||||
files.append(("description", (None, str(self.description).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.title, Unset):
|
||||
files.append(("title", (None, str(self.title).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.category, Unset):
|
||||
files.append(("category", (None, str(self.category.value).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.image, Unset):
|
||||
if isinstance(self.image, int):
|
||||
files.append(("image", (None, str(self.image).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("image", (None, str(self.image).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.image_style, Unset):
|
||||
files.append(("image_style", (None, str(self.image_style).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.item_style, Unset):
|
||||
files.append(("item_style", (None, str(self.item_style).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.display_price_difference, Unset):
|
||||
files.append(
|
||||
("display_price_difference", (None, str(self.display_price_difference).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.display_limits_difference, Unset):
|
||||
files.append(
|
||||
("display_limits_difference", (None, str(self.display_limits_difference).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.is_title_displayable, Unset):
|
||||
files.append(("is_title_displayable", (None, str(self.is_title_displayable).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_image_displayable, Unset):
|
||||
files.append(("is_image_displayable", (None, str(self.is_image_displayable).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_description_displayable, Unset):
|
||||
files.append(
|
||||
("is_description_displayable", (None, str(self.is_description_displayable).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.is_tags_displayable, Unset):
|
||||
files.append(("is_tags_displayable", (None, str(self.is_tags_displayable).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.starts_at, Unset):
|
||||
if isinstance(self.starts_at, datetime.datetime):
|
||||
files.append(("starts_at", (None, self.starts_at.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("starts_at", (None, str(self.starts_at).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.ends_at, Unset):
|
||||
if isinstance(self.ends_at, datetime.datetime):
|
||||
files.append(("ends_at", (None, self.ends_at.isoformat().encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("ends_at", (None, str(self.ends_at).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_subject_to_lausanne_tax, Unset):
|
||||
files.append(
|
||||
("is_subject_to_lausanne_tax", (None, str(self.is_subject_to_lausanne_tax).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
title = d.pop("title", UNSET)
|
||||
|
||||
_category = d.pop("category", UNSET)
|
||||
category: Union[Unset, CategoryEnum]
|
||||
if isinstance(_category, Unset):
|
||||
category = UNSET
|
||||
else:
|
||||
category = CategoryEnum(_category)
|
||||
|
||||
def _parse_image(data: object) -> Union[None, Unset, int]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, int], data)
|
||||
|
||||
image = _parse_image(d.pop("image", UNSET))
|
||||
|
||||
image_style = d.pop("image_style", UNSET)
|
||||
|
||||
item_style = d.pop("item_style", UNSET)
|
||||
|
||||
display_price_difference = d.pop("display_price_difference", UNSET)
|
||||
|
||||
display_limits_difference = d.pop("display_limits_difference", UNSET)
|
||||
|
||||
is_title_displayable = d.pop("is_title_displayable", UNSET)
|
||||
|
||||
is_image_displayable = d.pop("is_image_displayable", UNSET)
|
||||
|
||||
is_description_displayable = d.pop("is_description_displayable", UNSET)
|
||||
|
||||
is_tags_displayable = d.pop("is_tags_displayable", UNSET)
|
||||
|
||||
def _parse_starts_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
starts_at_type_0 = isoparse(data)
|
||||
|
||||
return starts_at_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
starts_at = _parse_starts_at(d.pop("starts_at", UNSET))
|
||||
|
||||
def _parse_ends_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, str):
|
||||
raise TypeError()
|
||||
ends_at_type_0 = isoparse(data)
|
||||
|
||||
return ends_at_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
return cast(Union[None, Unset, datetime.datetime], data)
|
||||
|
||||
ends_at = _parse_ends_at(d.pop("ends_at", UNSET))
|
||||
|
||||
is_subject_to_lausanne_tax = d.pop("is_subject_to_lausanne_tax", UNSET)
|
||||
|
||||
node_configuration = cls(
|
||||
id=id,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
description=description,
|
||||
title=title,
|
||||
category=category,
|
||||
image=image,
|
||||
image_style=image_style,
|
||||
item_style=item_style,
|
||||
display_price_difference=display_price_difference,
|
||||
display_limits_difference=display_limits_difference,
|
||||
is_title_displayable=is_title_displayable,
|
||||
is_image_displayable=is_image_displayable,
|
||||
is_description_displayable=is_description_displayable,
|
||||
is_tags_displayable=is_tags_displayable,
|
||||
starts_at=starts_at,
|
||||
ends_at=ends_at,
|
||||
is_subject_to_lausanne_tax=is_subject_to_lausanne_tax,
|
||||
)
|
||||
|
||||
node_configuration.additional_properties = d
|
||||
return node_configuration
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,257 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..models.model_form_line_type import ModelFormLineType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeExtraInfo")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeExtraInfo:
|
||||
"""Serializer (read/write) for `NodeExtraInfo` model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
group_id (int):
|
||||
order (int):
|
||||
type_ (ModelFormLineType): * `text` - Simple text
|
||||
* `email` - Email
|
||||
* `phone` - Phone
|
||||
* `country` - Country
|
||||
* `numerical` - Numerical
|
||||
* `textarea` - Multi-line text input
|
||||
* `boolean` - Boolean
|
||||
* `datetime` - Datetime
|
||||
* `date` - Date
|
||||
* `date_major` - Birthdate with majority required
|
||||
* `choice` - Choice
|
||||
* `file` - File
|
||||
name (str):
|
||||
text (str):
|
||||
event (int):
|
||||
event_id (int):
|
||||
help_text (Union[Unset, str]):
|
||||
is_required (Union[Unset, bool]):
|
||||
choices_json (Union[None, Unset, str]):
|
||||
major_json (Union[None, Unset, str]):
|
||||
range_json (Union[None, Unset, str]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
group_id: int
|
||||
order: int
|
||||
type_: ModelFormLineType
|
||||
name: str
|
||||
text: str
|
||||
event: int
|
||||
event_id: int
|
||||
help_text: Union[Unset, str] = UNSET
|
||||
is_required: Union[Unset, bool] = UNSET
|
||||
choices_json: Union[None, Unset, str] = UNSET
|
||||
major_json: Union[None, Unset, str] = UNSET
|
||||
range_json: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
group_id = self.group_id
|
||||
|
||||
order = self.order
|
||||
|
||||
type_ = self.type_.value
|
||||
|
||||
name = self.name
|
||||
|
||||
text = self.text
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
help_text = self.help_text
|
||||
|
||||
is_required = self.is_required
|
||||
|
||||
choices_json: Union[None, Unset, str]
|
||||
if isinstance(self.choices_json, Unset):
|
||||
choices_json = UNSET
|
||||
else:
|
||||
choices_json = self.choices_json
|
||||
|
||||
major_json: Union[None, Unset, str]
|
||||
if isinstance(self.major_json, Unset):
|
||||
major_json = UNSET
|
||||
else:
|
||||
major_json = self.major_json
|
||||
|
||||
range_json: Union[None, Unset, str]
|
||||
if isinstance(self.range_json, Unset):
|
||||
range_json = UNSET
|
||||
else:
|
||||
range_json = self.range_json
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"group_id": group_id,
|
||||
"order": order,
|
||||
"type": type_,
|
||||
"name": name,
|
||||
"text": text,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if help_text is not UNSET:
|
||||
field_dict["help_text"] = help_text
|
||||
if is_required is not UNSET:
|
||||
field_dict["is_required"] = is_required
|
||||
if choices_json is not UNSET:
|
||||
field_dict["choices_json"] = choices_json
|
||||
if major_json is not UNSET:
|
||||
field_dict["major_json"] = major_json
|
||||
if range_json is not UNSET:
|
||||
field_dict["range_json"] = range_json
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("group_id", (None, str(self.group_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("order", (None, str(self.order).encode(), "text/plain")))
|
||||
|
||||
files.append(("type", (None, str(self.type_.value).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
files.append(("text", (None, str(self.text).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.help_text, Unset):
|
||||
files.append(("help_text", (None, str(self.help_text).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_required, Unset):
|
||||
files.append(("is_required", (None, str(self.is_required).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.choices_json, Unset):
|
||||
if isinstance(self.choices_json, str):
|
||||
files.append(("choices_json", (None, str(self.choices_json).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("choices_json", (None, str(self.choices_json).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.major_json, Unset):
|
||||
if isinstance(self.major_json, str):
|
||||
files.append(("major_json", (None, str(self.major_json).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("major_json", (None, str(self.major_json).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.range_json, Unset):
|
||||
if isinstance(self.range_json, str):
|
||||
files.append(("range_json", (None, str(self.range_json).encode(), "text/plain")))
|
||||
else:
|
||||
files.append(("range_json", (None, str(self.range_json).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
group_id = d.pop("group_id")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
type_ = ModelFormLineType(d.pop("type"))
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
text = d.pop("text")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
help_text = d.pop("help_text", UNSET)
|
||||
|
||||
is_required = d.pop("is_required", UNSET)
|
||||
|
||||
def _parse_choices_json(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
choices_json = _parse_choices_json(d.pop("choices_json", UNSET))
|
||||
|
||||
def _parse_major_json(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
major_json = _parse_major_json(d.pop("major_json", UNSET))
|
||||
|
||||
def _parse_range_json(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
range_json = _parse_range_json(d.pop("range_json", UNSET))
|
||||
|
||||
node_extra_info = cls(
|
||||
id=id,
|
||||
group_id=group_id,
|
||||
order=order,
|
||||
type_=type_,
|
||||
name=name,
|
||||
text=text,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
help_text=help_text,
|
||||
is_required=is_required,
|
||||
choices_json=choices_json,
|
||||
major_json=major_json,
|
||||
range_json=range_json,
|
||||
)
|
||||
|
||||
node_extra_info.additional_properties = d
|
||||
return node_extra_info
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,161 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeExtraInfoGroup")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeExtraInfoGroup:
|
||||
"""Serializer (read/write) for `NodeExtraInfoGroup` model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
name (str):
|
||||
order (int):
|
||||
node_configuration_ids (list[int]):
|
||||
extra_info_ids (list[int]):
|
||||
event (int):
|
||||
event_id (int):
|
||||
is_inline (Union[Unset, bool]):
|
||||
is_required (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
name: str
|
||||
order: int
|
||||
node_configuration_ids: list[int]
|
||||
extra_info_ids: list[int]
|
||||
event: int
|
||||
event_id: int
|
||||
is_inline: Union[Unset, bool] = UNSET
|
||||
is_required: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
name = self.name
|
||||
|
||||
order = self.order
|
||||
|
||||
node_configuration_ids = self.node_configuration_ids
|
||||
|
||||
extra_info_ids = self.extra_info_ids
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
is_inline = self.is_inline
|
||||
|
||||
is_required = self.is_required
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"name": name,
|
||||
"order": order,
|
||||
"node_configuration_ids": node_configuration_ids,
|
||||
"extra_info_ids": extra_info_ids,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
if is_inline is not UNSET:
|
||||
field_dict["is_inline"] = is_inline
|
||||
if is_required is not UNSET:
|
||||
field_dict["is_required"] = is_required
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
files.append(("order", (None, str(self.order).encode(), "text/plain")))
|
||||
|
||||
for node_configuration_ids_item_element in self.node_configuration_ids:
|
||||
files.append(
|
||||
("node_configuration_ids", (None, str(node_configuration_ids_item_element).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
for extra_info_ids_item_element in self.extra_info_ids:
|
||||
files.append(("extra_info_ids", (None, str(extra_info_ids_item_element).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_inline, Unset):
|
||||
files.append(("is_inline", (None, str(self.is_inline).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.is_required, Unset):
|
||||
files.append(("is_required", (None, str(self.is_required).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
node_configuration_ids = cast(list[int], d.pop("node_configuration_ids"))
|
||||
|
||||
extra_info_ids = cast(list[int], d.pop("extra_info_ids"))
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
is_inline = d.pop("is_inline", UNSET)
|
||||
|
||||
is_required = d.pop("is_required", UNSET)
|
||||
|
||||
node_extra_info_group = cls(
|
||||
id=id,
|
||||
name=name,
|
||||
order=order,
|
||||
node_configuration_ids=node_configuration_ids,
|
||||
extra_info_ids=extra_info_ids,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
is_inline=is_inline,
|
||||
is_required=is_required,
|
||||
)
|
||||
|
||||
node_extra_info_group.additional_properties = d
|
||||
return node_extra_info_group
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodeExtraInfoGroupM2M")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeExtraInfoGroupM2M:
|
||||
"""Serializer (read/write) for `NodeExtraInfoGroupM2M` relation model
|
||||
|
||||
Attributes:
|
||||
id (int):
|
||||
group_id (int):
|
||||
node_configuration_id (int):
|
||||
event (int):
|
||||
event_id (int):
|
||||
"""
|
||||
|
||||
id: int
|
||||
group_id: int
|
||||
node_configuration_id: int
|
||||
event: int
|
||||
event_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
group_id = self.group_id
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"group_id": group_id,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("group_id", (None, str(self.group_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
group_id = d.pop("group_id")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
node_extra_info_group_m2m = cls(
|
||||
id=id,
|
||||
group_id=group_id,
|
||||
node_configuration_id=node_configuration_id,
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
)
|
||||
|
||||
node_extra_info_group_m2m.additional_properties = d
|
||||
return node_extra_info_group_m2m
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,180 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodeLimit")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeLimit:
|
||||
"""Serializer (read/write) for `NodeLimit` model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
key (str):
|
||||
label (str):
|
||||
maximum (int):
|
||||
order (int):
|
||||
global_order (int):
|
||||
node_configuration_ids (list[int]):
|
||||
is_deleted (Union[Unset, bool]):
|
||||
condition_id (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
key: str
|
||||
label: str
|
||||
maximum: int
|
||||
order: int
|
||||
global_order: int
|
||||
node_configuration_ids: list[int]
|
||||
is_deleted: Union[Unset, bool] = UNSET
|
||||
condition_id: Union[Unset, int] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
key = self.key
|
||||
|
||||
label = self.label
|
||||
|
||||
maximum = self.maximum
|
||||
|
||||
order = self.order
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
node_configuration_ids = self.node_configuration_ids
|
||||
|
||||
is_deleted = self.is_deleted
|
||||
|
||||
condition_id = self.condition_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"key": key,
|
||||
"label": label,
|
||||
"maximum": maximum,
|
||||
"order": order,
|
||||
"global_order": global_order,
|
||||
"node_configuration_ids": node_configuration_ids,
|
||||
}
|
||||
)
|
||||
if is_deleted is not UNSET:
|
||||
field_dict["is_deleted"] = is_deleted
|
||||
if condition_id is not UNSET:
|
||||
field_dict["condition_id"] = condition_id
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("key", (None, str(self.key).encode(), "text/plain")))
|
||||
|
||||
files.append(("label", (None, str(self.label).encode(), "text/plain")))
|
||||
|
||||
files.append(("maximum", (None, str(self.maximum).encode(), "text/plain")))
|
||||
|
||||
files.append(("order", (None, str(self.order).encode(), "text/plain")))
|
||||
|
||||
files.append(("global_order", (None, str(self.global_order).encode(), "text/plain")))
|
||||
|
||||
for node_configuration_ids_item_element in self.node_configuration_ids:
|
||||
files.append(
|
||||
("node_configuration_ids", (None, str(node_configuration_ids_item_element).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.is_deleted, Unset):
|
||||
files.append(("is_deleted", (None, str(self.is_deleted).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.condition_id, Unset):
|
||||
files.append(("condition_id", (None, str(self.condition_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
key = d.pop("key")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
maximum = d.pop("maximum")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
node_configuration_ids = cast(list[int], d.pop("node_configuration_ids"))
|
||||
|
||||
is_deleted = d.pop("is_deleted", UNSET)
|
||||
|
||||
condition_id = d.pop("condition_id", UNSET)
|
||||
|
||||
node_limit = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
key=key,
|
||||
label=label,
|
||||
maximum=maximum,
|
||||
order=order,
|
||||
global_order=global_order,
|
||||
node_configuration_ids=node_configuration_ids,
|
||||
is_deleted=is_deleted,
|
||||
condition_id=condition_id,
|
||||
)
|
||||
|
||||
node_limit.additional_properties = d
|
||||
return node_limit
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodeLimitM2M")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeLimitM2M:
|
||||
"""Serializer (read/write) for `NodeLimitM2M` relation model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
limit_id (int):
|
||||
node_configuration_id (int):
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
limit_id: int
|
||||
node_configuration_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
limit_id = self.limit_id
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"limit_id": limit_id,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("limit_id", (None, str(self.limit_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
limit_id = d.pop("limit_id")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
node_limit_m2m = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
limit_id=limit_id,
|
||||
node_configuration_id=node_configuration_id,
|
||||
)
|
||||
|
||||
node_limit_m2m.additional_properties = d
|
||||
return node_limit_m2m
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,84 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
T = TypeVar("T", bound="NodeLimitUsage")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeLimitUsage:
|
||||
"""Serializer for node used on node stock endpoints.
|
||||
|
||||
Attributes:
|
||||
label (str): Label of related limit.
|
||||
count_reserved (int): Number of times this limit has been taken.
|
||||
maximum (int): Maximum of times this limit can be taken.
|
||||
remaining (int): Number of times left.
|
||||
"""
|
||||
|
||||
label: str
|
||||
count_reserved: int
|
||||
maximum: int
|
||||
remaining: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
label = self.label
|
||||
|
||||
count_reserved = self.count_reserved
|
||||
|
||||
maximum = self.maximum
|
||||
|
||||
remaining = self.remaining
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"label": label,
|
||||
"count_reserved": count_reserved,
|
||||
"maximum": maximum,
|
||||
"remaining": remaining,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
label = d.pop("label")
|
||||
|
||||
count_reserved = d.pop("count_reserved")
|
||||
|
||||
maximum = d.pop("maximum")
|
||||
|
||||
remaining = d.pop("remaining")
|
||||
|
||||
node_limit_usage = cls(
|
||||
label=label,
|
||||
count_reserved=count_reserved,
|
||||
maximum=maximum,
|
||||
remaining=remaining,
|
||||
)
|
||||
|
||||
node_limit_usage.additional_properties = d
|
||||
return node_limit_usage
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,185 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
from ..models.mode_enum import ModeEnum
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="NodePriceRule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodePriceRule:
|
||||
"""Serializer (read/write) for `NodePriceRule` model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
global_order (int):
|
||||
order (int):
|
||||
mode (ModeEnum): * `plus` - + [Current price + value]
|
||||
* `set` - = [Set price to]
|
||||
* `plus_percent` - +% [Current price + current price * value / 100]
|
||||
* `multiply` - * [Current price * value]
|
||||
* `divide` - / [Current price / value]
|
||||
value (str):
|
||||
label (str):
|
||||
node_configuration_ids (list[int]):
|
||||
condition_id (Union[Unset, int]):
|
||||
should_propagate (Union[Unset, bool]): does this rule apply on children of the node
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
global_order: int
|
||||
order: int
|
||||
mode: ModeEnum
|
||||
value: str
|
||||
label: str
|
||||
node_configuration_ids: list[int]
|
||||
condition_id: Union[Unset, int] = UNSET
|
||||
should_propagate: Union[Unset, bool] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
global_order = self.global_order
|
||||
|
||||
order = self.order
|
||||
|
||||
mode = self.mode.value
|
||||
|
||||
value = self.value
|
||||
|
||||
label = self.label
|
||||
|
||||
node_configuration_ids = self.node_configuration_ids
|
||||
|
||||
condition_id = self.condition_id
|
||||
|
||||
should_propagate = self.should_propagate
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"global_order": global_order,
|
||||
"order": order,
|
||||
"mode": mode,
|
||||
"value": value,
|
||||
"label": label,
|
||||
"node_configuration_ids": node_configuration_ids,
|
||||
}
|
||||
)
|
||||
if condition_id is not UNSET:
|
||||
field_dict["condition_id"] = condition_id
|
||||
if should_propagate is not UNSET:
|
||||
field_dict["should_propagate"] = should_propagate
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("global_order", (None, str(self.global_order).encode(), "text/plain")))
|
||||
|
||||
files.append(("order", (None, str(self.order).encode(), "text/plain")))
|
||||
|
||||
files.append(("mode", (None, str(self.mode.value).encode(), "text/plain")))
|
||||
|
||||
files.append(("value", (None, str(self.value).encode(), "text/plain")))
|
||||
|
||||
files.append(("label", (None, str(self.label).encode(), "text/plain")))
|
||||
|
||||
for node_configuration_ids_item_element in self.node_configuration_ids:
|
||||
files.append(
|
||||
("node_configuration_ids", (None, str(node_configuration_ids_item_element).encode(), "text/plain"))
|
||||
)
|
||||
|
||||
if not isinstance(self.condition_id, Unset):
|
||||
files.append(("condition_id", (None, str(self.condition_id).encode(), "text/plain")))
|
||||
|
||||
if not isinstance(self.should_propagate, Unset):
|
||||
files.append(("should_propagate", (None, str(self.should_propagate).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
global_order = d.pop("global_order")
|
||||
|
||||
order = d.pop("order")
|
||||
|
||||
mode = ModeEnum(d.pop("mode"))
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
label = d.pop("label")
|
||||
|
||||
node_configuration_ids = cast(list[int], d.pop("node_configuration_ids"))
|
||||
|
||||
condition_id = d.pop("condition_id", UNSET)
|
||||
|
||||
should_propagate = d.pop("should_propagate", UNSET)
|
||||
|
||||
node_price_rule = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
global_order=global_order,
|
||||
order=order,
|
||||
mode=mode,
|
||||
value=value,
|
||||
label=label,
|
||||
node_configuration_ids=node_configuration_ids,
|
||||
condition_id=condition_id,
|
||||
should_propagate=should_propagate,
|
||||
)
|
||||
|
||||
node_price_rule.additional_properties = d
|
||||
return node_price_rule
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodePriceRuleM2M")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodePriceRuleM2M:
|
||||
"""Serializer (read/write) for `NodePriceRuleM2M` relation model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
price_rule_id (int):
|
||||
node_configuration_id (int):
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
price_rule_id: int
|
||||
node_configuration_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
price_rule_id = self.price_rule_id
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"price_rule_id": price_rule_id,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("price_rule_id", (None, str(self.price_rule_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
price_rule_id = d.pop("price_rule_id")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
node_price_rule_m2m = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
price_rule_id=price_rule_id,
|
||||
node_configuration_id=node_configuration_id,
|
||||
)
|
||||
|
||||
node_price_rule_m2m.additional_properties = d
|
||||
return node_price_rule_m2m
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,147 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.node_limit_usage import NodeLimitUsage
|
||||
|
||||
|
||||
T = TypeVar("T", bound="NodeStock")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeStock:
|
||||
"""Serializer for mapping the stock of each Node.
|
||||
|
||||
Attributes:
|
||||
id (int): Id of node
|
||||
title (str): Title of the equivalent `SelectedRootNode`
|
||||
root_path (list[str]): List of title on the path from root to the node.
|
||||
count_total (int): Total number of items that have been purchased, are being purchased, have been refunded or
|
||||
are only added to a basket.
|
||||
count_new (int): Number of items that are in a basket (but not purchased, nor are being purchased, nor refunded)
|
||||
count_payment_in_progress (int): Number of items that are currently being purchased.
|
||||
count_validated (int): Number of items that have been purchased.
|
||||
count_reserved (int): Number of items that are reserved (validated + being paid).
|
||||
count_refunded (int): Number of items that have been refunded.
|
||||
limits (list['NodeLimitUsage']): Any stock limits that this item has
|
||||
"""
|
||||
|
||||
id: int
|
||||
title: str
|
||||
root_path: list[str]
|
||||
count_total: int
|
||||
count_new: int
|
||||
count_payment_in_progress: int
|
||||
count_validated: int
|
||||
count_reserved: int
|
||||
count_refunded: int
|
||||
limits: list["NodeLimitUsage"]
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
id = self.id
|
||||
|
||||
title = self.title
|
||||
|
||||
root_path = self.root_path
|
||||
|
||||
count_total = self.count_total
|
||||
|
||||
count_new = self.count_new
|
||||
|
||||
count_payment_in_progress = self.count_payment_in_progress
|
||||
|
||||
count_validated = self.count_validated
|
||||
|
||||
count_reserved = self.count_reserved
|
||||
|
||||
count_refunded = self.count_refunded
|
||||
|
||||
limits = []
|
||||
for limits_item_data in self.limits:
|
||||
limits_item = limits_item_data.to_dict()
|
||||
limits.append(limits_item)
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"title": title,
|
||||
"root_path": root_path,
|
||||
"count_total": count_total,
|
||||
"count_new": count_new,
|
||||
"count_payment_in_progress": count_payment_in_progress,
|
||||
"count_validated": count_validated,
|
||||
"count_reserved": count_reserved,
|
||||
"count_refunded": count_refunded,
|
||||
"limits": limits,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.node_limit_usage import NodeLimitUsage
|
||||
|
||||
d = dict(src_dict)
|
||||
id = d.pop("id")
|
||||
|
||||
title = d.pop("title")
|
||||
|
||||
root_path = cast(list[str], d.pop("root_path"))
|
||||
|
||||
count_total = d.pop("count_total")
|
||||
|
||||
count_new = d.pop("count_new")
|
||||
|
||||
count_payment_in_progress = d.pop("count_payment_in_progress")
|
||||
|
||||
count_validated = d.pop("count_validated")
|
||||
|
||||
count_reserved = d.pop("count_reserved")
|
||||
|
||||
count_refunded = d.pop("count_refunded")
|
||||
|
||||
limits = []
|
||||
_limits = d.pop("limits")
|
||||
for limits_item_data in _limits:
|
||||
limits_item = NodeLimitUsage.from_dict(limits_item_data)
|
||||
|
||||
limits.append(limits_item)
|
||||
|
||||
node_stock = cls(
|
||||
id=id,
|
||||
title=title,
|
||||
root_path=root_path,
|
||||
count_total=count_total,
|
||||
count_new=count_new,
|
||||
count_payment_in_progress=count_payment_in_progress,
|
||||
count_validated=count_validated,
|
||||
count_reserved=count_reserved,
|
||||
count_refunded=count_refunded,
|
||||
limits=limits,
|
||||
)
|
||||
|
||||
node_stock.additional_properties = d
|
||||
return node_stock
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,112 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, TypeVar
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from .. import types
|
||||
|
||||
T = TypeVar("T", bound="NodeTag")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class NodeTag:
|
||||
"""Serializer (read/write) for `NodeTag` model
|
||||
|
||||
Attributes:
|
||||
event (int):
|
||||
event_id (int):
|
||||
id (int):
|
||||
name (str):
|
||||
node_configuration_id (int):
|
||||
"""
|
||||
|
||||
event: int
|
||||
event_id: int
|
||||
id: int
|
||||
name: str
|
||||
node_configuration_id: int
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
event = self.event
|
||||
|
||||
event_id = self.event_id
|
||||
|
||||
id = self.id
|
||||
|
||||
name = self.name
|
||||
|
||||
node_configuration_id = self.node_configuration_id
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"event": event,
|
||||
"event_id": event_id,
|
||||
"id": id,
|
||||
"name": name,
|
||||
"node_configuration_id": node_configuration_id,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> types.RequestFiles:
|
||||
files: types.RequestFiles = []
|
||||
|
||||
files.append(("event", (None, str(self.event).encode(), "text/plain")))
|
||||
|
||||
files.append(("event_id", (None, str(self.event_id).encode(), "text/plain")))
|
||||
|
||||
files.append(("id", (None, str(self.id).encode(), "text/plain")))
|
||||
|
||||
files.append(("name", (None, str(self.name).encode(), "text/plain")))
|
||||
|
||||
files.append(("node_configuration_id", (None, str(self.node_configuration_id).encode(), "text/plain")))
|
||||
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
||||
|
||||
return files
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
d = dict(src_dict)
|
||||
event = d.pop("event")
|
||||
|
||||
event_id = d.pop("event_id")
|
||||
|
||||
id = d.pop("id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
node_configuration_id = d.pop("node_configuration_id")
|
||||
|
||||
node_tag = cls(
|
||||
event=event,
|
||||
event_id=event_id,
|
||||
id=id,
|
||||
name=name,
|
||||
node_configuration_id=node_configuration_id,
|
||||
)
|
||||
|
||||
node_tag.additional_properties = d
|
||||
return node_tag
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,16 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class OperatorEnum(str, Enum):
|
||||
CONTAINS = "contains"
|
||||
EXISTS = "exists"
|
||||
IS_IN = "is in"
|
||||
VALUE_0 = ">"
|
||||
VALUE_1 = ">="
|
||||
VALUE_2 = "="
|
||||
VALUE_3 = "!="
|
||||
VALUE_4 = "<"
|
||||
VALUE_5 = "<="
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.access_management_place import AccessManagementPlace
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedAccessManagementPlaceList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedAccessManagementPlaceList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['AccessManagementPlace']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["AccessManagementPlace"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.access_management_place import AccessManagementPlace
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = AccessManagementPlace.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_access_management_place_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_access_management_place_list.additional_properties = d
|
||||
return paginated_access_management_place_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.api_token import ApiToken
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedApiTokenList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedApiTokenList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['ApiToken']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["ApiToken"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.api_token import ApiToken
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = ApiToken.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_api_token_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_api_token_list.additional_properties = d
|
||||
return paginated_api_token_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.billing_information import BillingInformation
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedBillingInformationList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedBillingInformationList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['BillingInformation']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["BillingInformation"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.billing_information import BillingInformation
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = BillingInformation.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_billing_information_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_billing_information_list.additional_properties = d
|
||||
return paginated_billing_information_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.condition import Condition
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedConditionList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedConditionList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['Condition']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["Condition"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.condition import Condition
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = Condition.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_condition_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_condition_list.additional_properties = d
|
||||
return paginated_condition_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.confirmation_page_extra_text_active_module import ConfirmationPageExtraTextActiveModule
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedConfirmationPageExtraTextActiveModuleList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedConfirmationPageExtraTextActiveModuleList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['ConfirmationPageExtraTextActiveModule']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["ConfirmationPageExtraTextActiveModule"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.confirmation_page_extra_text_active_module import ConfirmationPageExtraTextActiveModule
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = ConfirmationPageExtraTextActiveModule.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_confirmation_page_extra_text_active_module_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_confirmation_page_extra_text_active_module_list.additional_properties = d
|
||||
return paginated_confirmation_page_extra_text_active_module_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.document import Document
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedDocumentList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedDocumentList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['Document']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["Document"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.document import Document
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = Document.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_document_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_document_list.additional_properties = d
|
||||
return paginated_document_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.event import Event
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedEventList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedEventList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['Event']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["Event"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.event import Event
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = Event.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_event_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_event_list.additional_properties = d
|
||||
return paginated_event_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.frontend_basket import FrontendBasket
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedFrontendBasketList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedFrontendBasketList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['FrontendBasket']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["FrontendBasket"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.frontend_basket import FrontendBasket
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = FrontendBasket.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_frontend_basket_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_frontend_basket_list.additional_properties = d
|
||||
return paginated_frontend_basket_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.frontend_login import FrontendLogin
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedFrontendLoginList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedFrontendLoginList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['FrontendLogin']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["FrontendLogin"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.frontend_login import FrontendLogin
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = FrontendLogin.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_frontend_login_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_frontend_login_list.additional_properties = d
|
||||
return paginated_frontend_login_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.invoice import Invoice
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedInvoiceList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedInvoiceList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['Invoice']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["Invoice"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.invoice import Invoice
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = Invoice.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_invoice_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_invoice_list.additional_properties = d
|
||||
return paginated_invoice_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,123 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.login_method import LoginMethod
|
||||
|
||||
|
||||
T = TypeVar("T", bound="PaginatedLoginMethodList")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class PaginatedLoginMethodList:
|
||||
"""
|
||||
Attributes:
|
||||
count (int): Example: 123.
|
||||
results (list['LoginMethod']):
|
||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&page_limit=100.
|
||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&page_limit=100.
|
||||
"""
|
||||
|
||||
count: int
|
||||
results: list["LoginMethod"]
|
||||
next_: Union[None, Unset, str] = UNSET
|
||||
previous: Union[None, Unset, str] = UNSET
|
||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
count = self.count
|
||||
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
results.append(results_item)
|
||||
|
||||
next_: Union[None, Unset, str]
|
||||
if isinstance(self.next_, Unset):
|
||||
next_ = UNSET
|
||||
else:
|
||||
next_ = self.next_
|
||||
|
||||
previous: Union[None, Unset, str]
|
||||
if isinstance(self.previous, Unset):
|
||||
previous = UNSET
|
||||
else:
|
||||
previous = self.previous
|
||||
|
||||
field_dict: dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"count": count,
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_ is not UNSET:
|
||||
field_dict["next"] = next_
|
||||
if previous is not UNSET:
|
||||
field_dict["previous"] = previous
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||
from ..models.login_method import LoginMethod
|
||||
|
||||
d = dict(src_dict)
|
||||
count = d.pop("count")
|
||||
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = LoginMethod.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
next_ = _parse_next_(d.pop("next", UNSET))
|
||||
|
||||
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
||||
if data is None:
|
||||
return data
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
return cast(Union[None, Unset, str], data)
|
||||
|
||||
previous = _parse_previous(d.pop("previous", UNSET))
|
||||
|
||||
paginated_login_method_list = cls(
|
||||
count=count,
|
||||
results=results,
|
||||
next_=next_,
|
||||
previous=previous,
|
||||
)
|
||||
|
||||
paginated_login_method_list.additional_properties = d
|
||||
return paginated_login_method_list
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> list[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user