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,49 +1,17 @@
|
|
|
1
|
-
from
|
|
1
|
+
from pydantic import Field
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
4
|
+
from shopware_api_client.endpoints.base_fields import IdField
|
|
5
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
6
|
+
from shopware_api_client.models.order import OrderBase
|
|
7
|
+
from shopware_api_client.structs.cash_rounding_config import CashRoundingConfig
|
|
4
8
|
|
|
5
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
6
|
-
from ...base_fields import Amount, IdField, Price, Rounding
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
class OrderBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
auto_increment: int | None = Field(default=None, exclude=True)
|
|
15
|
-
order_number: str | None = None
|
|
16
|
-
billing_address_id: IdField
|
|
17
|
-
billing_address_version_id: IdField | None = None
|
|
18
|
-
currency_id: IdField
|
|
19
|
-
language_id: IdField
|
|
20
|
-
sales_channel_id: IdField
|
|
21
|
-
order_date_time: AwareDatetime
|
|
22
|
-
order_date: str | None = Field(default=None, exclude=True)
|
|
23
|
-
price: Price | None = None
|
|
24
|
-
amount_total: float | None = Field(default=None, exclude=True)
|
|
25
|
-
amount_net: float | None = Field(default=None, exclude=True)
|
|
26
|
-
position_price: float | None = Field(default=None, exclude=True)
|
|
27
|
-
tax_status: str | None = Field(default=None, exclude=True)
|
|
28
|
-
shipping_costs: Amount | None = None
|
|
29
|
-
shipping_total: float | None = Field(default=None, exclude=True)
|
|
30
|
-
order_customer: "OrderCustomer"
|
|
31
|
-
currency_factor: float
|
|
32
|
-
deep_link_code: str | None = None
|
|
33
|
-
affiliate_code: str | None = None
|
|
34
|
-
campaign_code: str | None = None
|
|
35
|
-
customer_comment: str | None = None
|
|
36
|
-
source: str | None = None
|
|
10
|
+
class Order(OrderBase, AdminModel["OrderEndpoint"]):
|
|
37
11
|
state_id: IdField = Field(..., exclude=True)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
updated_by_id: IdField | None = None
|
|
42
|
-
item_rounding: Rounding
|
|
43
|
-
total_rounding: Rounding
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class OrderRelations:
|
|
12
|
+
item_rounding: CashRoundingConfig
|
|
13
|
+
total_rounding: CashRoundingConfig
|
|
14
|
+
order_customer: "OrderCustomer"
|
|
47
15
|
state: ForeignRelation["StateMachineState"]
|
|
48
16
|
currency: ForeignRelation["Currency"]
|
|
49
17
|
language: ForeignRelation["Language"]
|
|
@@ -59,11 +27,7 @@ class OrderRelations:
|
|
|
59
27
|
updated_by: ForeignRelation["User"]
|
|
60
28
|
|
|
61
29
|
|
|
62
|
-
class
|
|
63
|
-
pass
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class OrderEndpoint(EndpointBase[Order]):
|
|
30
|
+
class OrderEndpoint(AdminEndpoint[Order]):
|
|
67
31
|
name = "order"
|
|
68
32
|
path = "/order"
|
|
69
33
|
model_class = Order
|
|
@@ -73,7 +37,7 @@ from .currency import Currency # noqa: E402
|
|
|
73
37
|
from .document import Document # noqa: E402
|
|
74
38
|
from .language import Language # noqa: E402
|
|
75
39
|
from .order_address import OrderAddress # noqa: E402
|
|
76
|
-
from .order_customer import OrderCustomer # noqa: E402
|
|
40
|
+
from shopware_api_client.endpoints.admin.core.order_customer import OrderCustomer # noqa: E402
|
|
77
41
|
from .order_delivery import OrderDelivery # noqa: E402
|
|
78
42
|
from .order_line_item import OrderLineItem # noqa: E402
|
|
79
43
|
from .order_transaction import OrderTransaction # noqa: E402
|
|
@@ -1,35 +1,11 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.base_fields import IdField
|
|
3
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
4
|
+
from shopware_api_client.models.order_address import OrderAddressBase
|
|
2
5
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
class OrderAddressBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "order_address"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
country_id: IdField
|
|
13
|
-
country_state_id: IdField | None = None
|
|
7
|
+
class OrderAddress(OrderAddressBase, AdminModel["OrderAddressEndpoint"]):
|
|
14
8
|
order_id: IdField
|
|
15
|
-
order_version_id: IdField | None = None
|
|
16
|
-
salutation_id: IdField | None = None
|
|
17
|
-
first_name: str
|
|
18
|
-
last_name: str
|
|
19
|
-
street: str
|
|
20
|
-
zipcode: str | None = None
|
|
21
|
-
city: str
|
|
22
|
-
company: str | None = None
|
|
23
|
-
department: str | None = None
|
|
24
|
-
title: str | None = None
|
|
25
|
-
vat_id: str | None = None
|
|
26
|
-
phone_number: str | None = None
|
|
27
|
-
additional_address_line1: str | None = None
|
|
28
|
-
additional_address_line2: str | None = None
|
|
29
|
-
custom_fields: dict[str, Any] | None = None
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class OrderAddressRelations:
|
|
33
9
|
country: ForeignRelation["Country"]
|
|
34
10
|
country_state: ForeignRelation["CountryState"]
|
|
35
11
|
order: ForeignRelation["Order"]
|
|
@@ -37,11 +13,7 @@ class OrderAddressRelations:
|
|
|
37
13
|
salutation: ManyRelation["Salutation"]
|
|
38
14
|
|
|
39
15
|
|
|
40
|
-
class
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class OrderAddressEndpoint(EndpointBase[OrderAddress]):
|
|
16
|
+
class OrderAddressEndpoint(AdminEndpoint[OrderAddress]):
|
|
45
17
|
name = "order_address"
|
|
46
18
|
path = "/order-address"
|
|
47
19
|
model_class = OrderAddress
|
|
@@ -1,40 +1,17 @@
|
|
|
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
|
|
4
|
+
from shopware_api_client.models.order_customer import OrderCustomerBase
|
|
2
5
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
class OrderCustomerBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "language"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
customer_id: IdField | None = None
|
|
7
|
+
class OrderCustomer(OrderCustomerBase, AdminModel["OrderCustomerEndpoint"]):
|
|
13
8
|
order_id: IdField
|
|
14
|
-
order_version_id: IdField | None = None
|
|
15
|
-
email: str
|
|
16
|
-
salutation_id: IdField | None = None
|
|
17
|
-
first_name: str
|
|
18
|
-
last_name: str
|
|
19
|
-
company: str | None = None
|
|
20
|
-
title: str | None = None
|
|
21
|
-
vat_ids: list[str] | None = None
|
|
22
|
-
customer_number: str | None = None
|
|
23
|
-
custom_fields: dict[str, Any] | None = None
|
|
24
|
-
remote_address: str | None = None
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class OrderCustomerRelations:
|
|
28
9
|
order: ForeignRelation["Order"]
|
|
29
10
|
customer: ForeignRelation["Customer"]
|
|
30
11
|
salutation: ForeignRelation["Salutation"]
|
|
31
12
|
|
|
32
13
|
|
|
33
|
-
class
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class OrderCustomerEndpoint(EndpointBase[OrderCustomer]):
|
|
14
|
+
class OrderCustomerEndpoint(AdminEndpoint[OrderCustomer]):
|
|
38
15
|
name = "order_customer"
|
|
39
16
|
path = "/order-customer"
|
|
40
17
|
model_class = OrderCustomer
|
|
@@ -1,30 +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.order_delivery import OrderDeliveryBase
|
|
2
4
|
|
|
3
|
-
from pydantic import AwareDatetime, Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import Amount, IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class OrderDeliveryBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order_delivery"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
order_id: IdField
|
|
15
|
-
order_version_id: IdField | None = None
|
|
16
|
-
shipping_order_address_id: IdField
|
|
17
|
-
shipping_order_address_version_id: IdField | None = None
|
|
18
|
-
shipping_method_id: IdField
|
|
19
|
-
state_id: IdField = Field(..., exclude=True)
|
|
20
|
-
tracking_codes: list[str]
|
|
21
|
-
shipping_date_earliest: AwareDatetime
|
|
22
|
-
shipping_date_latest: AwareDatetime
|
|
23
|
-
shipping_costs: Amount | None = None
|
|
24
|
-
custom_fields: dict[str, Any] | None = None
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class OrderDeliveryRelations:
|
|
6
|
+
class OrderDelivery(OrderDeliveryBase, AdminModel["OrderDeliveryEndpoint"]):
|
|
28
7
|
state: ForeignRelation["StateMachineState"]
|
|
29
8
|
order: ForeignRelation["Order"]
|
|
30
9
|
shipping_order_address: ForeignRelation["OrderAddress"]
|
|
@@ -32,11 +11,7 @@ class OrderDeliveryRelations:
|
|
|
32
11
|
positions: ManyRelation["OrderDeliveryPosition"]
|
|
33
12
|
|
|
34
13
|
|
|
35
|
-
class
|
|
36
|
-
pass
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class OrderDeliveryEndpoint(EndpointBase[OrderDelivery]):
|
|
14
|
+
class OrderDeliveryEndpoint(AdminEndpoint[OrderDelivery]):
|
|
40
15
|
name = "order_delivery"
|
|
41
16
|
path = "/order-delivery"
|
|
42
17
|
model_class = OrderDelivery
|
|
@@ -1,35 +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.order_delivery_position import OrderDeliveryPositionBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField, Price
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class OrderDeliveryPositionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "order_delivery_position"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
order_delivery_id: IdField
|
|
13
|
-
order_delivery_version_id: IdField | None = None
|
|
14
|
-
order_line_item_id: IdField
|
|
15
|
-
order_line_item_version_id: IdField | None = None
|
|
16
|
-
price: Price | None = None
|
|
17
|
-
unit_price: float | None = None
|
|
18
|
-
total_price: float | None = None
|
|
19
|
-
quantity: int | None = None
|
|
20
|
-
custom_fields: dict[str, Any] | None = None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class OrderDeliveryPositionRelations:
|
|
6
|
+
class OrderDeliveryPosition(OrderDeliveryPositionBase, AdminModel["OrderDeliveryPositionEndpoint"]):
|
|
24
7
|
order_delivery: ForeignRelation["OrderDelivery"]
|
|
25
8
|
order_line_item: ForeignRelation["OrderLineItem"]
|
|
26
9
|
|
|
27
10
|
|
|
28
|
-
class
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class OrderDeliveryPositionEndpoint(EndpointBase[OrderDeliveryPosition]):
|
|
11
|
+
class OrderDeliveryPositionEndpoint(AdminEndpoint[OrderDeliveryPosition]):
|
|
33
12
|
name = "order_delivery_position"
|
|
34
13
|
path = "/order-delivery-position"
|
|
35
14
|
model_class = OrderDeliveryPosition
|
|
@@ -1,44 +1,11 @@
|
|
|
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.order_line_item import OrderLineItemBase
|
|
4
|
+
from shopware_api_client.structs.calculated_price import CalculatedPrice
|
|
2
5
|
|
|
3
|
-
from pydantic import Field
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class OrderLineItemBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order_line_item"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
order_id: IdField
|
|
15
|
-
order_version_id: IdField | None = None
|
|
16
|
-
product_id: IdField | None = None
|
|
17
|
-
product_version_id: IdField | None = None
|
|
18
|
-
promotion_id: IdField | None = Field(default=None, exclude=True)
|
|
19
|
-
parent_id: IdField | None = None
|
|
20
|
-
parent_version_id: IdField | None = None
|
|
21
|
-
cover_id: IdField | None = None
|
|
22
|
-
identifier: str
|
|
23
|
-
referenced_id: str | None = None
|
|
24
|
-
quantity: int
|
|
25
|
-
label: str
|
|
26
|
-
payload: dict[str, Any] | list | None = None
|
|
27
|
-
good: bool | None = None
|
|
28
|
-
removable: bool | None = None
|
|
29
|
-
stackable: bool | None = None
|
|
30
|
-
position: int
|
|
31
|
-
states: list[str]
|
|
32
|
-
price: Amount
|
|
33
|
-
price_definition: dict[str, Any] | None = None
|
|
34
|
-
unit_price: float | None = None
|
|
35
|
-
total_price: float | None = None
|
|
36
|
-
description: str | None = None
|
|
37
|
-
type: str | None = None
|
|
38
|
-
custom_fields: dict[str, Any] | None = None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class OrderLineItemRelations:
|
|
7
|
+
class OrderLineItem(OrderLineItemBase, AdminModel["OrderLineItemEndpoint"]):
|
|
8
|
+
price: CalculatedPrice
|
|
42
9
|
cover: ForeignRelation["Media"]
|
|
43
10
|
order: ForeignRelation["Order"]
|
|
44
11
|
product: ForeignRelation["Product"]
|
|
@@ -50,11 +17,7 @@ class OrderLineItemRelations:
|
|
|
50
17
|
children: ManyRelation["OrderLineItem"]
|
|
51
18
|
|
|
52
19
|
|
|
53
|
-
class
|
|
54
|
-
pass
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class OrderLineItemEndpoint(EndpointBase[OrderLineItem]):
|
|
20
|
+
class OrderLineItemEndpoint(AdminEndpoint[OrderLineItem]):
|
|
58
21
|
name = "order_line_item"
|
|
59
22
|
path = "/order-line-item"
|
|
60
23
|
model_class = OrderLineItem
|
|
@@ -1,32 +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.order_line_item_download import OrderLineItemDownloadBase
|
|
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 OrderLineItemDownloadBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "order_line_item_download"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
order_line_item_id: IdField
|
|
13
|
-
order_line_item_version_id: IdField | None = None
|
|
14
|
-
media_id: IdField
|
|
15
|
-
position: int
|
|
16
|
-
access_granted: bool
|
|
17
|
-
custom_fields: dict[str, Any] | None = None
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class OrderLineItemDownloadRelations:
|
|
6
|
+
class OrderLineItemDownload(OrderLineItemDownloadBase, AdminModel["OrderLineItemDownloadEndpoint"]):
|
|
21
7
|
order_line_item: ForeignRelation["OrderLineItem"]
|
|
22
8
|
media: ForeignRelation["Media"]
|
|
23
9
|
|
|
24
10
|
|
|
25
|
-
class
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class OrderLineItemDownloadEndpoint(EndpointBase[OrderLineItemDownload]):
|
|
11
|
+
class OrderLineItemDownloadEndpoint(AdminEndpoint[OrderLineItemDownload]):
|
|
30
12
|
name = "order_line_item_download"
|
|
31
13
|
path = "/order-line-item-download"
|
|
32
14
|
model_class = OrderLineItemDownload
|
|
@@ -1,36 +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.order_transaction import OrderTransactionBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import Amount, IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class OrderTransactionBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order_transaction"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
order_id: IdField
|
|
15
|
-
order_version_id: IdField | None = None
|
|
16
|
-
payment_method_id: IdField
|
|
17
|
-
amount: Amount
|
|
18
|
-
state_id: IdField = Field(..., exclude=True)
|
|
19
|
-
custom_fields: dict[str, Any] | None = None
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class OrderTransactionRelations:
|
|
6
|
+
class OrderTransaction(OrderTransactionBase, AdminModel["OrderTransactionEndpoint"]):
|
|
23
7
|
state: ForeignRelation["StateMachineState"]
|
|
24
8
|
order: ForeignRelation["Order"]
|
|
25
9
|
payment_method: ForeignRelation["PaymentMethod"]
|
|
26
10
|
captures: ManyRelation["OrderTransactionCapture"]
|
|
27
11
|
|
|
28
12
|
|
|
29
|
-
class
|
|
30
|
-
pass
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class OrderTransactionEndpoint(EndpointBase[OrderTransaction]):
|
|
13
|
+
class OrderTransactionEndpoint(AdminEndpoint[OrderTransaction]):
|
|
34
14
|
name = "order_transaction"
|
|
35
15
|
path = "/order-transaction"
|
|
36
16
|
model_class = OrderTransaction
|
|
@@ -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.order_transaction_capture import OrderTransactionCaptureBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import Amount, IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class OrderTransactionCaptureBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order_transaction_capture"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
order_transaction_id: IdField
|
|
15
|
-
order_transaction_version_id: IdField | None = None
|
|
16
|
-
state_id: IdField = Field(..., exclude=True)
|
|
17
|
-
external_reference: str | None = None
|
|
18
|
-
amount: Amount
|
|
19
|
-
custom_fields: dict[str, Any] | None = None
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class OrderTransactionCaptureRelations:
|
|
6
|
+
class OrderTransactionCapture(OrderTransactionCaptureBase, AdminModel["OrderTransactionCaptureEndpoint"]):
|
|
23
7
|
state: ForeignRelation["StateMachineState"]
|
|
24
8
|
order_transaction: ForeignRelation["OrderTransaction"]
|
|
25
9
|
refunds: ManyRelation["OrderTransactionCaptureRefund"]
|
|
26
10
|
|
|
27
11
|
|
|
28
|
-
class OrderTransactionCapture
|
|
29
|
-
OrderTransactionCaptureBase["OrderTransactionCaptureEndpoint"], OrderTransactionCaptureRelations
|
|
30
|
-
):
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class OrderTransactionCaptureEndpoint(EndpointBase[OrderTransactionCapture]):
|
|
12
|
+
class OrderTransactionCaptureEndpoint(AdminEndpoint[OrderTransactionCapture]):
|
|
35
13
|
name = "order_transaction_capture"
|
|
36
14
|
path = "/order-transaction-capture"
|
|
37
15
|
model_class = OrderTransactionCapture
|
|
@@ -1,38 +1,17 @@
|
|
|
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.order_transaction_capture_refund import OrderTransactionCaptureRefundBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class OrderTransactionCaptureRefundBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "order_transaction_capture_refund"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
capture_id: IdField
|
|
15
|
-
capture_version_id: IdField | None = None
|
|
16
|
-
state_id: IdField = Field(..., exclude=True)
|
|
17
|
-
external_reference: str | None = None
|
|
18
|
-
reason: str | None = None
|
|
19
|
-
amount: Amount
|
|
20
|
-
custom_fields: dict[str, Any] | None = None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class OrderTransactionCaptureRefundRelations:
|
|
6
|
+
class OrderTransactionCaptureRefund(
|
|
7
|
+
OrderTransactionCaptureRefundBase, AdminModel["OrderTransactionCaptureRefundEndpoint"]
|
|
8
|
+
):
|
|
24
9
|
state: ForeignRelation["StateMachineState"]
|
|
25
10
|
capture: ForeignRelation["OrderTransactionCapture"]
|
|
26
11
|
positions: ManyRelation["OrderTransactionCaptureRefundPosition"]
|
|
27
12
|
|
|
28
13
|
|
|
29
|
-
class OrderTransactionCaptureRefund
|
|
30
|
-
OrderTransactionCaptureRefundBase["OrderTransactionCaptureRefundEndpoint"], OrderTransactionCaptureRefundRelations
|
|
31
|
-
):
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class OrderTransactionCaptureRefundEndpoint(EndpointBase[OrderTransactionCaptureRefund]):
|
|
14
|
+
class OrderTransactionCaptureRefundEndpoint(AdminEndpoint[OrderTransactionCaptureRefund]):
|
|
36
15
|
name = "order_transaction_capture_refund"
|
|
37
16
|
path = "/order-transaction-capture-refund"
|
|
38
17
|
model_class = OrderTransactionCaptureRefund
|
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class OrderTransactionCaptureRefundPositionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "order_transaction_capture_refund_position"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
refund_id: IdField
|
|
13
|
-
refund_version_id: IdField | None = None
|
|
14
|
-
order_line_item_id: IdField
|
|
15
|
-
order_line_item_version_id: IdField | None = None
|
|
16
|
-
external_reference: str | None = None
|
|
17
|
-
reason: str | None = None
|
|
18
|
-
quantity: int | None = None
|
|
19
|
-
amount: Amount
|
|
20
|
-
custom_fields: dict[str, Any] | None = None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class OrderTransactionCaptureRefundPositionRelations:
|
|
24
|
-
order_line_item: ForeignRelation["OrderLineItem"]
|
|
25
|
-
refund: ForeignRelation["OrderTransactionCaptureRefund"]
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.order_transaction_capture_refund_position import \
|
|
4
|
+
OrderTransactionCaptureRefundPositionBase
|
|
26
5
|
|
|
27
6
|
|
|
28
7
|
class OrderTransactionCaptureRefundPosition(
|
|
29
|
-
OrderTransactionCaptureRefundPositionBase["OrderTransactionCaptureRefundPositionEndpoint"]
|
|
30
|
-
OrderTransactionCaptureRefundPositionRelations,
|
|
8
|
+
OrderTransactionCaptureRefundPositionBase, AdminModel["OrderTransactionCaptureRefundPositionEndpoint"]
|
|
31
9
|
):
|
|
32
|
-
|
|
10
|
+
order_line_item: ForeignRelation["OrderLineItem"]
|
|
11
|
+
refund: ForeignRelation["OrderTransactionCaptureRefund"]
|
|
33
12
|
|
|
34
13
|
|
|
35
|
-
class OrderTransactionCaptureRefundPositionEndpoint(
|
|
14
|
+
class OrderTransactionCaptureRefundPositionEndpoint(AdminEndpoint[OrderTransactionCaptureRefundPosition]):
|
|
36
15
|
name = "order_transaction_capture_refund_position"
|
|
37
16
|
path = "/order-transaction-capture-refund-position"
|
|
38
17
|
model_class = OrderTransactionCaptureRefundPosition
|
|
@@ -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
|