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
|
@@ -1,52 +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.payment_method import PaymentMethodBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
_FILED_DESCRIPTION = "Runtime field, cannot be used as part of the criteria."
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class PaymentMethodBase(ApiModelBase[EndpointClass]):
|
|
13
|
-
_identifier: str = "payment_method"
|
|
14
|
-
|
|
15
|
-
plugin_id: IdField | None = None
|
|
16
|
-
handler_identifier: str | None = None
|
|
17
|
-
name: str
|
|
18
|
-
distinguishable_name: str | None = Field(default=None, exclude=True)
|
|
19
|
-
description: str | None = None
|
|
20
|
-
position: int | None = None
|
|
21
|
-
active: bool | None = None
|
|
22
|
-
after_order_enabled: bool | None = None
|
|
23
|
-
custom_fields: dict[str, Any] | None = None
|
|
24
|
-
availability_rule_id: IdField | None = None
|
|
25
|
-
media_id: IdField | None = None
|
|
26
|
-
formatted_handler_identifier: str | None = Field(
|
|
27
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
28
|
-
)
|
|
29
|
-
synchronous: bool | None = Field(
|
|
30
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
31
|
-
)
|
|
32
|
-
asynchronous: bool | None = Field(
|
|
33
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
34
|
-
)
|
|
35
|
-
prepared: bool | None = Field(
|
|
36
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
37
|
-
)
|
|
38
|
-
refundable: bool | None = Field(
|
|
39
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
40
|
-
)
|
|
41
|
-
recurring: bool | None = Field(
|
|
42
|
-
None, description=_FILED_DESCRIPTION, exclude=True
|
|
43
|
-
)
|
|
44
|
-
short_name: str | None = Field(None, description=_FILED_DESCRIPTION)
|
|
45
|
-
technical_name: str | None = Field(default=None, exclude=True)
|
|
46
|
-
translated: dict[str, Any] | None = None
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
class PaymentMethodRelations:
|
|
6
|
+
class PaymentMethod(PaymentMethodBase, AdminModel["PaymentMethodEndpoint"]):
|
|
50
7
|
media: ForeignRelation["Media"]
|
|
51
8
|
availability_rule: ForeignRelation["Rule"]
|
|
52
9
|
sales_channel_default_assignments: ManyRelation["SalesChannel"]
|
|
@@ -60,11 +17,7 @@ class PaymentMethodRelations:
|
|
|
60
17
|
"""
|
|
61
18
|
|
|
62
19
|
|
|
63
|
-
class
|
|
64
|
-
pass
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class PaymentMethodEndpoint(EndpointBase[PaymentMethod]):
|
|
20
|
+
class PaymentMethodEndpoint(AdminEndpoint[PaymentMethod]):
|
|
68
21
|
name = "payment_method"
|
|
69
22
|
path = "/payment-method"
|
|
70
23
|
model_class = PaymentMethod
|
|
@@ -1,103 +1,40 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
from pydantic import
|
|
3
|
+
from pydantic import field_validator
|
|
4
4
|
from pydantic_core.core_schema import FieldValidationInfo
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
7
7
|
from ...base_fields import IdField
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
version_id: IdField | None = None
|
|
15
|
-
parent_id: IdField | None = None
|
|
16
|
-
parent_version_id: IdField | None = None
|
|
17
|
-
manufacturer_id: IdField | None = None
|
|
18
|
-
product_manufacturer_version_id: IdField | None = None
|
|
19
|
-
unit_id: IdField | None = None
|
|
20
|
-
tax_id: IdField | None = None
|
|
21
|
-
cover_id: IdField | None = None
|
|
22
|
-
product_media_version_id: IdField | None = None
|
|
23
|
-
delivery_time_id: IdField | None = None
|
|
24
|
-
feature_set_id: IdField | None = None
|
|
25
|
-
canonical_product_id: IdField | None = None
|
|
26
|
-
cms_page_id: IdField | None = None
|
|
27
|
-
cms_page_version_id: IdField | None = None
|
|
28
|
-
price: list[dict[str, Any]] | None = None
|
|
29
|
-
product_number: str
|
|
30
|
-
restock_time: int | None = None
|
|
31
|
-
auto_increment: int | None = Field(default=None, exclude=True)
|
|
32
|
-
active: bool | None = None
|
|
33
|
-
available: bool | None = Field(default=None, exclude=True)
|
|
34
|
-
is_closeout: bool | None = None
|
|
35
|
-
variation: list[str] | None = None
|
|
36
|
-
display_group: str | None = Field(default=None, exclude=True)
|
|
37
|
-
variant_listing_config: dict[str, Any] | None = None
|
|
38
|
-
variant_restrictions: dict[str, Any] | None = None
|
|
39
|
-
manufacturer_number: str | None = None
|
|
40
|
-
ean: str | None = None
|
|
41
|
-
purchase_steps: int | None = None
|
|
42
|
-
max_purchase: int | None = None
|
|
43
|
-
min_purchase: int | None = None
|
|
44
|
-
purchase_unit: float | None = None
|
|
45
|
-
reference_unit: float | None = None
|
|
46
|
-
shipping_free: bool | None = None
|
|
47
|
-
purchase_prices: list[dict[str, Any]] | None = None
|
|
48
|
-
mark_as_topseller: bool | None = None
|
|
49
|
-
weight: float | None = None
|
|
50
|
-
width: float | None = None
|
|
51
|
-
height: float | None = None
|
|
52
|
-
length: float | None = None
|
|
53
|
-
release_date: AwareDatetime | None = None
|
|
54
|
-
rating_average: float | None = Field(default=None, exclude=True)
|
|
55
|
-
category_tree: list[IdField] | None = Field(default=None, exclude=True)
|
|
56
|
-
property_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
57
|
-
option_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
58
|
-
stream_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
59
|
-
tag_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
60
|
-
category_ids: list[IdField] | None = Field(default=None, exclude=True)
|
|
61
|
-
child_count: int | None = Field(default=None, exclude=True)
|
|
62
|
-
custom_field_set_selection_active: bool | None = None
|
|
63
|
-
sales: int | None = Field(default=None, exclude=True)
|
|
64
|
-
states: list[str] | None = Field(default=None, exclude=True)
|
|
65
|
-
meta_description: str | None = None
|
|
66
|
-
name: str | None = None
|
|
67
|
-
keywords: str | None = None
|
|
68
|
-
description: str | None = None
|
|
69
|
-
meta_title: str | None = None
|
|
70
|
-
pack_unit: str | None = None
|
|
71
|
-
pack_unit_plural: str | None = None
|
|
72
|
-
custom_fields: dict[str, Any] | None = None
|
|
73
|
-
slot_config: dict[str, Any] | list | None = None
|
|
74
|
-
custom_search_keywords: list[str] | None = None
|
|
75
|
-
available_stock: int | None = Field(default=None, exclude=True)
|
|
76
|
-
stock: int | None = None
|
|
77
|
-
translated: dict[str, Any] | None = None
|
|
78
|
-
|
|
79
|
-
@field_validator('name')
|
|
8
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
9
|
+
from shopware_api_client.models.product import ProductBase
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ProductValidators:
|
|
13
|
+
@field_validator("name")
|
|
80
14
|
def ensure_name_or_parent(cls, value: str | None, info: FieldValidationInfo, **kwargs: Any) -> str | None:
|
|
81
|
-
if value is None and info.data[
|
|
82
|
-
raise ValueError(
|
|
15
|
+
if value is None and info.data["parent_id"] is None:
|
|
16
|
+
raise ValueError("name may only be empty if parent_id is set")
|
|
83
17
|
|
|
84
18
|
return value
|
|
85
19
|
|
|
86
|
-
@field_validator(
|
|
20
|
+
@field_validator("tax_id")
|
|
87
21
|
def ensure_tax_id_or_parent(cls, value: IdField | None, info: FieldValidationInfo, **kwargs: Any) -> IdField | None:
|
|
88
|
-
if value is None and info.data[
|
|
89
|
-
raise ValueError(
|
|
22
|
+
if value is None and info.data["parent_id"] is None:
|
|
23
|
+
raise ValueError("tax_id may only be empty if parent_id is set")
|
|
90
24
|
|
|
91
25
|
return value
|
|
92
26
|
|
|
93
|
-
@field_validator(
|
|
94
|
-
def ensure_price_or_parent(
|
|
95
|
-
|
|
96
|
-
|
|
27
|
+
@field_validator("price")
|
|
28
|
+
def ensure_price_or_parent(
|
|
29
|
+
cls, value: list[dict[str, Any]] | None, info: FieldValidationInfo, **kwargs: Any
|
|
30
|
+
) -> list[dict[str, Any]] | None:
|
|
31
|
+
if value is None and info.data["parent_id"] is None:
|
|
32
|
+
raise ValueError("price may only be empty if parent_id is set")
|
|
97
33
|
|
|
98
34
|
return value
|
|
99
35
|
|
|
100
|
-
|
|
36
|
+
|
|
37
|
+
class Product(ProductBase, AdminModel["ProductEndpoint"], ProductValidators):
|
|
101
38
|
downloads: ManyRelation["ProductDownload"]
|
|
102
39
|
parent: ForeignRelation["Product"]
|
|
103
40
|
children: ManyRelation["Product"]
|
|
@@ -122,7 +59,7 @@ class ProductRelations:
|
|
|
122
59
|
order_line_items: ManyRelation["OrderLineItem"]
|
|
123
60
|
wishlists: ManyRelation["CustomerWishlistProduct"]
|
|
124
61
|
options: ManyRelation["PropertyGroupOption"]
|
|
125
|
-
properties: ManyRelation["
|
|
62
|
+
properties: ManyRelation["PropertyGroup"]
|
|
126
63
|
categories: ManyRelation["Category"]
|
|
127
64
|
streams: ManyRelation["ProductStream"]
|
|
128
65
|
categories_ro: ManyRelation["Category"]
|
|
@@ -134,11 +71,7 @@ class ProductRelations:
|
|
|
134
71
|
"""
|
|
135
72
|
|
|
136
73
|
|
|
137
|
-
class
|
|
138
|
-
pass
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class ProductEndpoint(EndpointBase[Product]):
|
|
74
|
+
class ProductEndpoint(AdminEndpoint[Product]):
|
|
142
75
|
name = "product"
|
|
143
76
|
path = "/product"
|
|
144
77
|
model_class = Product
|
|
@@ -163,6 +96,7 @@ from .product_search_keyword import ProductSearchKeyword # noqa: E402
|
|
|
163
96
|
from .product_stream import ProductStream # noqa: E402
|
|
164
97
|
from .product_visibility import ProductVisibility # noqa: E402
|
|
165
98
|
from .property_group_option import PropertyGroupOption # noqa: E402
|
|
99
|
+
from .property_group import PropertyGroup # noqa: E402
|
|
166
100
|
from .seo_url import SeoUrl # noqa: E402
|
|
167
101
|
from .tag import Tag # noqa: E402
|
|
168
102
|
from .tax import Tax # noqa: E402
|
|
@@ -1,36 +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.product_configurator_setting import ProductConfiguratorSettingBase
|
|
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 ProductConfiguratorSettingBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_configurator_setting"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
product_id: IdField
|
|
13
|
-
product_version_id: IdField | None = None
|
|
14
|
-
media_id: IdField | None = None
|
|
15
|
-
option_id: IdField
|
|
16
|
-
price: dict[str, Any] | None = None
|
|
17
|
-
position: int | None = None
|
|
18
|
-
custom_fields: dict[str, Any] | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class ProductConfiguratorSettingRelations:
|
|
6
|
+
class ProductConfiguratorSetting(ProductConfiguratorSettingBase, AdminModel["ProductConfiguratorSettingEndpoint"]):
|
|
22
7
|
product: ForeignRelation["Product"]
|
|
23
8
|
media: ForeignRelation["Media"]
|
|
24
9
|
option: ForeignRelation["PropertyGroupOption"]
|
|
25
10
|
|
|
26
11
|
|
|
27
|
-
class ProductConfiguratorSetting
|
|
28
|
-
ProductConfiguratorSettingBase["ProductConfiguratorSettingEndpoint"], ProductConfiguratorSettingRelations
|
|
29
|
-
):
|
|
30
|
-
pass
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class ProductConfiguratorSettingEndpoint(EndpointBase[ProductConfiguratorSetting]):
|
|
12
|
+
class ProductConfiguratorSettingEndpoint(AdminEndpoint[ProductConfiguratorSetting]):
|
|
34
13
|
name = "product_configurator_setting"
|
|
35
14
|
path = "/product-configurator-setting"
|
|
36
15
|
model_class = ProductConfiguratorSetting
|
|
@@ -1,37 +1,15 @@
|
|
|
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.product_cross_selling import ProductCrossSellingBase
|
|
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 ProductCrossSellingBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_cross_selling"
|
|
10
|
-
|
|
11
|
-
name: str
|
|
12
|
-
position: int
|
|
13
|
-
sort_by: str | None = None
|
|
14
|
-
sort_direction: str | None = None
|
|
15
|
-
type: str
|
|
16
|
-
active: bool | None = None
|
|
17
|
-
limit: int | None = None
|
|
18
|
-
product_id: IdField
|
|
19
|
-
product_version_id: IdField | None = None
|
|
20
|
-
product_stream_id: IdField | None = None
|
|
21
|
-
translated: dict[str, Any] | None = None
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ProductCrossSellingRelations:
|
|
6
|
+
class ProductCrossSelling(ProductCrossSellingBase, AdminModel["ProductCrossSellingEndpoint"]):
|
|
25
7
|
product: ForeignRelation["Product"]
|
|
26
8
|
product_stream: ForeignRelation["ProductStream"]
|
|
27
9
|
assigned_products: ManyRelation["ProductCrossSellingAssignedProducts"]
|
|
28
10
|
|
|
29
11
|
|
|
30
|
-
class
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class ProductCrossSellingEndpoint(EndpointBase[ProductCrossSelling]):
|
|
12
|
+
class ProductCrossSellingEndpoint(AdminEndpoint[ProductCrossSelling]):
|
|
35
13
|
name = "product_cross_selling"
|
|
36
14
|
path = "/product-cross-selling"
|
|
37
15
|
model_class = ProductCrossSelling
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ProductCrossSellingAssignedProductsBase(ApiModelBase[EndpointClass]):
|
|
7
|
-
_identifier: str = "product_cross_selling_assigned_products"
|
|
8
|
-
|
|
9
|
-
cross_selling_id: IdField
|
|
10
|
-
product_id: IdField
|
|
11
|
-
product_version_id: IdField | None = None
|
|
12
|
-
position: int | None = None
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ProductCrossSellingAssignedProductsRelations:
|
|
16
|
-
product: ForeignRelation["Product"]
|
|
17
|
-
cross_selling: ForeignRelation["ProductCrossSelling"]
|
|
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_cross_selling_assigned_products import ProductCrossSellingAssignedProductsBase
|
|
18
4
|
|
|
19
5
|
|
|
20
6
|
class ProductCrossSellingAssignedProducts(
|
|
21
|
-
ProductCrossSellingAssignedProductsBase["ProductCrossSellingAssignedProductsEndpoint"]
|
|
22
|
-
ProductCrossSellingAssignedProductsRelations,
|
|
7
|
+
ProductCrossSellingAssignedProductsBase, AdminModel["ProductCrossSellingAssignedProductsEndpoint"]
|
|
23
8
|
):
|
|
24
|
-
|
|
9
|
+
product: ForeignRelation["Product"]
|
|
10
|
+
cross_selling: ForeignRelation["ProductCrossSelling"]
|
|
25
11
|
|
|
26
12
|
|
|
27
|
-
class ProductCrossSellingAssignedProductsEndpoint(
|
|
13
|
+
class ProductCrossSellingAssignedProductsEndpoint(AdminEndpoint[ProductCrossSellingAssignedProducts]):
|
|
28
14
|
name = "product_cross_selling_assigned_products"
|
|
29
15
|
path = "/product-cross-selling-assigned-products"
|
|
30
16
|
model_class = ProductCrossSellingAssignedProducts
|
|
@@ -1,31 +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.product_download import ProductDownloadBase
|
|
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 ProductDownloadBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_download"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
product_id: IdField
|
|
13
|
-
product_version_id: IdField | None = None
|
|
14
|
-
media_id: IdField
|
|
15
|
-
position: int | None = None
|
|
16
|
-
custom_fields: dict[str, Any] | None = None
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ProductDownloadRelations:
|
|
6
|
+
class ProductDownload(ProductDownloadBase, AdminModel["ProductDownloadEndpoint"]):
|
|
20
7
|
product: ForeignRelation["Product"]
|
|
21
8
|
media: ForeignRelation["Media"]
|
|
22
9
|
|
|
23
10
|
|
|
24
|
-
class
|
|
25
|
-
pass
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class ProductDownloadEndpoint(EndpointBase[ProductDownload]):
|
|
11
|
+
class ProductDownloadEndpoint(AdminEndpoint[ProductDownload]):
|
|
29
12
|
name = "product_download"
|
|
30
13
|
path = "/product-download"
|
|
31
14
|
model_class = ProductDownload
|
|
@@ -1,34 +1,9 @@
|
|
|
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.product_export import ProductExportBase
|
|
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 ProductExportBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_export"
|
|
10
|
-
|
|
11
|
-
product_stream_id: IdField
|
|
12
|
-
storefront_sales_channel_id: IdField
|
|
13
|
-
sales_channel_id: IdField
|
|
14
|
-
sales_channel_domain_id: IdField
|
|
15
|
-
currency_id: IdField
|
|
16
|
-
file_name: str
|
|
17
|
-
access_key: str
|
|
18
|
-
encoding: str
|
|
19
|
-
file_format: str
|
|
20
|
-
include_variants: bool | None = None
|
|
21
|
-
generate_by_cronjob: bool
|
|
22
|
-
generated_at: AwareDatetime | None = None
|
|
23
|
-
interval: int
|
|
24
|
-
header_template: str | None = None
|
|
25
|
-
body_template: str | None = None
|
|
26
|
-
footer_template: str | None = None
|
|
27
|
-
paused_schedule: bool | None = None
|
|
28
|
-
is_running: bool | None = None
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class ProductExportRelations:
|
|
6
|
+
class ProductExport(ProductExportBase, AdminModel["ProductExportEndpoint"]):
|
|
32
7
|
product_stream: ForeignRelation["ProductStream"]
|
|
33
8
|
storefront_sales_channel: ForeignRelation["SalesChannel"]
|
|
34
9
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
@@ -36,11 +11,7 @@ class ProductExportRelations:
|
|
|
36
11
|
currency: ForeignRelation["Currency"]
|
|
37
12
|
|
|
38
13
|
|
|
39
|
-
class
|
|
40
|
-
pass
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class ProductExportEndpoint(EndpointBase[ProductExport]):
|
|
14
|
+
class ProductExportEndpoint(AdminEndpoint[ProductExport]):
|
|
44
15
|
name = "product_export"
|
|
45
16
|
path = "/product-export"
|
|
46
17
|
model_class = ProductExport
|
|
@@ -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.product_feature_set import ProductFeatureSetBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...relations import ManyRelation
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
class ProductFeatureSetBase(ApiModelBase[EndpointClass]):
|
|
8
|
-
_identifier: str = "product_feature_set"
|
|
9
|
-
|
|
10
|
-
name: str
|
|
11
|
-
description: str | None = None
|
|
12
|
-
features: dict[str, Any] | None = None
|
|
13
|
-
translated: dict[str, Any] | None = None
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class ProductFeatureSetRelations:
|
|
6
|
+
class ProductFeatureSet(ProductFeatureSetBase, AdminModel["ProductFeatureSetEndpoint"]):
|
|
17
7
|
products: ManyRelation["Product"]
|
|
18
8
|
|
|
19
9
|
|
|
20
|
-
class
|
|
21
|
-
pass
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ProductFeatureSetEndpoint(EndpointBase[ProductFeatureSet]):
|
|
10
|
+
class ProductFeatureSetEndpoint(AdminEndpoint[ProductFeatureSet]):
|
|
25
11
|
name = "product_feature_set"
|
|
26
12
|
path = "/product-feature-set"
|
|
27
13
|
model_class = ProductFeatureSet
|
|
@@ -1,32 +1,14 @@
|
|
|
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.product_manufacturer import ProductManufacturerBase
|
|
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 ProductManufacturerBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_manufacturer"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
media_id: IdField | None = None
|
|
13
|
-
link: str | None = None
|
|
14
|
-
name: str
|
|
15
|
-
description: str | None = None
|
|
16
|
-
custom_fields: dict[str, Any] | None = None
|
|
17
|
-
translated: dict[str, Any] | None = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ProductManufacturerRelations:
|
|
6
|
+
class ProductManufacturer(ProductManufacturerBase, AdminModel["ProductManufacturerEndpoint"]):
|
|
21
7
|
media: ForeignRelation["Media"]
|
|
22
8
|
products: ManyRelation["Product"]
|
|
23
9
|
|
|
24
10
|
|
|
25
|
-
class
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class ProductManufacturerEndpoint(EndpointBase[ProductManufacturer]):
|
|
11
|
+
class ProductManufacturerEndpoint(AdminEndpoint[ProductManufacturer]):
|
|
30
12
|
name = "product_manufacturer"
|
|
31
13
|
path = "/product-manufacturer"
|
|
32
14
|
model_class = ProductManufacturer
|
|
@@ -1,32 +1,15 @@
|
|
|
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.product_media import ProductMediaBase
|
|
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 ProductMediaBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_media"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
product_id: IdField
|
|
13
|
-
product_version_id: IdField | None = None
|
|
14
|
-
media_id: IdField
|
|
15
|
-
position: int | None = None
|
|
16
|
-
custom_fields: dict[str, Any] | None = None
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ProductMediaRelations:
|
|
6
|
+
class ProductMedia(ProductMediaBase, AdminModel["ProductMediaEndpoint"]):
|
|
20
7
|
product: ForeignRelation["Product"]
|
|
21
8
|
media: ForeignRelation["Media"]
|
|
22
9
|
cover_products: ManyRelation["Product"]
|
|
23
10
|
|
|
24
11
|
|
|
25
|
-
class
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class ProductMediaEndpoint(EndpointBase[ProductMedia]):
|
|
12
|
+
class ProductMediaEndpoint(AdminEndpoint[ProductMedia]):
|
|
30
13
|
name = "product_media"
|
|
31
14
|
path = "/product-media"
|
|
32
15
|
model_class = ProductMedia
|
|
@@ -1,33 +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.product_price import ProductPriceBase
|
|
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 ProductPriceBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_price"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
product_id: IdField
|
|
13
|
-
product_version_id: IdField | None = None
|
|
14
|
-
rule_id: IdField
|
|
15
|
-
price: dict[str, Any]
|
|
16
|
-
quantity_start: int
|
|
17
|
-
quantity_end: int | None = None
|
|
18
|
-
custom_fields: dict[str, Any] | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class ProductPriceRelations:
|
|
6
|
+
class ProductPrice(ProductPriceBase, AdminModel["ProductPriceEndpoint"]):
|
|
22
7
|
product: ForeignRelation["Product"]
|
|
23
8
|
rule: ForeignRelation["Rule"]
|
|
24
9
|
|
|
25
10
|
|
|
26
|
-
class
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class ProductPriceEndpoint(EndpointBase[ProductPrice]):
|
|
11
|
+
class ProductPriceEndpoint(AdminEndpoint[ProductPrice]):
|
|
31
12
|
name = "product_price"
|
|
32
13
|
path = "/product-price"
|
|
33
14
|
model_class = ProductPrice
|
|
@@ -1,40 +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.product_review import ProductReviewBase
|
|
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 ProductReviewBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "product_review"
|
|
10
|
-
|
|
11
|
-
product_id: IdField
|
|
12
|
-
product_version_id: IdField | None = None
|
|
13
|
-
customer_id: IdField | None = None
|
|
14
|
-
sales_channel_id: IdField
|
|
15
|
-
language_id: IdField
|
|
16
|
-
external_user: str | None = None
|
|
17
|
-
external_email: str | None = None
|
|
18
|
-
title: str
|
|
19
|
-
content: str
|
|
20
|
-
points: float | None = None
|
|
21
|
-
status: bool | None = None
|
|
22
|
-
comment: str | None = None
|
|
23
|
-
custom_fields: dict[str, Any] | None = None
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ProductReviewRelations:
|
|
6
|
+
class ProductReview(ProductReviewBase, AdminModel["ProductReviewEndpoint"]):
|
|
27
7
|
product: ForeignRelation["Product"]
|
|
28
8
|
customer: ForeignRelation["Customer"]
|
|
29
9
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
30
10
|
language: ForeignRelation["Language"]
|
|
31
11
|
|
|
32
12
|
|
|
33
|
-
class
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class ProductReviewEndpoint(EndpointBase[ProductReview]):
|
|
13
|
+
class ProductReviewEndpoint(AdminEndpoint[ProductReview]):
|
|
38
14
|
name = "product_review"
|
|
39
15
|
path = "/product-review"
|
|
40
16
|
model_class = ProductReview
|
|
@@ -1,29 +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_search_keyword import ProductSearchKeywordBase
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class ProductSearchKeywordBase
|
|
7
|
-
_identifier: str = "product_search_keyword"
|
|
8
|
-
|
|
9
|
-
version_id: IdField | None = None
|
|
10
|
-
language_id: IdField
|
|
11
|
-
product_id: IdField
|
|
12
|
-
product_version_id: IdField | None = None
|
|
13
|
-
keyword: str
|
|
14
|
-
ranking: float
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class ProductSearchKeywordRelations:
|
|
6
|
+
class ProductSearchKeyword(ProductSearchKeywordBase, AdminModel["ProductSearchKeywordEndpoint"]):
|
|
18
7
|
product: ForeignRelation["Product"]
|
|
19
8
|
language: ForeignRelation["Language"]
|
|
20
9
|
|
|
21
10
|
|
|
22
|
-
class
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ProductSearchKeywordEndpoint(EndpointBase[ProductSearchKeyword]):
|
|
11
|
+
class ProductSearchKeywordEndpoint(AdminEndpoint[ProductSearchKeyword]):
|
|
27
12
|
name = "product_search_keyword"
|
|
28
13
|
path = "/product-search-keyword"
|
|
29
14
|
model_class = ProductSearchKeyword
|