shopware-api-client 1.0.118__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 +338 -176
- shopware_api_client/cache.py +5 -10
- shopware_api_client/endpoints/admin/__init__.py +11 -4
- shopware_api_client/endpoints/admin/commercial/b2b_components_role.py +5 -20
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list.py +5 -25
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list_line_item.py +7 -24
- 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 -26
- 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 +4 -0
- 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.118.dist-info → shopware_api_client-1.1.1.dist-info}/METADATA +45 -273
- shopware_api_client-1.1.1.dist-info/RECORD +298 -0
- shopware_api_client-1.0.118.dist-info/RECORD +0 -117
- {shopware_api_client-1.0.118.dist-info → shopware_api_client-1.1.1.dist-info}/WHEEL +0 -0
- {shopware_api_client-1.0.118.dist-info → shopware_api_client-1.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
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.product_visibility import ProductVisibilityBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class ProductVisibilityBase
|
|
7
|
-
_identifier: str = "product_visibility"
|
|
8
|
-
|
|
9
|
-
product_id: IdField
|
|
10
|
-
product_version_id: IdField | None = None
|
|
11
|
-
sales_channel_id: IdField
|
|
12
|
-
visibility: int
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ProductVisibilityRelations:
|
|
6
|
+
class ProductVisibility(ProductVisibilityBase, AdminModel["ProductVisibilityEndpoint"]):
|
|
16
7
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
17
8
|
product: ForeignRelation["Product"]
|
|
18
9
|
|
|
19
10
|
|
|
20
|
-
class
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ProductVisibilityEndpoint(EndpointBase[ProductVisibility]):
|
|
11
|
+
class ProductVisibilityEndpoint(AdminEndpoint[ProductVisibility]):
|
|
25
12
|
name = "product_visibility"
|
|
26
13
|
path = "/product-visibility"
|
|
27
14
|
model_class = ProductVisibility
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
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.product_warehouse import ProductWarehouseBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class ProductWarehouseBase
|
|
7
|
-
_identifier = "product_warehouse"
|
|
8
|
-
|
|
9
|
-
stock: int
|
|
10
|
-
product_id: IdField
|
|
11
|
-
warehouse_id: IdField
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ProductWarehouseRelations:
|
|
6
|
+
class ProductWarehouse(ProductWarehouseBase, AdminModel["ProductWarehouseEndpoint"]):
|
|
15
7
|
product: ForeignRelation["Product"]
|
|
16
8
|
warehouse: ForeignRelation["Warehouse"]
|
|
17
9
|
|
|
18
10
|
|
|
19
|
-
class
|
|
20
|
-
pass
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class ProductWarehouseEndpoint(EndpointBase[ProductWarehouse]):
|
|
11
|
+
class ProductWarehouseEndpoint(AdminEndpoint[ProductWarehouse]):
|
|
24
12
|
name = "product_warehouse"
|
|
25
13
|
path = "/product-warehouse"
|
|
26
14
|
model_class = ProductWarehouse
|
|
@@ -1,38 +1,9 @@
|
|
|
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.promotion import PromotionBase
|
|
2
4
|
|
|
3
|
-
from pydantic import AwareDatetime, Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class PromotionBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "promotion"
|
|
12
|
-
|
|
13
|
-
name: str
|
|
14
|
-
active: bool
|
|
15
|
-
valid_from: AwareDatetime | None = None
|
|
16
|
-
valid_until: AwareDatetime | None = None
|
|
17
|
-
max_redemptions_global: int | None = None
|
|
18
|
-
max_redemptions_per_customer: int | None = None
|
|
19
|
-
priority: int
|
|
20
|
-
exclusive: bool
|
|
21
|
-
code: str | None = None
|
|
22
|
-
use_codes: bool
|
|
23
|
-
use_individual_codes: bool
|
|
24
|
-
individual_code_pattern: str | None = None
|
|
25
|
-
use_set_groups: bool
|
|
26
|
-
customer_restriction: bool | None = None
|
|
27
|
-
prevent_combination: bool
|
|
28
|
-
order_count: int | None = Field(default=None, exclude=True)
|
|
29
|
-
orders_per_customer_count: dict[str, Any] | None = Field(default=None, exclude=True)
|
|
30
|
-
exclusion_ids: list[IdField] | None = None
|
|
31
|
-
custom_fields: dict[str, Any] | None = None
|
|
32
|
-
translated: dict[str, Any] | None = None
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class PromotionRelations:
|
|
6
|
+
class Promotion(PromotionBase, AdminModel["PromotionEndpoint"]):
|
|
36
7
|
sales_channels: ManyRelation["SalesChannel"]
|
|
37
8
|
discounts: ManyRelation["PromotionDiscount"]
|
|
38
9
|
persona_rules: ManyRelation["Rule"]
|
|
@@ -47,11 +18,7 @@ class PromotionRelations:
|
|
|
47
18
|
"""
|
|
48
19
|
|
|
49
20
|
|
|
50
|
-
class
|
|
51
|
-
pass
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class PromotionEndpoint(EndpointBase[Promotion]):
|
|
21
|
+
class PromotionEndpoint(AdminEndpoint[Promotion]):
|
|
55
22
|
name = "promotion"
|
|
56
23
|
path = "/promotion"
|
|
57
24
|
model_class = Promotion
|
|
@@ -1,34 +1,15 @@
|
|
|
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.promotion_discount import PromotionDiscountBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class PromotionDiscountBase
|
|
7
|
-
_identifier: str = "promotion_discount"
|
|
8
|
-
|
|
9
|
-
promotion_id: IdField
|
|
10
|
-
scope: str
|
|
11
|
-
type: str
|
|
12
|
-
value: float
|
|
13
|
-
consider_advanced_rules: bool
|
|
14
|
-
max_value: float | None = None
|
|
15
|
-
sorter_key: str | None = None
|
|
16
|
-
applier_key: str | None = None
|
|
17
|
-
usage_key: str | None = None
|
|
18
|
-
picker_key: str | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class PromotionDiscountRelations:
|
|
6
|
+
class PromotionDiscount(PromotionDiscountBase, AdminModel["PromotionDiscountEndpoint"]):
|
|
22
7
|
promotion: ForeignRelation["Promotion"]
|
|
23
8
|
discount_rules: ManyRelation["Rule"]
|
|
24
9
|
promotion_discount_prices: ManyRelation["PromotionDiscountPrices"]
|
|
25
10
|
|
|
26
11
|
|
|
27
|
-
class
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class PromotionDiscountEndpoint(EndpointBase[PromotionDiscount]):
|
|
12
|
+
class PromotionDiscountEndpoint(AdminEndpoint[PromotionDiscount]):
|
|
32
13
|
name = "promotion_discount"
|
|
33
14
|
path = "/promotion-discount"
|
|
34
15
|
model_class = PromotionDiscount
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
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.promotion_discount_prices import PromotionDiscountPricesBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class PromotionDiscountPricesBase
|
|
7
|
-
_identifier: str = "promotion_discount_prices"
|
|
8
|
-
|
|
9
|
-
discount_id: IdField
|
|
10
|
-
currency_id: IdField
|
|
11
|
-
price: float
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class PromotionDiscountPricesRelations:
|
|
6
|
+
class PromotionDiscountPrices(PromotionDiscountPricesBase, AdminModel["PromotionDiscountPricesEndpoint"]):
|
|
15
7
|
discount: ForeignRelation["PromotionDiscount"]
|
|
16
8
|
currency: ForeignRelation["Currency"]
|
|
17
9
|
|
|
18
10
|
|
|
19
|
-
class PromotionDiscountPrices
|
|
20
|
-
PromotionDiscountPricesBase["PromotionDiscountPricesEndpoint"], PromotionDiscountPricesRelations
|
|
21
|
-
):
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class PromotionDiscountPricesEndpoint(EndpointBase[PromotionDiscountPrices]):
|
|
11
|
+
class PromotionDiscountPricesEndpoint(AdminEndpoint[PromotionDiscountPrices]):
|
|
26
12
|
name = "promotion_discount_prices"
|
|
27
13
|
path = "/promotion-discount-prices"
|
|
28
14
|
model_class = PromotionDiscountPrices
|
|
@@ -1,32 +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.property_group import PropertyGroupBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...relations import ManyRelation
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
class PropertyGroupBase(ApiModelBase[EndpointClass]):
|
|
8
|
-
_identifier: str = "property_group"
|
|
9
|
-
|
|
10
|
-
name: str
|
|
11
|
-
description: str | None = None
|
|
12
|
-
display_type: str
|
|
13
|
-
sorting_type: str
|
|
14
|
-
filterable: bool | None = None
|
|
15
|
-
visible_on_product_detail_page: bool | None = None
|
|
16
|
-
position: int | None = None
|
|
17
|
-
custom_fields: dict[str, Any] | None = None
|
|
18
|
-
translated: dict[str, Any] | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class PropertyGroupRelations:
|
|
6
|
+
class PropertyGroup(PropertyGroupBase, AdminModel["PropertyGroupEndpoint"]):
|
|
22
7
|
options: ManyRelation["PropertyGroupOption"]
|
|
23
8
|
|
|
24
9
|
|
|
25
|
-
class
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class PropertyGroupEndpoint(EndpointBase[PropertyGroup]):
|
|
10
|
+
class PropertyGroupEndpoint(AdminEndpoint[PropertyGroup]):
|
|
30
11
|
name = "property_group"
|
|
31
12
|
path = "/property-group"
|
|
32
13
|
model_class = PropertyGroup
|
|
@@ -1,23 +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.property_group_option import PropertyGroupOptionBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class PropertyGroupOptionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "property_group_option"
|
|
10
|
-
|
|
11
|
-
group_id: IdField | None = None
|
|
12
|
-
name: str | None = None
|
|
13
|
-
position: int | None = None
|
|
14
|
-
color_hex_code: str | None = None
|
|
15
|
-
media_id: IdField | None = None
|
|
16
|
-
custom_fields: dict[str, Any] | None = None
|
|
17
|
-
translated: dict[str, Any] | None = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class PropertyGroupOptionRelations:
|
|
6
|
+
class PropertyGroupOption(PropertyGroupOptionBase, AdminModel["PropertyGroupOptionEndpoint"]):
|
|
21
7
|
media: ForeignRelation["Media"]
|
|
22
8
|
group: ForeignRelation["PropertyGroup"]
|
|
23
9
|
product_configurator_settings: ManyRelation["ProductConfiguratorSetting"]
|
|
@@ -25,11 +11,7 @@ class PropertyGroupOptionRelations:
|
|
|
25
11
|
product_options: ManyRelation["Product"]
|
|
26
12
|
|
|
27
13
|
|
|
28
|
-
class
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class PropertyGroupOptionEndpoint(EndpointBase[PropertyGroupOption]):
|
|
14
|
+
class PropertyGroupOptionEndpoint(AdminEndpoint[PropertyGroupOption]):
|
|
33
15
|
name = "property_group_option"
|
|
34
16
|
path = "/property-group-option"
|
|
35
17
|
model_class = PropertyGroupOption
|
|
@@ -1,24 +1,9 @@
|
|
|
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.rule import RuleBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...relations import ManyRelation
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class RuleBase(ApiModelBase[EndpointClass]):
|
|
10
|
-
_identifier: str = "rule"
|
|
11
|
-
|
|
12
|
-
name: str
|
|
13
|
-
priority: int
|
|
14
|
-
description: str | None = None
|
|
15
|
-
invalid: bool | None = Field(default=None, exclude=True)
|
|
16
|
-
areas: list[str] | None = Field(default=None, exclude=True)
|
|
17
|
-
custom_fields: dict[str, Any] | None = None
|
|
18
|
-
module_types: dict[str, Any] | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class RuleRelations:
|
|
6
|
+
class Rule(RuleBase, AdminModel["RuleEndpoint"]):
|
|
22
7
|
product_prices: ManyRelation["ProductPrice"]
|
|
23
8
|
shipping_methods: ManyRelation["ShippingMethod"]
|
|
24
9
|
payment_methods: ManyRelation["PaymentMethod"]
|
|
@@ -37,11 +22,7 @@ class RuleRelations:
|
|
|
37
22
|
"""
|
|
38
23
|
|
|
39
24
|
|
|
40
|
-
class
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class RuleEndpoint(EndpointBase[Rule]):
|
|
25
|
+
class RuleEndpoint(AdminEndpoint[Rule]):
|
|
45
26
|
name = "rule"
|
|
46
27
|
path = "/rule"
|
|
47
28
|
model_class = Rule
|
|
@@ -1,34 +1,16 @@
|
|
|
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.rule_condition import RuleConditionBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class RuleConditionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "rule_condition"
|
|
10
|
-
|
|
11
|
-
type: str
|
|
12
|
-
rule_id: IdField
|
|
13
|
-
script_id: IdField | None = None
|
|
14
|
-
parent_id: IdField | None = None
|
|
15
|
-
value: Any | None = None
|
|
16
|
-
position: int | None = None
|
|
17
|
-
custom_fields: dict[str, Any] | None = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class RuleConditionRelations:
|
|
6
|
+
class RuleCondition(RuleConditionBase, AdminModel["RuleConditionEndpoint"]):
|
|
21
7
|
rule: ForeignRelation["Rule"]
|
|
22
8
|
app_script_condition: ForeignRelation["AppScriptCondition"]
|
|
23
9
|
parent: ForeignRelation["RuleCondition"]
|
|
24
10
|
children: ManyRelation["RuleCondition"]
|
|
25
11
|
|
|
26
12
|
|
|
27
|
-
class
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class RuleConditionEndpoint(EndpointBase[RuleCondition]):
|
|
13
|
+
class RuleConditionEndpoint(AdminEndpoint[RuleCondition]):
|
|
32
14
|
name = "rule_condition"
|
|
33
15
|
path = "/rule-condition"
|
|
34
16
|
model_class = RuleCondition
|
|
@@ -1,55 +1,12 @@
|
|
|
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.sales_channel import SalesChannelBase
|
|
2
5
|
|
|
3
|
-
from pydantic import Field
|
|
4
|
-
|
|
5
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class SalesChannelBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "sales_channel"
|
|
12
6
|
|
|
7
|
+
class SalesChannel(SalesChannelBase, AdminModel["SalesChannelEndpoint"]):
|
|
13
8
|
type_id: IdField
|
|
14
|
-
language_id: IdField
|
|
15
|
-
customer_group_id: IdField
|
|
16
|
-
currency_id: IdField
|
|
17
|
-
payment_method_id: IdField
|
|
18
|
-
shipping_method_id: IdField
|
|
19
|
-
country_id: IdField
|
|
20
|
-
analytics_id: IdField | None = None
|
|
21
|
-
navigation_category_id: IdField
|
|
22
|
-
navigation_category_version_id: IdField | None = None
|
|
23
|
-
navigation_category_depth: int | None = None
|
|
24
|
-
footer_category_id: IdField | None = None
|
|
25
|
-
footer_category_version_id: IdField | None = None
|
|
26
|
-
service_category_id: IdField | None = None
|
|
27
|
-
service_category_version_id: IdField | None = None
|
|
28
|
-
mail_header_footer_id: IdField | None = None
|
|
29
|
-
hreflang_default_domain_id: IdField | None = None
|
|
30
|
-
name: str
|
|
31
|
-
short_name: str | None = None
|
|
32
|
-
tax_calculation_type: str | None = None
|
|
33
9
|
access_key: str
|
|
34
|
-
configuration: dict[str, Any] | None = None
|
|
35
|
-
active: bool | None = None
|
|
36
|
-
hreflang_active: bool | None = None
|
|
37
|
-
maintenance: bool | None = None
|
|
38
|
-
maintenance_ip_whitelist: list[str] | None = None
|
|
39
|
-
custom_fields: dict[str, Any] | None = None
|
|
40
|
-
payment_method_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
41
|
-
home_cms_page_id: IdField | None = None
|
|
42
|
-
home_cms_page_version_id: IdField | None = None
|
|
43
|
-
home_slot_config: dict[str, Any] | None = None
|
|
44
|
-
home_enabled: bool
|
|
45
|
-
home_name: str | None = None
|
|
46
|
-
home_meta_title: str | None = None
|
|
47
|
-
home_meta_description: str | None = None
|
|
48
|
-
home_keywords: str | None = None
|
|
49
|
-
translated: dict[str, Any] | None = None
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class SalesChannelRelations:
|
|
53
10
|
currencies: ManyRelation["Currency"]
|
|
54
11
|
languages: ManyRelation["Language"]
|
|
55
12
|
countries: ManyRelation["Country"]
|
|
@@ -89,11 +46,7 @@ class SalesChannelRelations:
|
|
|
89
46
|
"""
|
|
90
47
|
|
|
91
48
|
|
|
92
|
-
class
|
|
93
|
-
pass
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class SalesChannelEndpoint(EndpointBase[SalesChannel]):
|
|
49
|
+
class SalesChannelEndpoint(AdminEndpoint[SalesChannel]):
|
|
97
50
|
name = "sales_channel"
|
|
98
51
|
path = "/sales-channel"
|
|
99
52
|
model_class = SalesChannel
|
|
@@ -1,23 +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.sales_channel_domain import SalesChannelDomainBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class SalesChannelDomainBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "sales_channel_domain"
|
|
10
|
-
|
|
11
|
-
url: str
|
|
12
|
-
sales_channel_id: IdField
|
|
13
|
-
language_id: IdField
|
|
14
|
-
currency_id: IdField
|
|
15
|
-
snippet_set_id: IdField
|
|
16
|
-
hreflang_use_only_locale: bool | None = None
|
|
17
|
-
custom_fields: dict[str, Any] | None = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class SalesChannelDomainRelations:
|
|
6
|
+
class SalesChannelDomain(SalesChannelDomainBase, AdminModel["SalesChannelDomainEndpoint"]):
|
|
21
7
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
22
8
|
language: ForeignRelation["Language"]
|
|
23
9
|
currency: ForeignRelation["Currency"]
|
|
@@ -30,11 +16,7 @@ class SalesChannelDomainRelations:
|
|
|
30
16
|
"""
|
|
31
17
|
|
|
32
18
|
|
|
33
|
-
class
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class SalesChannelDomainEndpoint(EndpointBase[SalesChannelDomain]):
|
|
19
|
+
class SalesChannelDomainEndpoint(AdminEndpoint[SalesChannelDomain]):
|
|
38
20
|
name = "sales_channel_domain"
|
|
39
21
|
path = "/sales-channel-domain"
|
|
40
22
|
model_class = SalesChannelDomain
|
|
@@ -1,20 +1,9 @@
|
|
|
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.salutation import SalutationBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...relations import ManyRelation
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
class SalutationBase(ApiModelBase[EndpointClass]):
|
|
8
|
-
_identifier: str = "salutation"
|
|
9
|
-
|
|
10
|
-
salutation_key: str
|
|
11
|
-
display_name: str
|
|
12
|
-
letter_name: str
|
|
13
|
-
custom_fields: dict[str, Any] | None = None
|
|
14
|
-
translated: dict[str, Any] | None = None
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class SalutationRelations:
|
|
6
|
+
class Salutation(SalutationBase, AdminModel["SalutationEndpoint"]):
|
|
18
7
|
customers: ManyRelation["Customer"]
|
|
19
8
|
customer_addresses: ManyRelation["CustomerAddress"]
|
|
20
9
|
order_customers: ManyRelation["OrderCustomer"]
|
|
@@ -26,11 +15,7 @@ class SalutationRelations:
|
|
|
26
15
|
"""
|
|
27
16
|
|
|
28
17
|
|
|
29
|
-
class
|
|
30
|
-
pass
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class SalutationEndpoint(EndpointBase[Salutation]):
|
|
18
|
+
class SalutationEndpoint(AdminEndpoint[Salutation]):
|
|
34
19
|
name = "salutation"
|
|
35
20
|
path = "/salutation"
|
|
36
21
|
model_class = Salutation
|
|
@@ -1,39 +1,14 @@
|
|
|
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.seo_url import SeoUrlBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class SeoUrlBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "seo_url"
|
|
12
|
-
|
|
13
|
-
sales_channel_id: IdField | None = None
|
|
14
|
-
language_id: IdField
|
|
15
|
-
foreign_key: IdField
|
|
16
|
-
route_name: str
|
|
17
|
-
path_info: str
|
|
18
|
-
seo_path_info: str
|
|
19
|
-
is_canonical: bool | None = None
|
|
20
|
-
is_modified: bool | None = None
|
|
21
|
-
is_deleted: bool | None = None
|
|
22
|
-
url: str | None = Field(default=None, description="Runtime field, cannot be used as part of the criteria.")
|
|
23
|
-
custom_fields: dict[str, Any] | None = None
|
|
24
|
-
is_valid: bool | None = Field(default=None, description="Runtime field, cannot be used as part of the criteria.")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class SeoUrlRelations:
|
|
6
|
+
class SeoUrl(SeoUrlBase, AdminModel["SeoUrlEndpoint"]):
|
|
28
7
|
language: ForeignRelation["Language"]
|
|
29
8
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
30
9
|
|
|
31
10
|
|
|
32
|
-
class
|
|
33
|
-
pass
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class SeoUrlEndpoint(EndpointBase[SeoUrl]):
|
|
11
|
+
class SeoUrlEndpoint(AdminEndpoint[SeoUrl]):
|
|
37
12
|
name = "seo_url"
|
|
38
13
|
path = "/seo-url"
|
|
39
14
|
model_class = SeoUrl
|
|
@@ -1,31 +1,12 @@
|
|
|
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.shipping_method import ShippingMethodBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class ShippingMethodBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "shipping_method"
|
|
10
|
-
|
|
11
|
-
name: str
|
|
12
|
-
active: bool | None = None
|
|
13
|
-
position: int | None = None
|
|
14
|
-
custom_fields: dict[str, Any] | None = None
|
|
15
|
-
availability_rule_id: IdField | None = None
|
|
16
|
-
media_id: IdField | None = None
|
|
17
|
-
delivery_time_id: IdField
|
|
18
|
-
tax_type: str
|
|
19
|
-
tax_id: IdField | None = None
|
|
20
|
-
description: str | None = None
|
|
21
|
-
tracking_url: str | None = None
|
|
22
|
-
technical_name: str | None
|
|
23
|
-
translated: dict[str, Any] | None = None
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ShippingMethodRelations:
|
|
6
|
+
class ShippingMethod(ShippingMethodBase, AdminModel["ShippingMethodEndpoint"]):
|
|
27
7
|
delivery_time: ForeignRelation["DeliveryTime"]
|
|
28
8
|
availability_rule: ForeignRelation["Rule"]
|
|
9
|
+
prices: ManyRelation["ShippingMethodPrice"]
|
|
29
10
|
media: ForeignRelation["Media"]
|
|
30
11
|
tags: ManyRelation["Tag"]
|
|
31
12
|
order_deliveries: ManyRelation["OrderDelivery"]
|
|
@@ -35,15 +16,11 @@ class ShippingMethodRelations:
|
|
|
35
16
|
|
|
36
17
|
"""
|
|
37
18
|
Todo:
|
|
38
|
-
|
|
19
|
+
app_shipping_method[AppShippingMethod]
|
|
39
20
|
"""
|
|
40
21
|
|
|
41
22
|
|
|
42
|
-
class
|
|
43
|
-
pass
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class ShippingMethodEndpoint(EndpointBase[ShippingMethod]):
|
|
23
|
+
class ShippingMethodEndpoint(AdminEndpoint[ShippingMethod]):
|
|
47
24
|
name = "shipping_method"
|
|
48
25
|
path = "/shipping-method"
|
|
49
26
|
model_class = ShippingMethod
|
|
@@ -54,5 +31,6 @@ from .media import Media # noqa: E402
|
|
|
54
31
|
from .order_delivery import OrderDelivery # noqa: E402
|
|
55
32
|
from .rule import Rule # noqa: E402
|
|
56
33
|
from .sales_channel import SalesChannel # noqa: E402
|
|
34
|
+
from .shipping_method_price import ShippingMethodPrice # noqa: E402
|
|
57
35
|
from .tag import Tag # noqa: E402
|
|
58
36
|
from .tax import Tax # noqa: E402
|
|
@@ -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
|