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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from shopware_api_client.models.document import DocumentBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Document(DocumentBase):
|
|
5
|
+
document_type: "DocumentType | None" = None
|
|
6
|
+
order: "Order | None" = None
|
|
7
|
+
referenced_document: "Document | None" = None
|
|
8
|
+
dependent_documents: list["Document"] | None = None
|
|
9
|
+
document_media_file: "Media | None" = None
|
|
10
|
+
document_a11y_media_file: "Media | None" = None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
from .document_type import DocumentType # noqa: E402
|
|
14
|
+
from .media import Media # noqa: E402
|
|
15
|
+
from .order import Order # noqa: E402
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from shopware_api_client.models.landing_page import LandingPageBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class LandingPage(LandingPageBase):
|
|
5
|
+
cms_page: "CmsPage | None" = None
|
|
6
|
+
seo_urls: list["SeoUrl"] | None = None
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from .cms_page import CmsPage # noqa: E402
|
|
10
|
+
from .seo_url import SeoUrl # noqa: E402
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from shopware_api_client.base import StoreSearchEndpoint, EndpointMixin
|
|
2
|
+
from shopware_api_client.models.language import LanguageBase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Language(LanguageBase, EndpointMixin["LanguageEndpoint"]):
|
|
6
|
+
parent: "Language | None" = None
|
|
7
|
+
locale: "Locale | None" = None
|
|
8
|
+
translation_code: "Locale | None" = None
|
|
9
|
+
children: list["Language"] | None = None
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LanguageEndpoint(StoreSearchEndpoint[Language]):
|
|
13
|
+
model_class = Language
|
|
14
|
+
name = "language"
|
|
15
|
+
path = "/language"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from .locale import Locale # noqa: E402
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from shopware_api_client.base import StoreSearchEndpoint, EndpointMixin
|
|
4
|
+
from shopware_api_client.endpoints.base_fields import IdField
|
|
5
|
+
from shopware_api_client.models.order import OrderBase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Order(OrderBase, EndpointMixin["OrderEndpoint"]):
|
|
9
|
+
state_machine_state: "StateMachineState"
|
|
10
|
+
primary_order_delivery: "OrderDelivery | None" = None
|
|
11
|
+
primary_order_transaction: "OrderTransaction | None" = None
|
|
12
|
+
order_customer: "OrderCustomer | None" = None
|
|
13
|
+
currency: "Currency | None" = None
|
|
14
|
+
language: "Language | None" = None
|
|
15
|
+
addresses: list["OrderAddress"] | None = None
|
|
16
|
+
billing_address: "OrderAddress | None" = None
|
|
17
|
+
deliveries: list["OrderDelivery"] | None = None
|
|
18
|
+
line_items: list["OrderLineItem"] | None = None
|
|
19
|
+
transactions: list["OrderTransaction"] | None = None
|
|
20
|
+
documents: list["Document"] | None = None
|
|
21
|
+
tags: list["Tag"] | None = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class OrderEndpoint(StoreSearchEndpoint[Order]):
|
|
25
|
+
model_class = Order
|
|
26
|
+
path = "/order"
|
|
27
|
+
|
|
28
|
+
async def create_from_cart(
|
|
29
|
+
self, customer_comment: str | None = None, affiliate_code: str | None = None, campaign_code: str | None = None
|
|
30
|
+
) -> Order:
|
|
31
|
+
data: dict[str, str] = {}
|
|
32
|
+
|
|
33
|
+
if customer_comment is not None:
|
|
34
|
+
data["customerComment"] = customer_comment
|
|
35
|
+
|
|
36
|
+
if affiliate_code is not None:
|
|
37
|
+
data["affiliateCode"] = affiliate_code
|
|
38
|
+
|
|
39
|
+
if campaign_code is not None:
|
|
40
|
+
data["campaignCode"] = campaign_code
|
|
41
|
+
|
|
42
|
+
response = await self.client.post("/checkout/order", json=data)
|
|
43
|
+
result: dict[str, Any] = response.json()
|
|
44
|
+
|
|
45
|
+
return self._parse_response(result, cls=Order)
|
|
46
|
+
|
|
47
|
+
async def cancel(self, order_id: IdField) -> "StateMachineState":
|
|
48
|
+
result: dict[str, Any] = (await self.client.post("/order/state/cancel", json={"orderId": order_id})).json()
|
|
49
|
+
return self._parse_response(result, StateMachineState)
|
|
50
|
+
|
|
51
|
+
async def update_payment_method(self, payment_method_id: IdField, order_id: IdField) -> bool:
|
|
52
|
+
result = await self.client.post(
|
|
53
|
+
"/order/payment", json={"paymentMethodId": payment_method_id, "orderId": order_id}
|
|
54
|
+
)
|
|
55
|
+
return bool(result.is_success)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
from .currency import Currency # noqa: E402
|
|
59
|
+
from .document import Document # noqa: E402
|
|
60
|
+
from .language import Language # noqa: E402
|
|
61
|
+
from .order_address import OrderAddress # noqa: E402
|
|
62
|
+
from .order_customer import OrderCustomer # noqa: E402
|
|
63
|
+
from .order_delivery import OrderDelivery # noqa: E402
|
|
64
|
+
from .order_line_item import OrderLineItem # noqa: E402
|
|
65
|
+
from .order_transaction import OrderTransaction # noqa: E402
|
|
66
|
+
from .state_machine_state import StateMachineState # noqa: E402
|
|
67
|
+
from .tag import Tag # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.models.order_address import OrderAddressBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderAddress(OrderAddressBase):
|
|
5
|
+
country: "Country | None" = None
|
|
6
|
+
country_state: "CountryState | None" = None
|
|
7
|
+
salutation: "Salutation | None" = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .country import Country # noqa: E402
|
|
11
|
+
from .country_state import CountryState # noqa: E402
|
|
12
|
+
from .salutation import Salutation # noqa: E402
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from shopware_api_client.models.order_delivery import OrderDeliveryBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderDelivery(OrderDeliveryBase):
|
|
5
|
+
state_machine_stateL: "StateMachineState | None" = None
|
|
6
|
+
shipping_order_address: "OrderAddress | None" = None
|
|
7
|
+
shipping_method: "ShippingMethod | None" = None
|
|
8
|
+
positions: list["OrderDeliveryPosition"] | None = None
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
from .order_address import OrderAddress # noqa: E402
|
|
12
|
+
from .order_delivery_position import OrderDeliveryPosition # noqa: E402
|
|
13
|
+
from .shipping_method import ShippingMethod # noqa: E402
|
|
14
|
+
from .state_machine_state import StateMachineState # noqa: E402
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from shopware_api_client.models.order_line_item import OrderLineItemBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderLineItem(OrderLineItemBase):
|
|
5
|
+
cover: "Media | None" = None
|
|
6
|
+
product: "Product | None" = None
|
|
7
|
+
order_delivery_positions: list["OrderDeliveryPosition"] | None = None
|
|
8
|
+
parent: "OrderLineItem | None" = None
|
|
9
|
+
children: list["OrderLineItem"] | None = None
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
from .media import Media # noqa: E402
|
|
13
|
+
from .order_delivery_position import OrderDeliveryPosition # noqa: E402
|
|
14
|
+
from .product import Product # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.models.order_transaction import OrderTransactionBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderTransaction(OrderTransactionBase):
|
|
5
|
+
state_machine_state: "StateMachineState | None" = None
|
|
6
|
+
payment_method: "PaymentMethod | None" = None
|
|
7
|
+
captures: list["OrderTransactionCapture"] | None = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .order_transaction_capture import OrderTransactionCapture # noqa: E402
|
|
11
|
+
from .payment_method import PaymentMethod # noqa: E402
|
|
12
|
+
from .state_machine_state import StateMachineState # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.models.order_transaction_capture import OrderTransactionCaptureBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderTransactionCapture(OrderTransactionCaptureBase):
|
|
5
|
+
state_machine_state: "StateMachineState | None" = None
|
|
6
|
+
transaction: "OrderTransaction | None" = None
|
|
7
|
+
refunds: list["OrderTransactionCaptureRefund"] | None = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .order_transaction import OrderTransaction # noqa: E402
|
|
11
|
+
from .order_transaction_capture_refund import OrderTransactionCaptureRefund # noqa: E402
|
|
12
|
+
from .state_machine_state import StateMachineState # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.models.order_transaction_capture_refund import OrderTransactionCaptureRefundBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class OrderTransactionCaptureRefund(OrderTransactionCaptureRefundBase):
|
|
5
|
+
state_machine_state: "StateMachineState | None" = None
|
|
6
|
+
transaction_capture: "OrderTransactionCapture | None" = None
|
|
7
|
+
positions: list["OrderTransactionCaptureRefundPosition"] | None = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .order_transaction_capture import OrderTransactionCapture # noqa: E402
|
|
11
|
+
from .order_transaction_capture_refund_position import OrderTransactionCaptureRefundPosition # noqa: E402
|
|
12
|
+
from .state_machine_state import StateMachineState # noqa: E402
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from shopware_api_client.models.order_transaction_capture_refund_position import \
|
|
2
|
+
OrderTransactionCaptureRefundPositionBase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OrderTransactionCaptureRefundPosition(OrderTransactionCaptureRefundPositionBase):
|
|
6
|
+
order_line_item: "OrderLineItem | None" = None
|
|
7
|
+
order_transaction_capture_refund: "OrderTransactionCaptureRefund | None" = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .order_line_item import OrderLineItem # noqa: E402
|
|
11
|
+
from .order_transaction_capture_refund import OrderTransactionCaptureRefund # noqa: E402
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from shopware_api_client.base import StoreSearchEndpoint, EndpointMixin
|
|
2
|
+
from shopware_api_client.models.product import ProductBase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Product(ProductBase, EndpointMixin["ProductEndpoint"]):
|
|
6
|
+
calculated_price: "CalculatedPrice"
|
|
7
|
+
calculated_prices: list["CalculatedPrice"]
|
|
8
|
+
calculated_max_purchase: int | None = None
|
|
9
|
+
calculated_cheapest_price: "CalculatedCheapestPrice | None" = None
|
|
10
|
+
is_new: bool | None = None
|
|
11
|
+
sorted_properties: list["PropertyGroup"] | None = None
|
|
12
|
+
downloads: list["ProductDownload"] | None = None
|
|
13
|
+
parent: "Product | None" = None
|
|
14
|
+
children: list["Product"] | None = None
|
|
15
|
+
delivery_time: "DeliveryTime | None" = None
|
|
16
|
+
tax: "Tax | None" = None
|
|
17
|
+
manufacturer: "ProductManufacturer | None" = None
|
|
18
|
+
unit: "Unit | None" = None
|
|
19
|
+
cover: "ProductMedia | None" = None
|
|
20
|
+
cms_page: "CmsPage | None" = None
|
|
21
|
+
canonical_product: "Product | None" = None
|
|
22
|
+
media: list["ProductMedia"] | None = None
|
|
23
|
+
cross_sellings: list["ProductCrossSelling"] | None = None
|
|
24
|
+
configurator_settings: list["ProductConfiguratorSetting"] | None = None
|
|
25
|
+
product_reviews: list["ProductReview"] | None = None
|
|
26
|
+
main_categories: list["MainCategory"] | None = None
|
|
27
|
+
seo_urls: list["SeoUrl"] | None = None
|
|
28
|
+
options: list["PropertyGroupOption"] | None = None
|
|
29
|
+
properties: list["PropertyGroupOption"] | None = None
|
|
30
|
+
categories: list["Category"] | None = None
|
|
31
|
+
streams: list["ProductStream"] | None = None
|
|
32
|
+
categories_ro: list["Category"] | None = None
|
|
33
|
+
tags: list["Tag"] | None = None
|
|
34
|
+
seo_category: "Category | None" = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ProductEndpoint(StoreSearchEndpoint[Product]):
|
|
38
|
+
model_class = Product
|
|
39
|
+
path = "/search"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
from shopware_api_client.structs.calculated_price import CalculatedPrice # noqa: E402
|
|
43
|
+
from shopware_api_client.structs.calculated_cheapest_price import CalculatedCheapestPrice # noqa: E402
|
|
44
|
+
from .category import Category # noqa: E402
|
|
45
|
+
from .cms_page import CmsPage # noqa: E402
|
|
46
|
+
from .delivery_time import DeliveryTime # noqa: E402
|
|
47
|
+
from .main_category import MainCategory # noqa: E402
|
|
48
|
+
from .product_configurator_setting import ProductConfiguratorSetting # noqa: E402
|
|
49
|
+
from .product_cross_selling import ProductCrossSelling # noqa: E402
|
|
50
|
+
from .product_download import ProductDownload # noqa: E402
|
|
51
|
+
from .product_manufacturer import ProductManufacturer # noqa: E402
|
|
52
|
+
from .product_media import ProductMedia # noqa: E402
|
|
53
|
+
from .product_review import ProductReview # noqa: E402
|
|
54
|
+
from .product_stream import ProductStream # noqa: E402
|
|
55
|
+
from .property_group import PropertyGroup # noqa: E402
|
|
56
|
+
from .property_group_option import PropertyGroupOption # noqa: E402
|
|
57
|
+
from .seo_url import SeoUrl # noqa: E402
|
|
58
|
+
from .tag import Tag # noqa: E402
|
|
59
|
+
from .tax import Tax # noqa: E402
|
|
60
|
+
from .unit import Unit # noqa: E402
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from shopware_api_client.models.product_configurator_setting import ProductConfiguratorSettingBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProductConfiguratorSetting(ProductConfiguratorSettingBase):
|
|
5
|
+
media: "Media | None" = None
|
|
6
|
+
option: "PropertyGroupOption | None" = None
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from .media import Media # noqa: E402
|
|
10
|
+
from .property_group_option import PropertyGroupOption # noqa: E402
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from shopware_api_client.models.product_download import ProductDownloadBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProductDownload(ProductDownloadBase):
|
|
5
|
+
product: "Product | None" = None
|
|
6
|
+
media: "Media | None" = None
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from .media import Media # noqa: E402
|
|
10
|
+
from .product import Product # noqa: E402
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from shopware_api_client.models.product_media import ProductMediaBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProductMedia(ProductMediaBase):
|
|
5
|
+
media: "Media | None" = None
|
|
6
|
+
thumbnails: list["MediaThumbnail"] | None = None
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from .media import Media # noqa: E402
|
|
10
|
+
from .media_thumbnail import MediaThumbnail # noqa: E402
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from shopware_api_client.models.property_group_option import PropertyGroupOptionBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PropertyGroupOption(PropertyGroupOptionBase):
|
|
5
|
+
media: "Media | None" = None
|
|
6
|
+
group: "PropertyGroup"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from .media import Media # noqa: E402
|
|
10
|
+
from .property_group import PropertyGroup # noqa: E402
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from shopware_api_client.models.sales_channel import SalesChannelBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SalesChannel(SalesChannelBase):
|
|
5
|
+
language: "Language | None" = None
|
|
6
|
+
currency: "Currency | None" = None
|
|
7
|
+
payment_method: "PaymentMethod | None" = None
|
|
8
|
+
shipping_method: "ShippingMethod | None" = None
|
|
9
|
+
country: "Country | None" = None
|
|
10
|
+
domains: list["SalesChannelDomain"] | None = None
|
|
11
|
+
navigation_category: "Category | None" = None
|
|
12
|
+
footer_category: "Category | None" = None
|
|
13
|
+
service_category: "Category | None" = None
|
|
14
|
+
hreflang_default_domain: "SalesChannelDomain | None" = None
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
from .category import Category # noqa: E402
|
|
18
|
+
from .country import Country # noqa: E402
|
|
19
|
+
from .currency import Currency # noqa: E402
|
|
20
|
+
from .language import Language # noqa: E402
|
|
21
|
+
from .sales_channel_domain import SalesChannelDomain # noqa: E402
|
|
22
|
+
from .shipping_method import ShippingMethod # noqa: E402
|
|
23
|
+
from .payment_method import PaymentMethod # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.models.sales_channel_domain import SalesChannelDomainBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SalesChannelDomain(SalesChannelDomainBase):
|
|
5
|
+
language: "Language | None" = None
|
|
6
|
+
currency: "Currency | None" = None
|
|
7
|
+
sales_channel_default_hreflang: "SalesChannel | None" = None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .currency import Currency # noqa: E402
|
|
11
|
+
from .language import Language # noqa: E402
|
|
12
|
+
from .sales_channel import SalesChannel # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from shopware_api_client.base import StoreSearchEndpoint, EndpointMixin
|
|
2
|
+
from shopware_api_client.models.salutation import SalutationBase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Salutation(SalutationBase, EndpointMixin["SalutationEndpoint"]):
|
|
6
|
+
pass
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SalutationEndpoint(StoreSearchEndpoint[Salutation]):
|
|
10
|
+
model_class = Salutation
|
|
11
|
+
name = "salutation"
|
|
12
|
+
path = "/salutation"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from shopware_api_client.models.shipping_method import ShippingMethodBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ShippingMethod(ShippingMethodBase):
|
|
5
|
+
delivery_time: "DeliveryTime | None" = None
|
|
6
|
+
availability_rule: "Rule | None" = None
|
|
7
|
+
prices: list["ShippingMethodPrice"] | None = None
|
|
8
|
+
media: "Media | None" = None
|
|
9
|
+
tags: list["Tag"] | None = None
|
|
10
|
+
tax: "Tax | None" = None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
from ..core.delivery_time import DeliveryTime # noqa: E402
|
|
14
|
+
from ..core.media import Media # noqa: E402
|
|
15
|
+
from ..core.rule import Rule # noqa: E402
|
|
16
|
+
from ..core.shipping_method_price import ShippingMethodPrice # noqa: E402
|
|
17
|
+
from ..core.tag import Tag # noqa: E402
|
|
18
|
+
from ..core.tax import Tax # noqa: E402
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from pydantic import BaseModel, ConfigDict, AliasGenerator, AliasChoices
|
|
2
|
+
from pydantic.alias_generators import to_camel
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class FieldSetBase(BaseModel):
|
|
6
|
+
model_config = ConfigDict(
|
|
7
|
+
alias_generator=AliasGenerator(
|
|
8
|
+
validation_alias=lambda field_name: AliasChoices(field_name, to_camel(field_name)),
|
|
9
|
+
serialization_alias=lambda field_name: to_camel(field_name),
|
|
10
|
+
),
|
|
11
|
+
validate_assignment=True,
|
|
12
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from pydantic import AwareDatetime
|
|
2
|
+
from shopware_api_client.base import ApiModelBase
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AclRoleBase(ApiModelBase):
|
|
6
|
+
_identifier = "acl_role"
|
|
7
|
+
|
|
8
|
+
name: str
|
|
9
|
+
description: str | None = None
|
|
10
|
+
privileges: list[str]
|
|
11
|
+
deleted_at: AwareDatetime | None = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from shopware_api_client.base import ApiModelBase, CustomFieldsMixin
|
|
6
|
+
from shopware_api_client.endpoints.base_fields import IdField
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AppBase(ApiModelBase, CustomFieldsMixin):
|
|
10
|
+
_identifier = "app"
|
|
11
|
+
|
|
12
|
+
name: str
|
|
13
|
+
path: str
|
|
14
|
+
author: str | None = None
|
|
15
|
+
copyright: str | None = None
|
|
16
|
+
license: str | None = None
|
|
17
|
+
active: bool
|
|
18
|
+
configurable: bool
|
|
19
|
+
privacy: str | None = None
|
|
20
|
+
version: str
|
|
21
|
+
icon: str | None = Field(None, description="Runtime field, cannot be used as part of the criteria.", exclude=True)
|
|
22
|
+
modules: list[dict[str, Any]] | None = None
|
|
23
|
+
main_module: dict[str, Any] | None = None
|
|
24
|
+
cookies: list[dict[str, Any]] | None = None
|
|
25
|
+
allow_disable: bool
|
|
26
|
+
base_app_url: str | None = None
|
|
27
|
+
allowed_hosts: list[str] | None = None
|
|
28
|
+
template_load_priority: int | None = None
|
|
29
|
+
label: str
|
|
30
|
+
description: str | None = None
|
|
31
|
+
privacy_policy_extensions: str | None = None
|
|
32
|
+
integration_id: IdField
|
|
33
|
+
acl_role_id: IdField
|