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,237 @@
|
|
|
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
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.inventory_item import InventoryItem
|
|
14
|
+
from ..models.project import Project
|
|
15
|
+
from ..models.warehouse_location import WarehouseLocation
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="InventoryItemLocation")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class InventoryItemLocation:
|
|
23
|
+
"""Represents a InventoryItemLocation record
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
id (str):
|
|
27
|
+
project_id (str):
|
|
28
|
+
inventory_item_id (str):
|
|
29
|
+
warehouse_location_id (str):
|
|
30
|
+
is_active (bool):
|
|
31
|
+
created_at (datetime.datetime):
|
|
32
|
+
updated_at (datetime.datetime):
|
|
33
|
+
ext_data (None | str | Unset):
|
|
34
|
+
project (None | Project | Unset):
|
|
35
|
+
inventory_item (InventoryItem | None | Unset):
|
|
36
|
+
warehouse_location (None | Unset | WarehouseLocation):
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
id: str
|
|
40
|
+
project_id: str
|
|
41
|
+
inventory_item_id: str
|
|
42
|
+
warehouse_location_id: str
|
|
43
|
+
is_active: bool
|
|
44
|
+
created_at: datetime.datetime
|
|
45
|
+
updated_at: datetime.datetime
|
|
46
|
+
ext_data: None | str | Unset = UNSET
|
|
47
|
+
project: None | Project | Unset = UNSET
|
|
48
|
+
inventory_item: InventoryItem | None | Unset = UNSET
|
|
49
|
+
warehouse_location: None | Unset | WarehouseLocation = UNSET
|
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
|
53
|
+
from ..models.inventory_item import InventoryItem
|
|
54
|
+
from ..models.project import Project
|
|
55
|
+
from ..models.warehouse_location import WarehouseLocation
|
|
56
|
+
|
|
57
|
+
id = self.id
|
|
58
|
+
|
|
59
|
+
project_id = self.project_id
|
|
60
|
+
|
|
61
|
+
inventory_item_id = self.inventory_item_id
|
|
62
|
+
|
|
63
|
+
warehouse_location_id = self.warehouse_location_id
|
|
64
|
+
|
|
65
|
+
is_active = self.is_active
|
|
66
|
+
|
|
67
|
+
created_at = self.created_at.isoformat()
|
|
68
|
+
|
|
69
|
+
updated_at = self.updated_at.isoformat()
|
|
70
|
+
|
|
71
|
+
ext_data: None | str | Unset
|
|
72
|
+
if isinstance(self.ext_data, Unset):
|
|
73
|
+
ext_data = UNSET
|
|
74
|
+
else:
|
|
75
|
+
ext_data = self.ext_data
|
|
76
|
+
|
|
77
|
+
project: dict[str, Any] | None | Unset
|
|
78
|
+
if isinstance(self.project, Unset):
|
|
79
|
+
project = UNSET
|
|
80
|
+
elif isinstance(self.project, Project):
|
|
81
|
+
project = self.project.to_dict()
|
|
82
|
+
else:
|
|
83
|
+
project = self.project
|
|
84
|
+
|
|
85
|
+
inventory_item: dict[str, Any] | None | Unset
|
|
86
|
+
if isinstance(self.inventory_item, Unset):
|
|
87
|
+
inventory_item = UNSET
|
|
88
|
+
elif isinstance(self.inventory_item, InventoryItem):
|
|
89
|
+
inventory_item = self.inventory_item.to_dict()
|
|
90
|
+
else:
|
|
91
|
+
inventory_item = self.inventory_item
|
|
92
|
+
|
|
93
|
+
warehouse_location: dict[str, Any] | None | Unset
|
|
94
|
+
if isinstance(self.warehouse_location, Unset):
|
|
95
|
+
warehouse_location = UNSET
|
|
96
|
+
elif isinstance(self.warehouse_location, WarehouseLocation):
|
|
97
|
+
warehouse_location = self.warehouse_location.to_dict()
|
|
98
|
+
else:
|
|
99
|
+
warehouse_location = self.warehouse_location
|
|
100
|
+
|
|
101
|
+
field_dict: dict[str, Any] = {}
|
|
102
|
+
field_dict.update(self.additional_properties)
|
|
103
|
+
field_dict.update(
|
|
104
|
+
{
|
|
105
|
+
"id": id,
|
|
106
|
+
"project_id": project_id,
|
|
107
|
+
"inventory_item_id": inventory_item_id,
|
|
108
|
+
"warehouse_location_id": warehouse_location_id,
|
|
109
|
+
"is_active": is_active,
|
|
110
|
+
"created_at": created_at,
|
|
111
|
+
"updated_at": updated_at,
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
if ext_data is not UNSET:
|
|
115
|
+
field_dict["ext_data"] = ext_data
|
|
116
|
+
if project is not UNSET:
|
|
117
|
+
field_dict["project"] = project
|
|
118
|
+
if inventory_item is not UNSET:
|
|
119
|
+
field_dict["inventory_item"] = inventory_item
|
|
120
|
+
if warehouse_location is not UNSET:
|
|
121
|
+
field_dict["warehouse_location"] = warehouse_location
|
|
122
|
+
|
|
123
|
+
return field_dict
|
|
124
|
+
|
|
125
|
+
@classmethod
|
|
126
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
127
|
+
from ..models.inventory_item import InventoryItem
|
|
128
|
+
from ..models.project import Project
|
|
129
|
+
from ..models.warehouse_location import WarehouseLocation
|
|
130
|
+
|
|
131
|
+
d = dict(src_dict)
|
|
132
|
+
id = d.pop("id")
|
|
133
|
+
|
|
134
|
+
project_id = d.pop("project_id")
|
|
135
|
+
|
|
136
|
+
inventory_item_id = d.pop("inventory_item_id")
|
|
137
|
+
|
|
138
|
+
warehouse_location_id = d.pop("warehouse_location_id")
|
|
139
|
+
|
|
140
|
+
is_active = d.pop("is_active")
|
|
141
|
+
|
|
142
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
143
|
+
|
|
144
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
145
|
+
|
|
146
|
+
def _parse_ext_data(data: object) -> None | str | Unset:
|
|
147
|
+
if data is None:
|
|
148
|
+
return data
|
|
149
|
+
if isinstance(data, Unset):
|
|
150
|
+
return data
|
|
151
|
+
return cast(None | str | Unset, data)
|
|
152
|
+
|
|
153
|
+
ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
|
|
154
|
+
|
|
155
|
+
def _parse_project(data: object) -> None | Project | Unset:
|
|
156
|
+
if data is None:
|
|
157
|
+
return data
|
|
158
|
+
if isinstance(data, Unset):
|
|
159
|
+
return data
|
|
160
|
+
try:
|
|
161
|
+
if not isinstance(data, dict):
|
|
162
|
+
raise TypeError()
|
|
163
|
+
project_type_0 = Project.from_dict(data)
|
|
164
|
+
|
|
165
|
+
return project_type_0
|
|
166
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
167
|
+
pass
|
|
168
|
+
return cast(None | Project | Unset, data)
|
|
169
|
+
|
|
170
|
+
project = _parse_project(d.pop("project", UNSET))
|
|
171
|
+
|
|
172
|
+
def _parse_inventory_item(data: object) -> InventoryItem | None | Unset:
|
|
173
|
+
if data is None:
|
|
174
|
+
return data
|
|
175
|
+
if isinstance(data, Unset):
|
|
176
|
+
return data
|
|
177
|
+
try:
|
|
178
|
+
if not isinstance(data, dict):
|
|
179
|
+
raise TypeError()
|
|
180
|
+
inventory_item_type_0 = InventoryItem.from_dict(data)
|
|
181
|
+
|
|
182
|
+
return inventory_item_type_0
|
|
183
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
184
|
+
pass
|
|
185
|
+
return cast(InventoryItem | None | Unset, data)
|
|
186
|
+
|
|
187
|
+
inventory_item = _parse_inventory_item(d.pop("inventory_item", UNSET))
|
|
188
|
+
|
|
189
|
+
def _parse_warehouse_location(data: object) -> None | Unset | WarehouseLocation:
|
|
190
|
+
if data is None:
|
|
191
|
+
return data
|
|
192
|
+
if isinstance(data, Unset):
|
|
193
|
+
return data
|
|
194
|
+
try:
|
|
195
|
+
if not isinstance(data, dict):
|
|
196
|
+
raise TypeError()
|
|
197
|
+
warehouse_location_type_0 = WarehouseLocation.from_dict(data)
|
|
198
|
+
|
|
199
|
+
return warehouse_location_type_0
|
|
200
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
201
|
+
pass
|
|
202
|
+
return cast(None | Unset | WarehouseLocation, data)
|
|
203
|
+
|
|
204
|
+
warehouse_location = _parse_warehouse_location(d.pop("warehouse_location", UNSET))
|
|
205
|
+
|
|
206
|
+
inventory_item_location = cls(
|
|
207
|
+
id=id,
|
|
208
|
+
project_id=project_id,
|
|
209
|
+
inventory_item_id=inventory_item_id,
|
|
210
|
+
warehouse_location_id=warehouse_location_id,
|
|
211
|
+
is_active=is_active,
|
|
212
|
+
created_at=created_at,
|
|
213
|
+
updated_at=updated_at,
|
|
214
|
+
ext_data=ext_data,
|
|
215
|
+
project=project,
|
|
216
|
+
inventory_item=inventory_item,
|
|
217
|
+
warehouse_location=warehouse_location,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
inventory_item_location.additional_properties = d
|
|
221
|
+
return inventory_item_location
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
def additional_keys(self) -> list[str]:
|
|
225
|
+
return list(self.additional_properties.keys())
|
|
226
|
+
|
|
227
|
+
def __getitem__(self, key: str) -> Any:
|
|
228
|
+
return self.additional_properties[key]
|
|
229
|
+
|
|
230
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
231
|
+
self.additional_properties[key] = value
|
|
232
|
+
|
|
233
|
+
def __delitem__(self, key: str) -> None:
|
|
234
|
+
del self.additional_properties[key]
|
|
235
|
+
|
|
236
|
+
def __contains__(self, key: str) -> bool:
|
|
237
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,150 @@
|
|
|
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.inventory_item_location_assignment_response_ext_data_type_0 import (
|
|
12
|
+
InventoryItemLocationAssignmentResponseExtDataType0,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="InventoryItemLocationAssignmentResponse")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class InventoryItemLocationAssignmentResponse:
|
|
21
|
+
"""Serialized persistent item-to-location assignment.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
id (str):
|
|
25
|
+
project_id (str):
|
|
26
|
+
inventory_item_id (str):
|
|
27
|
+
warehouse_location_id (str):
|
|
28
|
+
is_active (bool):
|
|
29
|
+
ext_data (InventoryItemLocationAssignmentResponseExtDataType0 | None):
|
|
30
|
+
created_at (datetime.datetime):
|
|
31
|
+
updated_at (datetime.datetime):
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
id: str
|
|
35
|
+
project_id: str
|
|
36
|
+
inventory_item_id: str
|
|
37
|
+
warehouse_location_id: str
|
|
38
|
+
is_active: bool
|
|
39
|
+
ext_data: InventoryItemLocationAssignmentResponseExtDataType0 | None
|
|
40
|
+
created_at: datetime.datetime
|
|
41
|
+
updated_at: datetime.datetime
|
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
from ..models.inventory_item_location_assignment_response_ext_data_type_0 import (
|
|
46
|
+
InventoryItemLocationAssignmentResponseExtDataType0,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
id = self.id
|
|
50
|
+
|
|
51
|
+
project_id = self.project_id
|
|
52
|
+
|
|
53
|
+
inventory_item_id = self.inventory_item_id
|
|
54
|
+
|
|
55
|
+
warehouse_location_id = self.warehouse_location_id
|
|
56
|
+
|
|
57
|
+
is_active = self.is_active
|
|
58
|
+
|
|
59
|
+
ext_data: dict[str, Any] | None
|
|
60
|
+
if isinstance(self.ext_data, InventoryItemLocationAssignmentResponseExtDataType0):
|
|
61
|
+
ext_data = self.ext_data.to_dict()
|
|
62
|
+
else:
|
|
63
|
+
ext_data = self.ext_data
|
|
64
|
+
|
|
65
|
+
created_at = self.created_at.isoformat()
|
|
66
|
+
|
|
67
|
+
updated_at = self.updated_at.isoformat()
|
|
68
|
+
|
|
69
|
+
field_dict: dict[str, Any] = {}
|
|
70
|
+
field_dict.update(self.additional_properties)
|
|
71
|
+
field_dict.update(
|
|
72
|
+
{
|
|
73
|
+
"id": id,
|
|
74
|
+
"project_id": project_id,
|
|
75
|
+
"inventory_item_id": inventory_item_id,
|
|
76
|
+
"warehouse_location_id": warehouse_location_id,
|
|
77
|
+
"is_active": is_active,
|
|
78
|
+
"ext_data": ext_data,
|
|
79
|
+
"created_at": created_at,
|
|
80
|
+
"updated_at": updated_at,
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return field_dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
88
|
+
from ..models.inventory_item_location_assignment_response_ext_data_type_0 import (
|
|
89
|
+
InventoryItemLocationAssignmentResponseExtDataType0,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
d = dict(src_dict)
|
|
93
|
+
id = d.pop("id")
|
|
94
|
+
|
|
95
|
+
project_id = d.pop("project_id")
|
|
96
|
+
|
|
97
|
+
inventory_item_id = d.pop("inventory_item_id")
|
|
98
|
+
|
|
99
|
+
warehouse_location_id = d.pop("warehouse_location_id")
|
|
100
|
+
|
|
101
|
+
is_active = d.pop("is_active")
|
|
102
|
+
|
|
103
|
+
def _parse_ext_data(data: object) -> InventoryItemLocationAssignmentResponseExtDataType0 | None:
|
|
104
|
+
if data is None:
|
|
105
|
+
return data
|
|
106
|
+
try:
|
|
107
|
+
if not isinstance(data, dict):
|
|
108
|
+
raise TypeError()
|
|
109
|
+
ext_data_type_0 = InventoryItemLocationAssignmentResponseExtDataType0.from_dict(data)
|
|
110
|
+
|
|
111
|
+
return ext_data_type_0
|
|
112
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
113
|
+
pass
|
|
114
|
+
return cast(InventoryItemLocationAssignmentResponseExtDataType0 | None, data)
|
|
115
|
+
|
|
116
|
+
ext_data = _parse_ext_data(d.pop("ext_data"))
|
|
117
|
+
|
|
118
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
119
|
+
|
|
120
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
121
|
+
|
|
122
|
+
inventory_item_location_assignment_response = cls(
|
|
123
|
+
id=id,
|
|
124
|
+
project_id=project_id,
|
|
125
|
+
inventory_item_id=inventory_item_id,
|
|
126
|
+
warehouse_location_id=warehouse_location_id,
|
|
127
|
+
is_active=is_active,
|
|
128
|
+
ext_data=ext_data,
|
|
129
|
+
created_at=created_at,
|
|
130
|
+
updated_at=updated_at,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
inventory_item_location_assignment_response.additional_properties = d
|
|
134
|
+
return inventory_item_location_assignment_response
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def additional_keys(self) -> list[str]:
|
|
138
|
+
return list(self.additional_properties.keys())
|
|
139
|
+
|
|
140
|
+
def __getitem__(self, key: str) -> Any:
|
|
141
|
+
return self.additional_properties[key]
|
|
142
|
+
|
|
143
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
144
|
+
self.additional_properties[key] = value
|
|
145
|
+
|
|
146
|
+
def __delitem__(self, key: str) -> None:
|
|
147
|
+
del self.additional_properties[key]
|
|
148
|
+
|
|
149
|
+
def __contains__(self, key: str) -> bool:
|
|
150
|
+
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="InventoryItemLocationAssignmentResponseExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class InventoryItemLocationAssignmentResponseExtDataType0:
|
|
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
|
+
inventory_item_location_assignment_response_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
inventory_item_location_assignment_response_ext_data_type_0.additional_properties = d
|
|
31
|
+
return inventory_item_location_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
|
|
@@ -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.cost_rule import CostRule
|
|
13
14
|
from ..models.inventory_item import InventoryItem
|
|
14
15
|
from ..models.project import Project
|
|
15
16
|
from ..models.vendor import Vendor
|
|
@@ -42,6 +43,7 @@ class ItemSourcing:
|
|
|
42
43
|
project (None | Project | Unset):
|
|
43
44
|
vendor (None | Unset | Vendor):
|
|
44
45
|
inventory_item (InventoryItem | None | Unset):
|
|
46
|
+
cost_rules (list[CostRule] | None | Unset):
|
|
45
47
|
"""
|
|
46
48
|
|
|
47
49
|
id: str
|
|
@@ -63,6 +65,7 @@ class ItemSourcing:
|
|
|
63
65
|
project: None | Project | Unset = UNSET
|
|
64
66
|
vendor: None | Unset | Vendor = UNSET
|
|
65
67
|
inventory_item: InventoryItem | None | Unset = UNSET
|
|
68
|
+
cost_rules: list[CostRule] | None | Unset = UNSET
|
|
66
69
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
67
70
|
|
|
68
71
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -154,6 +157,18 @@ class ItemSourcing:
|
|
|
154
157
|
else:
|
|
155
158
|
inventory_item = self.inventory_item
|
|
156
159
|
|
|
160
|
+
cost_rules: list[dict[str, Any]] | None | Unset
|
|
161
|
+
if isinstance(self.cost_rules, Unset):
|
|
162
|
+
cost_rules = UNSET
|
|
163
|
+
elif isinstance(self.cost_rules, list):
|
|
164
|
+
cost_rules = []
|
|
165
|
+
for cost_rules_type_0_item_data in self.cost_rules:
|
|
166
|
+
cost_rules_type_0_item = cost_rules_type_0_item_data.to_dict()
|
|
167
|
+
cost_rules.append(cost_rules_type_0_item)
|
|
168
|
+
|
|
169
|
+
else:
|
|
170
|
+
cost_rules = self.cost_rules
|
|
171
|
+
|
|
157
172
|
field_dict: dict[str, Any] = {}
|
|
158
173
|
field_dict.update(self.additional_properties)
|
|
159
174
|
field_dict.update(
|
|
@@ -189,11 +204,14 @@ class ItemSourcing:
|
|
|
189
204
|
field_dict["vendor"] = vendor
|
|
190
205
|
if inventory_item is not UNSET:
|
|
191
206
|
field_dict["inventory_item"] = inventory_item
|
|
207
|
+
if cost_rules is not UNSET:
|
|
208
|
+
field_dict["cost_rules"] = cost_rules
|
|
192
209
|
|
|
193
210
|
return field_dict
|
|
194
211
|
|
|
195
212
|
@classmethod
|
|
196
213
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
214
|
+
from ..models.cost_rule import CostRule
|
|
197
215
|
from ..models.inventory_item import InventoryItem
|
|
198
216
|
from ..models.project import Project
|
|
199
217
|
from ..models.vendor import Vendor
|
|
@@ -331,6 +349,28 @@ class ItemSourcing:
|
|
|
331
349
|
|
|
332
350
|
inventory_item = _parse_inventory_item(d.pop("inventory_item", UNSET))
|
|
333
351
|
|
|
352
|
+
def _parse_cost_rules(data: object) -> list[CostRule] | None | Unset:
|
|
353
|
+
if data is None:
|
|
354
|
+
return data
|
|
355
|
+
if isinstance(data, Unset):
|
|
356
|
+
return data
|
|
357
|
+
try:
|
|
358
|
+
if not isinstance(data, list):
|
|
359
|
+
raise TypeError()
|
|
360
|
+
cost_rules_type_0 = []
|
|
361
|
+
_cost_rules_type_0 = data
|
|
362
|
+
for cost_rules_type_0_item_data in _cost_rules_type_0:
|
|
363
|
+
cost_rules_type_0_item = CostRule.from_dict(cost_rules_type_0_item_data)
|
|
364
|
+
|
|
365
|
+
cost_rules_type_0.append(cost_rules_type_0_item)
|
|
366
|
+
|
|
367
|
+
return cost_rules_type_0
|
|
368
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
369
|
+
pass
|
|
370
|
+
return cast(list[CostRule] | None | Unset, data)
|
|
371
|
+
|
|
372
|
+
cost_rules = _parse_cost_rules(d.pop("cost_rules", UNSET))
|
|
373
|
+
|
|
334
374
|
item_sourcing = cls(
|
|
335
375
|
id=id,
|
|
336
376
|
project_id=project_id,
|
|
@@ -351,6 +391,7 @@ class ItemSourcing:
|
|
|
351
391
|
project=project,
|
|
352
392
|
vendor=vendor,
|
|
353
393
|
inventory_item=inventory_item,
|
|
394
|
+
cost_rules=cost_rules,
|
|
354
395
|
)
|
|
355
396
|
|
|
356
397
|
item_sourcing.additional_properties = d
|
|
@@ -0,0 +1,107 @@
|
|
|
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="ItemSourcingItemOption")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ItemSourcingItemOption:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
id (str):
|
|
19
|
+
sku (str):
|
|
20
|
+
name (str):
|
|
21
|
+
stock_uom_id (str):
|
|
22
|
+
stock_uom_code (None | str | Unset):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
id: str
|
|
26
|
+
sku: str
|
|
27
|
+
name: str
|
|
28
|
+
stock_uom_id: str
|
|
29
|
+
stock_uom_code: None | str | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
id = self.id
|
|
34
|
+
|
|
35
|
+
sku = self.sku
|
|
36
|
+
|
|
37
|
+
name = self.name
|
|
38
|
+
|
|
39
|
+
stock_uom_id = self.stock_uom_id
|
|
40
|
+
|
|
41
|
+
stock_uom_code: None | str | Unset
|
|
42
|
+
if isinstance(self.stock_uom_code, Unset):
|
|
43
|
+
stock_uom_code = UNSET
|
|
44
|
+
else:
|
|
45
|
+
stock_uom_code = self.stock_uom_code
|
|
46
|
+
|
|
47
|
+
field_dict: dict[str, Any] = {}
|
|
48
|
+
field_dict.update(self.additional_properties)
|
|
49
|
+
field_dict.update(
|
|
50
|
+
{
|
|
51
|
+
"id": id,
|
|
52
|
+
"sku": sku,
|
|
53
|
+
"name": name,
|
|
54
|
+
"stock_uom_id": stock_uom_id,
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
if stock_uom_code is not UNSET:
|
|
58
|
+
field_dict["stock_uom_code"] = stock_uom_code
|
|
59
|
+
|
|
60
|
+
return field_dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
id = d.pop("id")
|
|
66
|
+
|
|
67
|
+
sku = d.pop("sku")
|
|
68
|
+
|
|
69
|
+
name = d.pop("name")
|
|
70
|
+
|
|
71
|
+
stock_uom_id = d.pop("stock_uom_id")
|
|
72
|
+
|
|
73
|
+
def _parse_stock_uom_code(data: object) -> None | str | Unset:
|
|
74
|
+
if data is None:
|
|
75
|
+
return data
|
|
76
|
+
if isinstance(data, Unset):
|
|
77
|
+
return data
|
|
78
|
+
return cast(None | str | Unset, data)
|
|
79
|
+
|
|
80
|
+
stock_uom_code = _parse_stock_uom_code(d.pop("stock_uom_code", UNSET))
|
|
81
|
+
|
|
82
|
+
item_sourcing_item_option = cls(
|
|
83
|
+
id=id,
|
|
84
|
+
sku=sku,
|
|
85
|
+
name=name,
|
|
86
|
+
stock_uom_id=stock_uom_id,
|
|
87
|
+
stock_uom_code=stock_uom_code,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
item_sourcing_item_option.additional_properties = d
|
|
91
|
+
return item_sourcing_item_option
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def additional_keys(self) -> list[str]:
|
|
95
|
+
return list(self.additional_properties.keys())
|
|
96
|
+
|
|
97
|
+
def __getitem__(self, key: str) -> Any:
|
|
98
|
+
return self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
+
self.additional_properties[key] = value
|
|
102
|
+
|
|
103
|
+
def __delitem__(self, key: str) -> None:
|
|
104
|
+
del self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __contains__(self, key: str) -> bool:
|
|
107
|
+
return key in self.additional_properties
|