convexity-api-client 0.21.0.dev332__py3-none-any.whl → 0.21.0.dev336__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.
- convexity_api_client/api/v1/crm_create_sales_rep.py +186 -0
- convexity_api_client/api/v1/crm_delete_sales_rep.py +182 -0
- convexity_api_client/api/v1/crm_get_sales_rep.py +182 -0
- convexity_api_client/api/v1/crm_list_sales_reps.py +236 -0
- convexity_api_client/api/v1/crm_update_sales_rep.py +202 -0
- convexity_api_client/api/v1/inventory_assign_item_warehouse_location.py +206 -0
- convexity_api_client/api/v1/inventory_create_cost_list_vendor_assignment.py +202 -0
- convexity_api_client/api/v1/inventory_create_price_list_channel_assignment.py +202 -0
- convexity_api_client/api/v1/inventory_create_price_list_customer_assignment.py +202 -0
- convexity_api_client/api/v1/inventory_delete_cost_list_vendor_assignment.py +196 -0
- convexity_api_client/api/v1/inventory_delete_price_list_channel_assignment.py +196 -0
- convexity_api_client/api/v1/inventory_delete_price_list_customer_assignment.py +196 -0
- convexity_api_client/api/v1/inventory_list_cost_list_vendor_assignments.py +202 -0
- convexity_api_client/api/v1/inventory_list_item_cost_list_entries.py +182 -0
- convexity_api_client/api/v1/inventory_list_item_price_list_entries.py +182 -0
- convexity_api_client/api/v1/inventory_list_item_warehouse_locations.py +212 -0
- convexity_api_client/api/v1/inventory_list_price_list_channel_assignments.py +202 -0
- convexity_api_client/api/v1/inventory_list_price_list_customer_assignments.py +202 -0
- convexity_api_client/api/v1/inventory_list_warehouse_location_items.py +226 -0
- convexity_api_client/api/v1/inventory_update_cost_list_vendor_assignment.py +216 -0
- convexity_api_client/api/v1/inventory_update_price_list_channel_assignment.py +216 -0
- convexity_api_client/api/v1/inventory_update_price_list_customer_assignment.py +216 -0
- convexity_api_client/api/v1/purchasing_create_item_sourcing.py +190 -0
- convexity_api_client/api/v1/purchasing_deactivate_item_sourcing.py +182 -0
- convexity_api_client/api/v1/purchasing_get_item_sourcing_options.py +166 -0
- convexity_api_client/api/v1/purchasing_list_item_sourcing.py +382 -0
- convexity_api_client/api/v1/purchasing_update_item_sourcing.py +202 -0
- convexity_api_client/api/v1/purchasing_upsert_item_sourcing_cost.py +206 -0
- convexity_api_client/api/v1/sales_list_orders.py +20 -0
- convexity_api_client/api/v1/warehouse_workflow_cancel_pick_pack_ship.py +182 -0
- convexity_api_client/api/v1/warehouse_workflow_complete_pick_pack_ship_pack.py +202 -0
- convexity_api_client/api/v1/warehouse_workflow_complete_pick_pack_ship_pick.py +202 -0
- convexity_api_client/api/v1/warehouse_workflow_create_pick_pack_ship.py +186 -0
- convexity_api_client/api/v1/warehouse_workflow_generate_pick_pack_ship_pdf.py +188 -0
- convexity_api_client/api/v1/warehouse_workflow_get_pick_pack_ship.py +182 -0
- convexity_api_client/api/v1/warehouse_workflow_mark_pick_pack_ship_shipped.py +202 -0
- convexity_api_client/api/v1/warehouse_workflow_save_pick_pack_ship_shipment.py +202 -0
- convexity_api_client/models/__init__.py +134 -0
- convexity_api_client/models/adjust_stock_request.py +20 -8
- convexity_api_client/models/assign_inventory_item_location_request.py +108 -0
- convexity_api_client/models/assign_inventory_item_location_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/bulk_upsert_customer_payload.py +20 -0
- convexity_api_client/models/bulk_upsert_sales_order_payload.py +40 -0
- convexity_api_client/models/complete_pick_pack_ship_pack_request.py +75 -0
- convexity_api_client/models/complete_pick_pack_ship_request.py +97 -0
- convexity_api_client/models/cost_list_entry_response.py +77 -0
- convexity_api_client/models/cost_list_vendor_assignment_response.py +149 -0
- convexity_api_client/models/cost_list_vendor_assignment_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/cost_rule.py +53 -0
- convexity_api_client/models/cost_rule_response.py +22 -0
- convexity_api_client/models/cost_source_type.py +9 -0
- convexity_api_client/models/create_cost_list_request.py +4 -5
- convexity_api_client/models/create_cost_list_vendor_assignment_request.py +116 -0
- convexity_api_client/models/create_cost_list_vendor_assignment_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/create_customer_request.py +20 -0
- convexity_api_client/models/create_item_sourcing_request.py +256 -0
- convexity_api_client/models/create_item_sourcing_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/create_pick_pack_ship_request.py +153 -0
- convexity_api_client/models/create_price_list_channel_assignment_request.py +116 -0
- convexity_api_client/models/create_price_list_channel_assignment_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/create_price_list_customer_assignment_request.py +116 -0
- convexity_api_client/models/create_price_list_customer_assignment_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/create_price_list_request.py +4 -5
- convexity_api_client/models/create_sales_order_line_request.py +40 -8
- convexity_api_client/models/create_sales_order_request.py +40 -0
- convexity_api_client/models/create_sales_rep_request.py +181 -0
- convexity_api_client/models/create_sales_rep_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/customer.py +53 -0
- convexity_api_client/models/customer_response.py +14 -0
- convexity_api_client/models/inventory_config.py +53 -0
- convexity_api_client/models/inventory_config_response.py +28 -0
- convexity_api_client/models/inventory_item.py +43 -0
- convexity_api_client/models/inventory_item_location.py +237 -0
- convexity_api_client/models/inventory_item_location_assignment_response.py +150 -0
- convexity_api_client/models/inventory_item_location_assignment_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/inventory_item_type.py +0 -1
- convexity_api_client/models/item_sourcing.py +41 -0
- convexity_api_client/models/item_sourcing_item_option.py +107 -0
- convexity_api_client/models/item_sourcing_options_response.py +120 -0
- convexity_api_client/models/item_sourcing_response.py +360 -0
- convexity_api_client/models/item_sourcing_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/item_sourcing_uom_option.py +77 -0
- convexity_api_client/models/item_sourcing_vendor_option.py +77 -0
- convexity_api_client/models/item_warehouse_location_response.py +248 -0
- convexity_api_client/models/list_cost_list_entries_response.py +83 -0
- convexity_api_client/models/list_cost_list_vendor_assignments_response.py +83 -0
- convexity_api_client/models/list_item_sourcing_response.py +83 -0
- convexity_api_client/models/list_item_warehouse_locations_response.py +83 -0
- convexity_api_client/models/list_price_list_channel_assignments_response.py +83 -0
- convexity_api_client/models/list_price_list_customer_assignments_response.py +83 -0
- convexity_api_client/models/list_price_list_entries_response.py +83 -0
- convexity_api_client/models/list_sales_reps_response.py +83 -0
- convexity_api_client/models/list_warehouse_location_items_response.py +83 -0
- convexity_api_client/models/mark_pick_pack_ship_shipped_request.py +84 -0
- convexity_api_client/models/pick_pack_ship_line_request.py +100 -0
- convexity_api_client/models/pick_pack_ship_packed_line_request.py +111 -0
- convexity_api_client/models/pick_pack_ship_picked_line_request.py +91 -0
- convexity_api_client/models/pick_pack_ship_response.py +111 -0
- convexity_api_client/models/price_list.py +41 -0
- convexity_api_client/models/price_list_channel_assignment_response.py +149 -0
- convexity_api_client/models/price_list_channel_assignment_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/price_list_customer_assignment_response.py +149 -0
- convexity_api_client/models/price_list_customer_assignment_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/price_list_entry_response.py +77 -0
- convexity_api_client/models/price_source_type.py +9 -0
- convexity_api_client/models/project.py +43 -0
- convexity_api_client/models/purchase_order_line.py +101 -0
- convexity_api_client/models/purchase_order_line_request.py +20 -8
- convexity_api_client/models/purchase_order_line_response.py +103 -0
- convexity_api_client/models/purchasing_list_item_sourcing_filter_operator_type_0.py +19 -0
- convexity_api_client/models/purchasing_list_item_sourcing_sort_direction_type_0.py +9 -0
- convexity_api_client/models/resolve_cost_response.py +22 -0
- convexity_api_client/models/resolve_price_response.py +20 -0
- convexity_api_client/models/sales_invoice_line.py +121 -0
- convexity_api_client/models/sales_invoice_line_request.py +40 -8
- convexity_api_client/models/sales_invoice_line_response.py +121 -0
- convexity_api_client/models/sales_order.py +73 -0
- convexity_api_client/models/sales_order_line.py +121 -0
- convexity_api_client/models/sales_order_line_response.py +123 -0
- convexity_api_client/models/sales_order_response.py +28 -0
- convexity_api_client/models/sales_rep.py +279 -0
- convexity_api_client/models/sales_rep_response.py +185 -0
- convexity_api_client/models/sales_rep_response_ext_data_type_0.py +47 -0
- convexity_api_client/models/save_pick_pack_ship_shipment_request.py +163 -0
- convexity_api_client/models/stock_balance.py +20 -8
- convexity_api_client/models/update_customer_request.py +20 -0
- convexity_api_client/models/update_item_sourcing_request.py +312 -0
- convexity_api_client/models/update_item_sourcing_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/update_list_assignment_request.py +111 -0
- convexity_api_client/models/update_list_assignment_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/update_sales_order_request.py +40 -0
- convexity_api_client/models/update_sales_rep_request.py +211 -0
- convexity_api_client/models/update_sales_rep_request_ext_data_type_0.py +47 -0
- convexity_api_client/models/upsert_inventory_config_request.py +40 -0
- convexity_api_client/models/upsert_item_sourcing_cost_request.py +62 -0
- convexity_api_client/models/warehouse_location.py +43 -0
- convexity_api_client/models/warehouse_location_item_response.py +160 -0
- {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/METADATA +1 -1
- {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/RECORD +140 -41
- {convexity_api_client-0.21.0.dev332.dist-info → convexity_api_client-0.21.0.dev336.dist-info}/WHEEL +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PickPackShipPickedLineRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PickPackShipPickedLineRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
pick_ticket_line_id (str):
|
|
19
|
+
picked_quantity (float):
|
|
20
|
+
picked_stock_quantity (float | None | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
pick_ticket_line_id: str
|
|
24
|
+
picked_quantity: float
|
|
25
|
+
picked_stock_quantity: float | None | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
pick_ticket_line_id = self.pick_ticket_line_id
|
|
30
|
+
|
|
31
|
+
picked_quantity = self.picked_quantity
|
|
32
|
+
|
|
33
|
+
picked_stock_quantity: float | None | Unset
|
|
34
|
+
if isinstance(self.picked_stock_quantity, Unset):
|
|
35
|
+
picked_stock_quantity = UNSET
|
|
36
|
+
else:
|
|
37
|
+
picked_stock_quantity = self.picked_stock_quantity
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"pick_ticket_line_id": pick_ticket_line_id,
|
|
44
|
+
"picked_quantity": picked_quantity,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
if picked_stock_quantity is not UNSET:
|
|
48
|
+
field_dict["picked_stock_quantity"] = picked_stock_quantity
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
pick_ticket_line_id = d.pop("pick_ticket_line_id")
|
|
56
|
+
|
|
57
|
+
picked_quantity = d.pop("picked_quantity")
|
|
58
|
+
|
|
59
|
+
def _parse_picked_stock_quantity(data: object) -> float | None | Unset:
|
|
60
|
+
if data is None:
|
|
61
|
+
return data
|
|
62
|
+
if isinstance(data, Unset):
|
|
63
|
+
return data
|
|
64
|
+
return cast(float | None | Unset, data)
|
|
65
|
+
|
|
66
|
+
picked_stock_quantity = _parse_picked_stock_quantity(d.pop("picked_stock_quantity", UNSET))
|
|
67
|
+
|
|
68
|
+
pick_pack_ship_picked_line_request = cls(
|
|
69
|
+
pick_ticket_line_id=pick_ticket_line_id,
|
|
70
|
+
picked_quantity=picked_quantity,
|
|
71
|
+
picked_stock_quantity=picked_stock_quantity,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
pick_pack_ship_picked_line_request.additional_properties = d
|
|
75
|
+
return pick_pack_ship_picked_line_request
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def additional_keys(self) -> list[str]:
|
|
79
|
+
return list(self.additional_properties.keys())
|
|
80
|
+
|
|
81
|
+
def __getitem__(self, key: str) -> Any:
|
|
82
|
+
return self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
85
|
+
self.additional_properties[key] = value
|
|
86
|
+
|
|
87
|
+
def __delitem__(self, key: str) -> None:
|
|
88
|
+
del self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __contains__(self, key: str) -> bool:
|
|
91
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.packing_slip_response import PackingSlipResponse
|
|
13
|
+
from ..models.pick_ticket_response import PickTicketResponse
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="PickPackShipResponse")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class PickPackShipResponse:
|
|
21
|
+
"""Composite read model whose durable identity is ``packing_slip_id``.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
packing_slip (PackingSlipResponse):
|
|
25
|
+
pick_ticket (PickTicketResponse):
|
|
26
|
+
shipment_id (None | str | Unset):
|
|
27
|
+
allowed_actions (list[str] | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
packing_slip: PackingSlipResponse
|
|
31
|
+
pick_ticket: PickTicketResponse
|
|
32
|
+
shipment_id: None | str | Unset = UNSET
|
|
33
|
+
allowed_actions: list[str] | Unset = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
packing_slip = self.packing_slip.to_dict()
|
|
38
|
+
|
|
39
|
+
pick_ticket = self.pick_ticket.to_dict()
|
|
40
|
+
|
|
41
|
+
shipment_id: None | str | Unset
|
|
42
|
+
if isinstance(self.shipment_id, Unset):
|
|
43
|
+
shipment_id = UNSET
|
|
44
|
+
else:
|
|
45
|
+
shipment_id = self.shipment_id
|
|
46
|
+
|
|
47
|
+
allowed_actions: list[str] | Unset = UNSET
|
|
48
|
+
if not isinstance(self.allowed_actions, Unset):
|
|
49
|
+
allowed_actions = self.allowed_actions
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update(
|
|
54
|
+
{
|
|
55
|
+
"packing_slip": packing_slip,
|
|
56
|
+
"pick_ticket": pick_ticket,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
if shipment_id is not UNSET:
|
|
60
|
+
field_dict["shipment_id"] = shipment_id
|
|
61
|
+
if allowed_actions is not UNSET:
|
|
62
|
+
field_dict["allowed_actions"] = allowed_actions
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
from ..models.packing_slip_response import PackingSlipResponse
|
|
69
|
+
from ..models.pick_ticket_response import PickTicketResponse
|
|
70
|
+
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
packing_slip = PackingSlipResponse.from_dict(d.pop("packing_slip"))
|
|
73
|
+
|
|
74
|
+
pick_ticket = PickTicketResponse.from_dict(d.pop("pick_ticket"))
|
|
75
|
+
|
|
76
|
+
def _parse_shipment_id(data: object) -> None | str | Unset:
|
|
77
|
+
if data is None:
|
|
78
|
+
return data
|
|
79
|
+
if isinstance(data, Unset):
|
|
80
|
+
return data
|
|
81
|
+
return cast(None | str | Unset, data)
|
|
82
|
+
|
|
83
|
+
shipment_id = _parse_shipment_id(d.pop("shipment_id", UNSET))
|
|
84
|
+
|
|
85
|
+
allowed_actions = cast(list[str], d.pop("allowed_actions", UNSET))
|
|
86
|
+
|
|
87
|
+
pick_pack_ship_response = cls(
|
|
88
|
+
packing_slip=packing_slip,
|
|
89
|
+
pick_ticket=pick_ticket,
|
|
90
|
+
shipment_id=shipment_id,
|
|
91
|
+
allowed_actions=allowed_actions,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
pick_pack_ship_response.additional_properties = d
|
|
95
|
+
return pick_pack_ship_response
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def additional_keys(self) -> list[str]:
|
|
99
|
+
return list(self.additional_properties.keys())
|
|
100
|
+
|
|
101
|
+
def __getitem__(self, key: str) -> Any:
|
|
102
|
+
return self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
105
|
+
self.additional_properties[key] = value
|
|
106
|
+
|
|
107
|
+
def __delitem__(self, key: str) -> None:
|
|
108
|
+
del self.additional_properties[key]
|
|
109
|
+
|
|
110
|
+
def __contains__(self, key: str) -> bool:
|
|
111
|
+
return key in self.additional_properties
|
|
@@ -10,6 +10,7 @@ from attrs import field as _attrs_field
|
|
|
10
10
|
from ..types import UNSET, Unset
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
|
+
from ..models.inventory_config import InventoryConfig
|
|
13
14
|
from ..models.price_rule import PriceRule
|
|
14
15
|
from ..models.project import Project
|
|
15
16
|
|
|
@@ -32,6 +33,7 @@ class PriceList:
|
|
|
32
33
|
ext_data (None | str | Unset):
|
|
33
34
|
project (None | Project | Unset):
|
|
34
35
|
rules (list[PriceRule] | None | Unset):
|
|
36
|
+
default_for_config (list[InventoryConfig] | None | Unset):
|
|
35
37
|
"""
|
|
36
38
|
|
|
37
39
|
id: str
|
|
@@ -44,6 +46,7 @@ class PriceList:
|
|
|
44
46
|
ext_data: None | str | Unset = UNSET
|
|
45
47
|
project: None | Project | Unset = UNSET
|
|
46
48
|
rules: list[PriceRule] | None | Unset = UNSET
|
|
49
|
+
default_for_config: list[InventoryConfig] | None | Unset = UNSET
|
|
47
50
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
51
|
|
|
49
52
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -89,6 +92,18 @@ class PriceList:
|
|
|
89
92
|
else:
|
|
90
93
|
rules = self.rules
|
|
91
94
|
|
|
95
|
+
default_for_config: list[dict[str, Any]] | None | Unset
|
|
96
|
+
if isinstance(self.default_for_config, Unset):
|
|
97
|
+
default_for_config = UNSET
|
|
98
|
+
elif isinstance(self.default_for_config, list):
|
|
99
|
+
default_for_config = []
|
|
100
|
+
for default_for_config_type_0_item_data in self.default_for_config:
|
|
101
|
+
default_for_config_type_0_item = default_for_config_type_0_item_data.to_dict()
|
|
102
|
+
default_for_config.append(default_for_config_type_0_item)
|
|
103
|
+
|
|
104
|
+
else:
|
|
105
|
+
default_for_config = self.default_for_config
|
|
106
|
+
|
|
92
107
|
field_dict: dict[str, Any] = {}
|
|
93
108
|
field_dict.update(self.additional_properties)
|
|
94
109
|
field_dict.update(
|
|
@@ -108,11 +123,14 @@ class PriceList:
|
|
|
108
123
|
field_dict["project"] = project
|
|
109
124
|
if rules is not UNSET:
|
|
110
125
|
field_dict["rules"] = rules
|
|
126
|
+
if default_for_config is not UNSET:
|
|
127
|
+
field_dict["default_for_config"] = default_for_config
|
|
111
128
|
|
|
112
129
|
return field_dict
|
|
113
130
|
|
|
114
131
|
@classmethod
|
|
115
132
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
133
|
+
from ..models.inventory_config import InventoryConfig
|
|
116
134
|
from ..models.price_rule import PriceRule
|
|
117
135
|
from ..models.project import Project
|
|
118
136
|
|
|
@@ -179,6 +197,28 @@ class PriceList:
|
|
|
179
197
|
|
|
180
198
|
rules = _parse_rules(d.pop("rules", UNSET))
|
|
181
199
|
|
|
200
|
+
def _parse_default_for_config(data: object) -> list[InventoryConfig] | None | Unset:
|
|
201
|
+
if data is None:
|
|
202
|
+
return data
|
|
203
|
+
if isinstance(data, Unset):
|
|
204
|
+
return data
|
|
205
|
+
try:
|
|
206
|
+
if not isinstance(data, list):
|
|
207
|
+
raise TypeError()
|
|
208
|
+
default_for_config_type_0 = []
|
|
209
|
+
_default_for_config_type_0 = data
|
|
210
|
+
for default_for_config_type_0_item_data in _default_for_config_type_0:
|
|
211
|
+
default_for_config_type_0_item = InventoryConfig.from_dict(default_for_config_type_0_item_data)
|
|
212
|
+
|
|
213
|
+
default_for_config_type_0.append(default_for_config_type_0_item)
|
|
214
|
+
|
|
215
|
+
return default_for_config_type_0
|
|
216
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
217
|
+
pass
|
|
218
|
+
return cast(list[InventoryConfig] | None | Unset, data)
|
|
219
|
+
|
|
220
|
+
default_for_config = _parse_default_for_config(d.pop("default_for_config", UNSET))
|
|
221
|
+
|
|
182
222
|
price_list = cls(
|
|
183
223
|
id=id,
|
|
184
224
|
project_id=project_id,
|
|
@@ -190,6 +230,7 @@ class PriceList:
|
|
|
190
230
|
ext_data=ext_data,
|
|
191
231
|
project=project,
|
|
192
232
|
rules=rules,
|
|
233
|
+
default_for_config=default_for_config,
|
|
193
234
|
)
|
|
194
235
|
|
|
195
236
|
price_list.additional_properties = d
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.price_list_channel_assignment_response_ext_data_type_0 import (
|
|
12
|
+
PriceListChannelAssignmentResponseExtDataType0,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="PriceListChannelAssignmentResponse")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class PriceListChannelAssignmentResponse:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
id (str):
|
|
24
|
+
project_id (str):
|
|
25
|
+
price_list_id (str):
|
|
26
|
+
sales_channel_id (str):
|
|
27
|
+
is_active (bool):
|
|
28
|
+
ext_data (None | PriceListChannelAssignmentResponseExtDataType0):
|
|
29
|
+
created_at (datetime.datetime):
|
|
30
|
+
updated_at (datetime.datetime):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
id: str
|
|
34
|
+
project_id: str
|
|
35
|
+
price_list_id: str
|
|
36
|
+
sales_channel_id: str
|
|
37
|
+
is_active: bool
|
|
38
|
+
ext_data: None | PriceListChannelAssignmentResponseExtDataType0
|
|
39
|
+
created_at: datetime.datetime
|
|
40
|
+
updated_at: datetime.datetime
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
from ..models.price_list_channel_assignment_response_ext_data_type_0 import (
|
|
45
|
+
PriceListChannelAssignmentResponseExtDataType0,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
id = self.id
|
|
49
|
+
|
|
50
|
+
project_id = self.project_id
|
|
51
|
+
|
|
52
|
+
price_list_id = self.price_list_id
|
|
53
|
+
|
|
54
|
+
sales_channel_id = self.sales_channel_id
|
|
55
|
+
|
|
56
|
+
is_active = self.is_active
|
|
57
|
+
|
|
58
|
+
ext_data: dict[str, Any] | None
|
|
59
|
+
if isinstance(self.ext_data, PriceListChannelAssignmentResponseExtDataType0):
|
|
60
|
+
ext_data = self.ext_data.to_dict()
|
|
61
|
+
else:
|
|
62
|
+
ext_data = self.ext_data
|
|
63
|
+
|
|
64
|
+
created_at = self.created_at.isoformat()
|
|
65
|
+
|
|
66
|
+
updated_at = self.updated_at.isoformat()
|
|
67
|
+
|
|
68
|
+
field_dict: dict[str, Any] = {}
|
|
69
|
+
field_dict.update(self.additional_properties)
|
|
70
|
+
field_dict.update(
|
|
71
|
+
{
|
|
72
|
+
"id": id,
|
|
73
|
+
"project_id": project_id,
|
|
74
|
+
"price_list_id": price_list_id,
|
|
75
|
+
"sales_channel_id": sales_channel_id,
|
|
76
|
+
"is_active": is_active,
|
|
77
|
+
"ext_data": ext_data,
|
|
78
|
+
"created_at": created_at,
|
|
79
|
+
"updated_at": updated_at,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return field_dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
87
|
+
from ..models.price_list_channel_assignment_response_ext_data_type_0 import (
|
|
88
|
+
PriceListChannelAssignmentResponseExtDataType0,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
d = dict(src_dict)
|
|
92
|
+
id = d.pop("id")
|
|
93
|
+
|
|
94
|
+
project_id = d.pop("project_id")
|
|
95
|
+
|
|
96
|
+
price_list_id = d.pop("price_list_id")
|
|
97
|
+
|
|
98
|
+
sales_channel_id = d.pop("sales_channel_id")
|
|
99
|
+
|
|
100
|
+
is_active = d.pop("is_active")
|
|
101
|
+
|
|
102
|
+
def _parse_ext_data(data: object) -> None | PriceListChannelAssignmentResponseExtDataType0:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
try:
|
|
106
|
+
if not isinstance(data, dict):
|
|
107
|
+
raise TypeError()
|
|
108
|
+
ext_data_type_0 = PriceListChannelAssignmentResponseExtDataType0.from_dict(data)
|
|
109
|
+
|
|
110
|
+
return ext_data_type_0
|
|
111
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
112
|
+
pass
|
|
113
|
+
return cast(None | PriceListChannelAssignmentResponseExtDataType0, data)
|
|
114
|
+
|
|
115
|
+
ext_data = _parse_ext_data(d.pop("ext_data"))
|
|
116
|
+
|
|
117
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
118
|
+
|
|
119
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
120
|
+
|
|
121
|
+
price_list_channel_assignment_response = cls(
|
|
122
|
+
id=id,
|
|
123
|
+
project_id=project_id,
|
|
124
|
+
price_list_id=price_list_id,
|
|
125
|
+
sales_channel_id=sales_channel_id,
|
|
126
|
+
is_active=is_active,
|
|
127
|
+
ext_data=ext_data,
|
|
128
|
+
created_at=created_at,
|
|
129
|
+
updated_at=updated_at,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
price_list_channel_assignment_response.additional_properties = d
|
|
133
|
+
return price_list_channel_assignment_response
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def additional_keys(self) -> list[str]:
|
|
137
|
+
return list(self.additional_properties.keys())
|
|
138
|
+
|
|
139
|
+
def __getitem__(self, key: str) -> Any:
|
|
140
|
+
return self.additional_properties[key]
|
|
141
|
+
|
|
142
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
143
|
+
self.additional_properties[key] = value
|
|
144
|
+
|
|
145
|
+
def __delitem__(self, key: str) -> None:
|
|
146
|
+
del self.additional_properties[key]
|
|
147
|
+
|
|
148
|
+
def __contains__(self, key: str) -> bool:
|
|
149
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PriceListChannelAssignmentResponseExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PriceListChannelAssignmentResponseExtDataType0:
|
|
14
|
+
""" """
|
|
15
|
+
|
|
16
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
field_dict: dict[str, Any] = {}
|
|
21
|
+
field_dict.update(self.additional_properties)
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
price_list_channel_assignment_response_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
price_list_channel_assignment_response_ext_data_type_0.additional_properties = d
|
|
31
|
+
return price_list_channel_assignment_response_ext_data_type_0
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def additional_keys(self) -> list[str]:
|
|
35
|
+
return list(self.additional_properties.keys())
|
|
36
|
+
|
|
37
|
+
def __getitem__(self, key: str) -> Any:
|
|
38
|
+
return self.additional_properties[key]
|
|
39
|
+
|
|
40
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
41
|
+
self.additional_properties[key] = value
|
|
42
|
+
|
|
43
|
+
def __delitem__(self, key: str) -> None:
|
|
44
|
+
del self.additional_properties[key]
|
|
45
|
+
|
|
46
|
+
def __contains__(self, key: str) -> bool:
|
|
47
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.price_list_customer_assignment_response_ext_data_type_0 import (
|
|
12
|
+
PriceListCustomerAssignmentResponseExtDataType0,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="PriceListCustomerAssignmentResponse")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class PriceListCustomerAssignmentResponse:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
id (str):
|
|
24
|
+
project_id (str):
|
|
25
|
+
price_list_id (str):
|
|
26
|
+
customer_id (str):
|
|
27
|
+
is_active (bool):
|
|
28
|
+
ext_data (None | PriceListCustomerAssignmentResponseExtDataType0):
|
|
29
|
+
created_at (datetime.datetime):
|
|
30
|
+
updated_at (datetime.datetime):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
id: str
|
|
34
|
+
project_id: str
|
|
35
|
+
price_list_id: str
|
|
36
|
+
customer_id: str
|
|
37
|
+
is_active: bool
|
|
38
|
+
ext_data: None | PriceListCustomerAssignmentResponseExtDataType0
|
|
39
|
+
created_at: datetime.datetime
|
|
40
|
+
updated_at: datetime.datetime
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
from ..models.price_list_customer_assignment_response_ext_data_type_0 import (
|
|
45
|
+
PriceListCustomerAssignmentResponseExtDataType0,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
id = self.id
|
|
49
|
+
|
|
50
|
+
project_id = self.project_id
|
|
51
|
+
|
|
52
|
+
price_list_id = self.price_list_id
|
|
53
|
+
|
|
54
|
+
customer_id = self.customer_id
|
|
55
|
+
|
|
56
|
+
is_active = self.is_active
|
|
57
|
+
|
|
58
|
+
ext_data: dict[str, Any] | None
|
|
59
|
+
if isinstance(self.ext_data, PriceListCustomerAssignmentResponseExtDataType0):
|
|
60
|
+
ext_data = self.ext_data.to_dict()
|
|
61
|
+
else:
|
|
62
|
+
ext_data = self.ext_data
|
|
63
|
+
|
|
64
|
+
created_at = self.created_at.isoformat()
|
|
65
|
+
|
|
66
|
+
updated_at = self.updated_at.isoformat()
|
|
67
|
+
|
|
68
|
+
field_dict: dict[str, Any] = {}
|
|
69
|
+
field_dict.update(self.additional_properties)
|
|
70
|
+
field_dict.update(
|
|
71
|
+
{
|
|
72
|
+
"id": id,
|
|
73
|
+
"project_id": project_id,
|
|
74
|
+
"price_list_id": price_list_id,
|
|
75
|
+
"customer_id": customer_id,
|
|
76
|
+
"is_active": is_active,
|
|
77
|
+
"ext_data": ext_data,
|
|
78
|
+
"created_at": created_at,
|
|
79
|
+
"updated_at": updated_at,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return field_dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
87
|
+
from ..models.price_list_customer_assignment_response_ext_data_type_0 import (
|
|
88
|
+
PriceListCustomerAssignmentResponseExtDataType0,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
d = dict(src_dict)
|
|
92
|
+
id = d.pop("id")
|
|
93
|
+
|
|
94
|
+
project_id = d.pop("project_id")
|
|
95
|
+
|
|
96
|
+
price_list_id = d.pop("price_list_id")
|
|
97
|
+
|
|
98
|
+
customer_id = d.pop("customer_id")
|
|
99
|
+
|
|
100
|
+
is_active = d.pop("is_active")
|
|
101
|
+
|
|
102
|
+
def _parse_ext_data(data: object) -> None | PriceListCustomerAssignmentResponseExtDataType0:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
try:
|
|
106
|
+
if not isinstance(data, dict):
|
|
107
|
+
raise TypeError()
|
|
108
|
+
ext_data_type_0 = PriceListCustomerAssignmentResponseExtDataType0.from_dict(data)
|
|
109
|
+
|
|
110
|
+
return ext_data_type_0
|
|
111
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
112
|
+
pass
|
|
113
|
+
return cast(None | PriceListCustomerAssignmentResponseExtDataType0, data)
|
|
114
|
+
|
|
115
|
+
ext_data = _parse_ext_data(d.pop("ext_data"))
|
|
116
|
+
|
|
117
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
118
|
+
|
|
119
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
120
|
+
|
|
121
|
+
price_list_customer_assignment_response = cls(
|
|
122
|
+
id=id,
|
|
123
|
+
project_id=project_id,
|
|
124
|
+
price_list_id=price_list_id,
|
|
125
|
+
customer_id=customer_id,
|
|
126
|
+
is_active=is_active,
|
|
127
|
+
ext_data=ext_data,
|
|
128
|
+
created_at=created_at,
|
|
129
|
+
updated_at=updated_at,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
price_list_customer_assignment_response.additional_properties = d
|
|
133
|
+
return price_list_customer_assignment_response
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def additional_keys(self) -> list[str]:
|
|
137
|
+
return list(self.additional_properties.keys())
|
|
138
|
+
|
|
139
|
+
def __getitem__(self, key: str) -> Any:
|
|
140
|
+
return self.additional_properties[key]
|
|
141
|
+
|
|
142
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
143
|
+
self.additional_properties[key] = value
|
|
144
|
+
|
|
145
|
+
def __delitem__(self, key: str) -> None:
|
|
146
|
+
del self.additional_properties[key]
|
|
147
|
+
|
|
148
|
+
def __contains__(self, key: str) -> bool:
|
|
149
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PriceListCustomerAssignmentResponseExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PriceListCustomerAssignmentResponseExtDataType0:
|
|
14
|
+
""" """
|
|
15
|
+
|
|
16
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
field_dict: dict[str, Any] = {}
|
|
21
|
+
field_dict.update(self.additional_properties)
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
price_list_customer_assignment_response_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
price_list_customer_assignment_response_ext_data_type_0.additional_properties = d
|
|
31
|
+
return price_list_customer_assignment_response_ext_data_type_0
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def additional_keys(self) -> list[str]:
|
|
35
|
+
return list(self.additional_properties.keys())
|
|
36
|
+
|
|
37
|
+
def __getitem__(self, key: str) -> Any:
|
|
38
|
+
return self.additional_properties[key]
|
|
39
|
+
|
|
40
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
41
|
+
self.additional_properties[key] = value
|
|
42
|
+
|
|
43
|
+
def __delitem__(self, key: str) -> None:
|
|
44
|
+
del self.additional_properties[key]
|
|
45
|
+
|
|
46
|
+
def __contains__(self, key: str) -> bool:
|
|
47
|
+
return key in self.additional_properties
|