shopware-api-client 1.0.101__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shopware_api_client/base.py +490 -202
- shopware_api_client/cache.py +157 -0
- shopware_api_client/client.py +2 -2
- shopware_api_client/config.py +4 -3
- shopware_api_client/endpoints/admin/__init__.py +20 -4
- shopware_api_client/endpoints/admin/commercial/b2b_components_role.py +5 -20
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list.py +22 -0
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list_line_item.py +20 -0
- shopware_api_client/endpoints/admin/commercial/b2b_employee.py +5 -27
- shopware_api_client/endpoints/admin/commercial/dynamic_access.py +9 -19
- shopware_api_client/endpoints/admin/core/acl_role.py +5 -19
- shopware_api_client/endpoints/admin/core/api_info.py +11 -12
- shopware_api_client/endpoints/admin/core/app.py +5 -42
- shopware_api_client/endpoints/admin/core/app_script_condition.py +5 -24
- shopware_api_client/endpoints/admin/core/category.py +5 -56
- shopware_api_client/endpoints/admin/core/cms_block.py +5 -34
- shopware_api_client/endpoints/admin/core/cms_page.py +5 -26
- shopware_api_client/endpoints/admin/core/cms_section.py +5 -35
- shopware_api_client/endpoints/admin/core/cms_slot.py +5 -31
- shopware_api_client/endpoints/admin/core/country.py +5 -37
- shopware_api_client/endpoints/admin/core/country_state.py +5 -23
- shopware_api_client/endpoints/admin/core/currency.py +5 -33
- shopware_api_client/endpoints/admin/core/currency_country_rounding.py +5 -20
- shopware_api_client/endpoints/admin/core/custom_entity.py +4 -26
- shopware_api_client/endpoints/admin/core/custom_field.py +4 -14
- shopware_api_client/endpoints/admin/core/customer.py +5 -57
- shopware_api_client/endpoints/admin/core/customer_address.py +6 -33
- shopware_api_client/endpoints/admin/core/customer_group.py +5 -24
- shopware_api_client/endpoints/admin/core/customer_recovery.py +5 -16
- shopware_api_client/endpoints/admin/core/customer_wishlist.py +5 -19
- shopware_api_client/endpoints/admin/core/customer_wishlist_product.py +5 -19
- shopware_api_client/endpoints/admin/core/delivery_time.py +5 -21
- shopware_api_client/endpoints/admin/core/document.py +5 -28
- shopware_api_client/endpoints/admin/core/document_base_config.py +5 -27
- shopware_api_client/endpoints/admin/core/document_base_config_sales_channel.py +7 -20
- shopware_api_client/endpoints/admin/core/document_type.py +5 -19
- shopware_api_client/endpoints/admin/core/integration.py +5 -25
- shopware_api_client/endpoints/admin/core/landing_page.py +5 -28
- shopware_api_client/endpoints/admin/core/language.py +5 -21
- shopware_api_client/endpoints/admin/core/locale.py +5 -20
- shopware_api_client/endpoints/admin/core/main_category.py +5 -19
- shopware_api_client/endpoints/admin/core/media.py +25 -37
- shopware_api_client/endpoints/admin/core/media_default_folder.py +4 -17
- shopware_api_client/endpoints/admin/core/media_folder.py +5 -26
- shopware_api_client/endpoints/admin/core/media_folder_configuration.py +5 -21
- shopware_api_client/endpoints/admin/core/media_thumbnail.py +5 -24
- shopware_api_client/endpoints/admin/core/media_thumbnail_size.py +7 -18
- shopware_api_client/endpoints/admin/core/order.py +12 -48
- shopware_api_client/endpoints/admin/core/order_address.py +6 -34
- shopware_api_client/endpoints/admin/core/order_customer.py +6 -29
- shopware_api_client/endpoints/admin/core/order_delivery.py +5 -30
- shopware_api_client/endpoints/admin/core/order_delivery_position.py +5 -26
- shopware_api_client/endpoints/admin/core/order_line_item.py +7 -44
- shopware_api_client/endpoints/admin/core/order_line_item_download.py +5 -23
- shopware_api_client/endpoints/admin/core/order_transaction.py +5 -25
- shopware_api_client/endpoints/admin/core/order_transaction_capture.py +5 -27
- shopware_api_client/endpoints/admin/core/order_transaction_capture_refund.py +7 -28
- shopware_api_client/endpoints/admin/core/order_transaction_capture_refund_position.py +8 -29
- shopware_api_client/endpoints/admin/core/payment_method.py +5 -52
- shopware_api_client/endpoints/admin/core/product.py +24 -90
- shopware_api_client/endpoints/admin/core/product_configurator_setting.py +5 -26
- shopware_api_client/endpoints/admin/core/product_cross_selling.py +5 -27
- shopware_api_client/endpoints/admin/core/product_cross_selling_assigned_products.py +7 -21
- shopware_api_client/endpoints/admin/core/product_download.py +5 -22
- shopware_api_client/endpoints/admin/core/product_export.py +5 -34
- shopware_api_client/endpoints/admin/core/product_feature_set.py +5 -19
- shopware_api_client/endpoints/admin/core/product_manufacturer.py +5 -23
- shopware_api_client/endpoints/admin/core/product_media.py +5 -22
- shopware_api_client/endpoints/admin/core/product_price.py +5 -24
- shopware_api_client/endpoints/admin/core/product_review.py +5 -29
- shopware_api_client/endpoints/admin/core/product_search_keyword.py +5 -20
- shopware_api_client/endpoints/admin/core/product_stream.py +5 -23
- shopware_api_client/endpoints/admin/core/product_visibility.py +5 -18
- shopware_api_client/endpoints/admin/core/product_warehouse.py +5 -17
- shopware_api_client/endpoints/admin/core/promotion.py +5 -38
- shopware_api_client/endpoints/admin/core/promotion_discount.py +5 -24
- shopware_api_client/endpoints/admin/core/promotion_discount_prices.py +5 -19
- shopware_api_client/endpoints/admin/core/property_group.py +5 -24
- shopware_api_client/endpoints/admin/core/property_group_option.py +5 -23
- shopware_api_client/endpoints/admin/core/rule.py +5 -24
- shopware_api_client/endpoints/admin/core/rule_condition.py +5 -23
- shopware_api_client/endpoints/admin/core/sales_channel.py +6 -53
- shopware_api_client/endpoints/admin/core/sales_channel_domain.py +5 -23
- shopware_api_client/endpoints/admin/core/salutation.py +5 -20
- shopware_api_client/endpoints/admin/core/seo_url.py +5 -30
- shopware_api_client/endpoints/admin/core/shipping_method.py +8 -30
- shopware_api_client/endpoints/admin/core/shipping_method_price.py +20 -0
- shopware_api_client/endpoints/admin/core/state_machine.py +5 -21
- shopware_api_client/endpoints/admin/core/state_machine_history.py +5 -25
- shopware_api_client/endpoints/admin/core/state_machine_state.py +6 -20
- shopware_api_client/endpoints/admin/core/state_machine_transition.py +5 -23
- shopware_api_client/endpoints/admin/core/system_config.py +5 -19
- shopware_api_client/endpoints/admin/core/tag.py +5 -14
- shopware_api_client/endpoints/admin/core/tax.py +5 -21
- shopware_api_client/endpoints/admin/core/tax_rule.py +5 -22
- shopware_api_client/endpoints/admin/core/tax_rule_type.py +5 -21
- shopware_api_client/endpoints/admin/core/unit.py +5 -19
- shopware_api_client/endpoints/admin/core/user.py +5 -31
- shopware_api_client/endpoints/admin/core/warehouse.py +5 -15
- shopware_api_client/endpoints/admin/core/warehouse_group.py +6 -18
- shopware_api_client/endpoints/admin/core/warehouse_group_warehouse.py +6 -18
- shopware_api_client/endpoints/base_fields.py +13 -22
- shopware_api_client/endpoints/relations.py +36 -24
- shopware_api_client/endpoints/store/__init__.py +37 -4
- shopware_api_client/endpoints/store/core/address.py +51 -68
- shopware_api_client/endpoints/store/core/cart.py +39 -85
- shopware_api_client/endpoints/store/core/category.py +16 -0
- shopware_api_client/endpoints/store/core/cms_block.py +10 -0
- shopware_api_client/endpoints/store/core/cms_page.py +12 -0
- shopware_api_client/endpoints/store/core/cms_section.py +12 -0
- shopware_api_client/endpoints/store/core/cms_slot.py +8 -0
- shopware_api_client/endpoints/store/core/context.py +58 -0
- shopware_api_client/endpoints/store/core/country.py +15 -0
- shopware_api_client/endpoints/store/core/country_state.py +19 -0
- shopware_api_client/endpoints/store/core/currency.py +12 -0
- shopware_api_client/endpoints/store/core/customer.py +34 -0
- shopware_api_client/endpoints/store/core/customer_group.py +5 -0
- shopware_api_client/endpoints/store/core/delivery_time.py +5 -0
- shopware_api_client/endpoints/store/core/document.py +15 -0
- shopware_api_client/endpoints/store/core/document_type.py +5 -0
- shopware_api_client/endpoints/store/core/landing_page.py +10 -0
- shopware_api_client/endpoints/store/core/language.py +18 -0
- shopware_api_client/endpoints/store/core/locale.py +5 -0
- shopware_api_client/endpoints/store/core/main_category.py +5 -0
- shopware_api_client/endpoints/store/core/media.py +8 -0
- shopware_api_client/endpoints/store/core/media_thumbnail.py +5 -0
- shopware_api_client/endpoints/store/core/order.py +67 -0
- shopware_api_client/endpoints/store/core/order_address.py +12 -0
- shopware_api_client/endpoints/store/core/order_customer.py +8 -0
- shopware_api_client/endpoints/store/core/order_delivery.py +14 -0
- shopware_api_client/endpoints/store/core/order_delivery_position.py +5 -0
- shopware_api_client/endpoints/store/core/order_line_item.py +14 -0
- shopware_api_client/endpoints/store/core/order_transaction.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture_refund.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture_refund_position.py +11 -0
- shopware_api_client/endpoints/store/core/payment_method.py +8 -0
- shopware_api_client/endpoints/store/core/product.py +60 -0
- shopware_api_client/endpoints/store/core/product_configurator_setting.py +10 -0
- shopware_api_client/endpoints/store/core/product_cross_selling.py +5 -0
- shopware_api_client/endpoints/store/core/product_download.py +10 -0
- shopware_api_client/endpoints/store/core/product_manufacturer.py +8 -0
- shopware_api_client/endpoints/store/core/product_media.py +10 -0
- shopware_api_client/endpoints/store/core/product_review.py +5 -0
- shopware_api_client/endpoints/store/core/product_stream.py +5 -0
- shopware_api_client/endpoints/store/core/property_group.py +8 -0
- shopware_api_client/endpoints/store/core/property_group_option.py +10 -0
- shopware_api_client/endpoints/store/core/rule.py +5 -0
- shopware_api_client/endpoints/store/core/sales_channel.py +23 -0
- shopware_api_client/endpoints/store/core/sales_channel_domain.py +12 -0
- shopware_api_client/endpoints/store/core/salutation.py +12 -0
- shopware_api_client/endpoints/store/core/seo_url.py +5 -0
- shopware_api_client/endpoints/store/core/shipping_method.py +18 -0
- shopware_api_client/endpoints/store/core/shipping_method_price.py +5 -0
- shopware_api_client/endpoints/store/core/state_machine_state.py +5 -0
- shopware_api_client/endpoints/store/core/tag.py +5 -0
- shopware_api_client/endpoints/store/core/tax.py +5 -0
- shopware_api_client/endpoints/store/core/unit.py +5 -0
- shopware_api_client/exceptions.py +21 -1
- shopware_api_client/fieldsets.py +12 -0
- shopware_api_client/models/__init__.py +0 -0
- shopware_api_client/models/acl_role.py +11 -0
- shopware_api_client/models/app.py +33 -0
- shopware_api_client/models/app_script_condition.py +16 -0
- shopware_api_client/models/b2b_components_role.py +12 -0
- shopware_api_client/models/b2b_components_shopping_list.py +13 -0
- shopware_api_client/models/b2b_components_shopping_list_line_item.py +14 -0
- shopware_api_client/models/b2b_employee.py +17 -0
- shopware_api_client/models/category.py +44 -0
- shopware_api_client/models/cms_block.py +23 -0
- shopware_api_client/models/cms_page.py +15 -0
- shopware_api_client/models/cms_section.py +20 -0
- shopware_api_client/models/cms_slot.py +17 -0
- shopware_api_client/models/country.py +27 -0
- shopware_api_client/models/country_state.py +12 -0
- shopware_api_client/models/currency.py +20 -0
- shopware_api_client/models/currency_country_rounding.py +11 -0
- shopware_api_client/models/custom_entity.py +19 -0
- shopware_api_client/models/custom_field.py +8 -0
- shopware_api_client/models/customer.py +47 -0
- shopware_api_client/models/customer_address.py +22 -0
- shopware_api_client/models/customer_group.py +13 -0
- shopware_api_client/models/customer_recovery.py +9 -0
- shopware_api_client/models/customer_wishlist.py +9 -0
- shopware_api_client/models/customer_wishlist_product.py +10 -0
- shopware_api_client/models/delivery_time.py +12 -0
- shopware_api_client/models/document.py +20 -0
- shopware_api_client/models/document_base_config.py +19 -0
- shopware_api_client/models/document_base_config_sales_channel.py +10 -0
- shopware_api_client/models/document_type.py +8 -0
- shopware_api_client/models/dynamic_access.py +9 -0
- shopware_api_client/models/integration.py +15 -0
- shopware_api_client/models/landing_page.py +15 -0
- shopware_api_client/models/language.py +11 -0
- shopware_api_client/models/locale.py +9 -0
- shopware_api_client/models/main_category.py +12 -0
- shopware_api_client/models/media.py +26 -0
- shopware_api_client/models/media_default_folder.py +7 -0
- shopware_api_client/models/media_folder.py +16 -0
- shopware_api_client/models/media_folder_configuration.py +11 -0
- shopware_api_client/models/media_thumbnail.py +15 -0
- shopware_api_client/models/media_thumbnail_size.py +8 -0
- shopware_api_client/models/order.py +36 -0
- shopware_api_client/models/order_address.py +23 -0
- shopware_api_client/models/order_customer.py +18 -0
- shopware_api_client/models/order_delivery.py +19 -0
- shopware_api_client/models/order_delivery_position.py +15 -0
- shopware_api_client/models/order_line_item.py +34 -0
- shopware_api_client/models/order_line_item_download.py +12 -0
- shopware_api_client/models/order_transaction.py +15 -0
- shopware_api_client/models/order_transaction_capture.py +15 -0
- shopware_api_client/models/order_transaction_capture_refund.py +16 -0
- shopware_api_client/models/order_transaction_capture_refund_position.py +15 -0
- shopware_api_client/models/payment_method.py +29 -0
- shopware_api_client/models/product.py +72 -0
- shopware_api_client/models/product_configurator_setting.py +14 -0
- shopware_api_client/models/product_cross_selling.py +17 -0
- shopware_api_client/models/product_cross_selling_assigned_products.py +11 -0
- shopware_api_client/models/product_download.py +11 -0
- shopware_api_client/models/product_export.py +27 -0
- shopware_api_client/models/product_feature_set.py +11 -0
- shopware_api_client/models/product_manufacturer.py +11 -0
- shopware_api_client/models/product_media.py +11 -0
- shopware_api_client/models/product_price.py +15 -0
- shopware_api_client/models/product_review.py +19 -0
- shopware_api_client/models/product_search_keyword.py +13 -0
- shopware_api_client/models/product_stream.py +14 -0
- shopware_api_client/models/product_visibility.py +11 -0
- shopware_api_client/models/product_warehouse.py +10 -0
- shopware_api_client/models/promotion.py +29 -0
- shopware_api_client/models/promotion_discount.py +17 -0
- shopware_api_client/models/promotion_discount_prices.py +10 -0
- shopware_api_client/models/property_group.py +13 -0
- shopware_api_client/models/property_group_option.py +12 -0
- shopware_api_client/models/rule.py +16 -0
- shopware_api_client/models/rule_condition.py +15 -0
- shopware_api_client/models/sales_channel.py +44 -0
- shopware_api_client/models/sales_channel_domain.py +13 -0
- shopware_api_client/models/salutation.py +9 -0
- shopware_api_client/models/seo_url.py +19 -0
- shopware_api_client/models/shipping_method.py +18 -0
- shopware_api_client/models/shipping_method_price.py +15 -0
- shopware_api_client/models/state_machine.py +10 -0
- shopware_api_client/models/state_machine_history.py +18 -0
- shopware_api_client/models/state_machine_state.py +8 -0
- shopware_api_client/models/state_machine_transition.py +11 -0
- shopware_api_client/models/system_config.py +12 -0
- shopware_api_client/models/tag.py +7 -0
- shopware_api_client/models/tax.py +9 -0
- shopware_api_client/models/tax_rule.py +15 -0
- shopware_api_client/models/tax_rule_type.py +11 -0
- shopware_api_client/models/unit.py +8 -0
- shopware_api_client/models/user.py +21 -0
- shopware_api_client/models/warehouse.py +8 -0
- shopware_api_client/models/warehouse_group.py +11 -0
- shopware_api_client/models/warehouse_group_warehouse.py +11 -0
- shopware_api_client/structs/__init__.py +0 -0
- shopware_api_client/structs/absolute_price_definition.py +6 -0
- shopware_api_client/structs/calculated_cheapest_price.py +6 -0
- shopware_api_client/structs/calculated_price.py +17 -0
- shopware_api_client/structs/calculated_tax.py +8 -0
- shopware_api_client/structs/cart.py +21 -0
- shopware_api_client/structs/cart_price.py +15 -0
- shopware_api_client/structs/cash_rounding_config.py +7 -0
- shopware_api_client/structs/context.py +15 -0
- shopware_api_client/structs/delivery.py +16 -0
- shopware_api_client/structs/delivery_date.py +8 -0
- shopware_api_client/structs/delivery_information.py +13 -0
- shopware_api_client/structs/delivery_position.py +12 -0
- shopware_api_client/structs/delivery_time.py +8 -0
- shopware_api_client/structs/language_info.py +6 -0
- shopware_api_client/structs/line_item.py +39 -0
- shopware_api_client/structs/list_price.py +7 -0
- shopware_api_client/structs/measurement_units.py +8 -0
- shopware_api_client/structs/percentage_price_definition.py +6 -0
- shopware_api_client/structs/price.py +14 -0
- shopware_api_client/structs/quantity_information.py +7 -0
- shopware_api_client/structs/quantity_price_definition.py +14 -0
- shopware_api_client/structs/reference_price.py +5 -0
- shopware_api_client/structs/reference_price_definition.py +7 -0
- shopware_api_client/structs/regulation_price.py +5 -0
- shopware_api_client/structs/sales_channel_context.py +33 -0
- shopware_api_client/structs/shipping_location.py +12 -0
- shopware_api_client/structs/tax_free_config.py +8 -0
- shopware_api_client/structs/tax_rule.py +6 -0
- shopware_api_client/structs/transaction.py +8 -0
- shopware_api_client/structs/variant_listing_config.py +8 -0
- {shopware_api_client-1.0.101.dist-info → shopware_api_client-1.1.1.dist-info}/METADATA +89 -275
- shopware_api_client-1.1.1.dist-info/RECORD +298 -0
- {shopware_api_client-1.0.101.dist-info → shopware_api_client-1.1.1.dist-info}/WHEEL +1 -1
- shopware_api_client-1.0.101.dist-info/RECORD +0 -114
- {shopware_api_client-1.0.101.dist-info → shopware_api_client-1.1.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
2
|
+
|
|
3
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
4
|
+
from shopware_api_client.models.shipping_method_price import ShippingMethodPriceBase
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ShippingMethodPrice(ShippingMethodPriceBase, AdminModel["ShippingMethodPriceEndpoint"]):
|
|
8
|
+
shipping_method: ForeignRelation["ShippingMethod"]
|
|
9
|
+
rule: ForeignRelation["Rule"]
|
|
10
|
+
calculation_rule: ForeignRelation["Rule"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ShippingMethodPriceEndpoint(AdminEndpoint[ShippingMethodPrice]):
|
|
14
|
+
name = "shipping_method_price"
|
|
15
|
+
path = "/shipping-method-price"
|
|
16
|
+
model_class = ShippingMethodPrice
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
from .shipping_method import ShippingMethod # noqa: E402
|
|
20
|
+
from .rule import Rule # noqa: E402
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.state_machine import StateMachineBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class StateMachineBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "state_machine"
|
|
10
|
-
|
|
11
|
-
technical_name: str
|
|
12
|
-
name: str
|
|
13
|
-
custom_fields: dict[str, Any] | None = None
|
|
14
|
-
initial_state_id: IdField | None = None
|
|
15
|
-
translated: dict[str, Any] | None = None
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class StateMachineRelations:
|
|
6
|
+
class StateMachine(StateMachineBase, AdminModel["StateMachineEndpoint"]):
|
|
19
7
|
states: ManyRelation["StateMachineState"]
|
|
20
8
|
transitions: ManyRelation["StateMachineTransition"]
|
|
21
9
|
history_entries: ManyRelation["StateMachineHistory"]
|
|
22
10
|
|
|
23
11
|
|
|
24
|
-
class
|
|
25
|
-
pass
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class StateMachineEndpoint(EndpointBase[StateMachine]):
|
|
12
|
+
class StateMachineEndpoint(AdminEndpoint[StateMachine]):
|
|
29
13
|
name = "state_machine"
|
|
30
14
|
path = "/state-machine"
|
|
31
15
|
model_class = StateMachine
|
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.state_machine_history import StateMachineHistoryBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class StateMachineHistoryBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "state_machine_history"
|
|
10
|
-
|
|
11
|
-
state_machine_id: IdField
|
|
12
|
-
entity_name: str
|
|
13
|
-
from_state_id: IdField
|
|
14
|
-
to_state_id: IdField
|
|
15
|
-
transition_action_name: str | None = None
|
|
16
|
-
user_id: IdField | None = None
|
|
17
|
-
entity_id: dict[str, Any]
|
|
18
|
-
referenced_id: IdField | None = None
|
|
19
|
-
referenced_version_id: IdField | None = None
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class StateMachineHistoryRelations:
|
|
6
|
+
class StateMachineHistory(StateMachineHistoryBase, AdminModel["StateMachineHistoryEndpoint"]):
|
|
23
7
|
state_machine: ForeignRelation["StateMachine"]
|
|
24
8
|
from_state: ForeignRelation["StateMachineState"]
|
|
25
9
|
to_state: ForeignRelation["StateMachineState"]
|
|
26
10
|
user: ForeignRelation["User"]
|
|
27
11
|
|
|
28
12
|
|
|
29
|
-
class
|
|
30
|
-
pass
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class StateMachineHistoryEndpoint(EndpointBase[StateMachineHistory]):
|
|
13
|
+
class StateMachineHistoryEndpoint(AdminEndpoint[StateMachineHistory]):
|
|
34
14
|
name = "state_machine_history"
|
|
35
15
|
path = "/state-machine-history"
|
|
36
16
|
model_class = StateMachineHistory
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.base_fields import IdField
|
|
3
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
4
|
+
from shopware_api_client.models.state_machine_state import StateMachineStateBase
|
|
2
5
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
class StateMachineStateBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "state_machine_state"
|
|
10
|
-
|
|
11
|
-
technical_name: str
|
|
12
|
-
name: str
|
|
7
|
+
class StateMachineState(StateMachineStateBase, AdminModel["StateMachineStateEndpoint"]):
|
|
13
8
|
state_machine_id: IdField
|
|
14
|
-
custom_fields: dict[str, Any] | None = None
|
|
15
|
-
translated: dict[str, Any] | None = None
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class StateMachineStateRelations:
|
|
19
9
|
state_machine: ForeignRelation["StateMachine"]
|
|
20
10
|
from_state_machine_transitions: ManyRelation["StateMachineTransition"]
|
|
21
11
|
to_state_machine_transitions: ManyRelation["StateMachineTransition"]
|
|
@@ -28,11 +18,7 @@ class StateMachineStateRelations:
|
|
|
28
18
|
from_state_machine_history_entries: ManyRelation["StateMachineHistory"]
|
|
29
19
|
|
|
30
20
|
|
|
31
|
-
class
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class StateMachineStateEndpoint(EndpointBase[StateMachineState]):
|
|
21
|
+
class StateMachineStateEndpoint(AdminEndpoint[StateMachineState]):
|
|
36
22
|
name = "state_machine_state"
|
|
37
23
|
path = "/state-machine-state"
|
|
38
24
|
model_class = StateMachineState
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.state_machine_transition import StateMachineTransitionBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class StateMachineTransitionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "state_machine_transition"
|
|
10
|
-
|
|
11
|
-
action_name: str
|
|
12
|
-
state_machine_id: IdField
|
|
13
|
-
from_state_id: IdField
|
|
14
|
-
to_state_id: IdField
|
|
15
|
-
custom_fields: dict[str, Any] | None = None
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class StateMachineTransitionRelations:
|
|
6
|
+
class StateMachineTransition(StateMachineTransitionBase, AdminModel["StateMachineTransitionEndpoint"]):
|
|
19
7
|
state_machine: ForeignRelation["StateMachine"]
|
|
20
8
|
from_state: ForeignRelation["StateMachineState"]
|
|
21
9
|
to_state: ForeignRelation["StateMachineState"]
|
|
22
10
|
|
|
23
11
|
|
|
24
|
-
class StateMachineTransition
|
|
25
|
-
StateMachineTransitionBase["StateMachineTransitionEndpoint"], StateMachineTransitionRelations
|
|
26
|
-
):
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class StateMachineTransitionEndpoint(EndpointBase[StateMachineTransition]):
|
|
12
|
+
class StateMachineTransitionEndpoint(AdminEndpoint[StateMachineTransition]):
|
|
31
13
|
name = "state_machine_transition"
|
|
32
14
|
path = "/state-machine-transition"
|
|
33
15
|
model_class = StateMachineTransition
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.system_config import SystemConfigBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class SystemConfigBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "system_config"
|
|
10
|
-
|
|
11
|
-
configuration_key: str
|
|
12
|
-
configuration_value: Any
|
|
13
|
-
sales_channel_id: IdField | None = None
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class SystemConfigRelations:
|
|
6
|
+
class SystemConfig(SystemConfigBase, AdminModel["SystemConfigEndpoint"]):
|
|
17
7
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
18
8
|
|
|
19
9
|
|
|
20
|
-
class
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class SystemConfigEndpoint(EndpointBase[SystemConfig]):
|
|
10
|
+
class SystemConfigEndpoint(AdminEndpoint[SystemConfig]):
|
|
25
11
|
name = "system_config"
|
|
26
12
|
path = "/system-config"
|
|
27
13
|
model_class = SystemConfig
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.tag import TagBase
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
class TagBase
|
|
6
|
-
_identifier: str = "tag"
|
|
7
|
-
|
|
8
|
-
name: str
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class TagRelations:
|
|
6
|
+
class Tag(TagBase, AdminModel["TagEndpoint"]):
|
|
12
7
|
products: ManyRelation["Product"]
|
|
13
8
|
media: ManyRelation["Media"]
|
|
14
9
|
categories: ManyRelation["Category"]
|
|
@@ -24,11 +19,7 @@ class TagRelations:
|
|
|
24
19
|
"""
|
|
25
20
|
|
|
26
21
|
|
|
27
|
-
class
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class TagEndpoint(EndpointBase[Tag]):
|
|
22
|
+
class TagEndpoint(AdminEndpoint[Tag]):
|
|
32
23
|
name = "tag"
|
|
33
24
|
path = "/tag"
|
|
34
25
|
model_class = Tag
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.tax import TaxBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...relations import ManyRelation
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TaxBase(ApiModelBase[EndpointClass]):
|
|
10
|
-
_identifier: str = "tax"
|
|
11
|
-
|
|
12
|
-
tax_rate: float
|
|
13
|
-
name: str
|
|
14
|
-
position: int = Field(..., description="Added since version: 6.4.0.0.")
|
|
15
|
-
custom_fields: dict[str, Any] | None = None
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class TaxRelations:
|
|
6
|
+
class Tax(TaxBase, AdminModel["TaxEndpoint"]):
|
|
19
7
|
products: ManyRelation["Product"]
|
|
20
8
|
rules: ManyRelation["Rule"]
|
|
21
9
|
shipping_methods: ManyRelation["ShippingMethod"]
|
|
22
10
|
|
|
23
11
|
|
|
24
|
-
class
|
|
25
|
-
pass
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class TaxEndpoint(EndpointBase[Tax]):
|
|
12
|
+
class TaxEndpoint(AdminEndpoint[Tax]):
|
|
29
13
|
name = "tax"
|
|
30
14
|
path = "/tax"
|
|
31
15
|
model_class = Tax
|
|
@@ -1,32 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.tax_rule import TaxRuleBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import Data, IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class TaxRuleBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "tax_rule"
|
|
10
|
-
|
|
11
|
-
tax_rule_type_id: IdField
|
|
12
|
-
country_id: IdField
|
|
13
|
-
tax_rate: float
|
|
14
|
-
data: Data | None = None
|
|
15
|
-
tax_id: IdField
|
|
16
|
-
active_from: AwareDatetime | None = None
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class TaxRuleRelations:
|
|
6
|
+
class TaxRule(TaxRuleBase, AdminModel["TaxRuleEndpoint"]):
|
|
20
7
|
tax_rule_type: ForeignRelation["TaxRuleType"]
|
|
21
8
|
country: ForeignRelation["Country"]
|
|
22
9
|
tax: ForeignRelation["Tax"]
|
|
23
10
|
|
|
24
11
|
|
|
25
|
-
class
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class TaxRuleEndpoint(EndpointBase[TaxRule]):
|
|
12
|
+
class TaxRuleEndpoint(AdminEndpoint[TaxRule]):
|
|
30
13
|
name = "tax_rule"
|
|
31
14
|
path = "/tax-rule"
|
|
32
15
|
model_class = TaxRule
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.tax_rule_type import TaxRuleTypeBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...relations import ManyRelation
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TaxRuleTypeBase(ApiModelBase[EndpointClass]):
|
|
10
|
-
_identifier: str = "tax_rule_type"
|
|
11
|
-
|
|
12
|
-
technical_name: str = Field(default="", exclude=True)
|
|
13
|
-
position: int
|
|
14
|
-
type_name: str
|
|
15
|
-
translated: dict[str, Any] | None = None
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class TaxRuleTypeRelations:
|
|
6
|
+
class TaxRuleType(TaxRuleTypeBase, AdminModel["TaxRuleTypeEndpoint"]):
|
|
19
7
|
rules: ManyRelation["TaxRule"]
|
|
20
8
|
|
|
21
9
|
|
|
22
|
-
class
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class TaxRuleTypeEndpoint(EndpointBase[TaxRuleType]):
|
|
10
|
+
class TaxRuleTypeEndpoint(AdminEndpoint[TaxRuleType]):
|
|
27
11
|
name = "tax_rule_type"
|
|
28
12
|
path = "/tax-rule-type"
|
|
29
13
|
model_class = TaxRuleType
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.unit import UnitBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...relations import ManyRelation
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
class UnitBase(ApiModelBase[EndpointClass]):
|
|
8
|
-
_identifier: str = "unit"
|
|
9
|
-
|
|
10
|
-
short_code: str
|
|
11
|
-
name: str
|
|
12
|
-
custom_fields: dict[str, Any] | None = None
|
|
13
|
-
translated: dict[str, Any] | None = None
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class UnitRelations:
|
|
6
|
+
class Unit(UnitBase, AdminModel["UnitEndpoint"]):
|
|
17
7
|
products: ManyRelation["Product"]
|
|
18
8
|
|
|
19
9
|
|
|
20
|
-
class
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class UnitEndpoint(EndpointBase[Unit]):
|
|
10
|
+
class UnitEndpoint(AdminEndpoint[Unit]):
|
|
25
11
|
name = "unit"
|
|
26
12
|
path = "/unit"
|
|
27
13
|
model_class = Unit
|
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.user import UserBase
|
|
2
4
|
|
|
3
|
-
from pydantic import AwareDatetime
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class UserBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "user"
|
|
12
|
-
|
|
13
|
-
locale_id: IdField
|
|
14
|
-
username: str
|
|
15
|
-
first_name: str
|
|
16
|
-
last_name: str
|
|
17
|
-
password: str | None = None
|
|
18
|
-
title: str | None = None
|
|
19
|
-
email: str
|
|
20
|
-
active: bool | None = None
|
|
21
|
-
admin: bool | None = None
|
|
22
|
-
last_updated_password_at: AwareDatetime | None = None
|
|
23
|
-
time_zone: str
|
|
24
|
-
custom_fields: dict[str, Any] | None = None
|
|
25
|
-
avatar_id: IdField | None = None
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class UserRelations:
|
|
6
|
+
class User(UserBase, AdminModel["UserEndpoint"]):
|
|
29
7
|
locale: ForeignRelation["Locale"]
|
|
30
8
|
avatar_media: ManyRelation["Media"]
|
|
31
9
|
media: ManyRelation["Media"]
|
|
@@ -43,11 +21,7 @@ class UserRelations:
|
|
|
43
21
|
"""
|
|
44
22
|
|
|
45
23
|
|
|
46
|
-
class
|
|
47
|
-
pass
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class UserEndpoint(EndpointBase[User]):
|
|
24
|
+
class UserEndpoint(AdminEndpoint[User]):
|
|
51
25
|
name = "user"
|
|
52
26
|
path = "/user"
|
|
53
27
|
model_class = User
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.warehouse import WarehouseBase
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
class WarehouseBase
|
|
6
|
-
_identifier = "warehouse"
|
|
7
|
-
|
|
8
|
-
name: str
|
|
9
|
-
description: str | None = None
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class WarehouseRelations:
|
|
6
|
+
class Warehouse(WarehouseBase, AdminModel["WarehouseEndpoint"]):
|
|
13
7
|
product_warehouses: ManyRelation["ProductWarehouse"]
|
|
14
8
|
groups: ManyRelation["WarehouseGroup"]
|
|
15
9
|
# order_products: ManyRelation["???"]
|
|
16
10
|
|
|
17
11
|
|
|
18
|
-
class
|
|
19
|
-
pass
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class WarehouseEndpoint(EndpointBase[Warehouse]):
|
|
12
|
+
class WarehouseEndpoint(AdminEndpoint[Warehouse]):
|
|
23
13
|
name = "warehouse"
|
|
24
14
|
path = "/warehouse"
|
|
25
15
|
model_class = Warehouse
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.warehouse_group import WarehouseGroupBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class WarehouseGroupBase
|
|
7
|
-
_identifier = "warehouse_group"
|
|
8
|
-
|
|
9
|
-
name: str
|
|
10
|
-
description: str | None = None
|
|
11
|
-
priority: int | None = None
|
|
12
|
-
rule_id: IdField | None = None
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class WarehouseGroupRelations:
|
|
6
|
+
class WarehouseGroup(WarehouseGroupBase, AdminModel["WarehouseGroupEndpoint"]):
|
|
16
7
|
warehouses: ManyRelation["Warehouse"]
|
|
17
8
|
products: ManyRelation["Product"]
|
|
18
9
|
rule: ForeignRelation["Rule"]
|
|
19
10
|
|
|
20
11
|
|
|
21
|
-
class
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class WarehouseGroupEndpoint(EndpointBase[WarehouseGroup]):
|
|
12
|
+
class WarehouseGroupEndpoint(AdminEndpoint[WarehouseGroup]):
|
|
26
13
|
name = "warehouse_group"
|
|
27
14
|
path = "/warehouse-group"
|
|
28
15
|
model_class = WarehouseGroup
|
|
29
16
|
|
|
17
|
+
|
|
30
18
|
from .product import Product # noqa: E402
|
|
31
19
|
from .rule import Rule # noqa: E402
|
|
32
20
|
from .warehouse import Warehouse # noqa: E402
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ManyRelation
|
|
3
|
+
from shopware_api_client.models.warehouse_group_warehouse import WarehouseGroupWarehouseBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class WarehouseGroupWarehouseBase
|
|
7
|
-
_identifier = "warehouse_group_warehouse"
|
|
8
|
-
|
|
9
|
-
name: str
|
|
10
|
-
warehouse_id: IdField
|
|
11
|
-
warehouse_group_id: IdField
|
|
12
|
-
priority: int | None = None
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class WarehouseGroupWarehouseRelations:
|
|
6
|
+
class WarehouseGroupWarehouse(WarehouseGroupWarehouseBase, AdminModel["WarehouseGroupWarehouseEndpoint"]):
|
|
16
7
|
warehouses: ManyRelation["Warehouse"]
|
|
17
8
|
warehouse_group: ManyRelation["WarehouseGroup"]
|
|
18
9
|
|
|
19
10
|
|
|
20
|
-
class
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class WarehouseGroupWarehouseEndpoint(EndpointBase[WarehouseGroupWarehouse]):
|
|
11
|
+
class WarehouseGroupWarehouseEndpoint(AdminEndpoint[WarehouseGroupWarehouse]):
|
|
25
12
|
name = "warehouse_group_warehouse"
|
|
26
13
|
path = "/warehouse-group-warehouse"
|
|
27
14
|
model_class = WarehouseGroupWarehouse
|
|
28
15
|
|
|
16
|
+
|
|
29
17
|
from .warehouse import Warehouse # noqa: E402
|
|
30
18
|
from .warehouse_group import WarehouseGroup # noqa: E402
|
|
@@ -1,53 +1,44 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Any, Annotated
|
|
2
2
|
|
|
3
|
-
from pydantic import
|
|
4
|
-
from pydantic.alias_generators import to_camel
|
|
5
|
-
|
|
6
|
-
IdField = Annotated[str, StringConstraints(pattern=r"^[0-9a-f]{32}$")]
|
|
3
|
+
from pydantic import StringConstraints
|
|
7
4
|
|
|
5
|
+
from shopware_api_client.fieldsets import FieldSetBase
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
model_config = ConfigDict(
|
|
11
|
-
alias_generator=AliasGenerator(
|
|
12
|
-
validation_alias=lambda field_name: AliasChoices(field_name, to_camel(field_name)),
|
|
13
|
-
serialization_alias=lambda field_name: to_camel(field_name),
|
|
14
|
-
),
|
|
15
|
-
validate_assignment=True,
|
|
16
|
-
)
|
|
7
|
+
IdField = Annotated[str, StringConstraints(pattern=r"^[0-9a-f]{32}$")]
|
|
17
8
|
|
|
18
9
|
|
|
19
|
-
class CustomerTax(
|
|
10
|
+
class CustomerTax(FieldSetBase):
|
|
20
11
|
enabled: bool
|
|
21
12
|
currency_id: IdField
|
|
22
13
|
amount: float
|
|
23
14
|
|
|
24
15
|
|
|
25
|
-
class CompanyTax(
|
|
16
|
+
class CompanyTax(FieldSetBase):
|
|
26
17
|
enabled: bool
|
|
27
18
|
currency_id: IdField
|
|
28
19
|
amount: float
|
|
29
20
|
|
|
30
21
|
|
|
31
|
-
class Data(
|
|
22
|
+
class Data(FieldSetBase):
|
|
32
23
|
states: list[dict[str, Any]] | None = None
|
|
33
24
|
zip_code: str | None = None
|
|
34
25
|
from_zip_code: str | None = None
|
|
35
26
|
to_zip_code: str | None = None
|
|
36
27
|
|
|
37
28
|
|
|
38
|
-
class Visibility(
|
|
29
|
+
class Visibility(FieldSetBase):
|
|
39
30
|
mobile: bool | None = None
|
|
40
31
|
desktop: bool | None = None
|
|
41
32
|
tablet: bool | None = None
|
|
42
33
|
|
|
43
34
|
|
|
44
|
-
class ListPrice(
|
|
35
|
+
class ListPrice(FieldSetBase):
|
|
45
36
|
price: float | None = None
|
|
46
37
|
discount: float | None = None
|
|
47
38
|
percentage: float | None = None
|
|
48
39
|
|
|
49
40
|
|
|
50
|
-
class Price(
|
|
41
|
+
class Price(FieldSetBase):
|
|
51
42
|
net_price: float
|
|
52
43
|
total_price: float
|
|
53
44
|
calculated_taxes: list[dict[str, Any]] | None = None
|
|
@@ -57,17 +48,17 @@ class Price(BaseFieldSet):
|
|
|
57
48
|
tax_status: str
|
|
58
49
|
|
|
59
50
|
|
|
60
|
-
class RegulationPrice(
|
|
51
|
+
class RegulationPrice(FieldSetBase):
|
|
61
52
|
price: float | None = None
|
|
62
53
|
|
|
63
54
|
|
|
64
|
-
class Rounding(
|
|
55
|
+
class Rounding(FieldSetBase):
|
|
65
56
|
decimals: int | None = None
|
|
66
57
|
interval: float | None = None
|
|
67
58
|
round_for_net: bool | None = None
|
|
68
59
|
|
|
69
60
|
|
|
70
|
-
class Amount(
|
|
61
|
+
class Amount(FieldSetBase):
|
|
71
62
|
unit_price: float
|
|
72
63
|
total_price: float
|
|
73
64
|
quantity: int
|