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,211 @@
|
|
|
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.update_sales_rep_request_ext_data_type_0 import UpdateSalesRepRequestExtDataType0
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="UpdateSalesRepRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class UpdateSalesRepRequest:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
code (None | str | Unset):
|
|
23
|
+
name (None | str | Unset):
|
|
24
|
+
email (None | str | Unset):
|
|
25
|
+
user_id (None | str | Unset):
|
|
26
|
+
default_commission_rate (float | None | str | Unset):
|
|
27
|
+
is_active (bool | None | Unset):
|
|
28
|
+
ext_data (None | Unset | UpdateSalesRepRequestExtDataType0):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
code: None | str | Unset = UNSET
|
|
32
|
+
name: None | str | Unset = UNSET
|
|
33
|
+
email: None | str | Unset = UNSET
|
|
34
|
+
user_id: None | str | Unset = UNSET
|
|
35
|
+
default_commission_rate: float | None | str | Unset = UNSET
|
|
36
|
+
is_active: bool | None | Unset = UNSET
|
|
37
|
+
ext_data: None | Unset | UpdateSalesRepRequestExtDataType0 = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
from ..models.update_sales_rep_request_ext_data_type_0 import UpdateSalesRepRequestExtDataType0
|
|
42
|
+
|
|
43
|
+
code: None | str | Unset
|
|
44
|
+
if isinstance(self.code, Unset):
|
|
45
|
+
code = UNSET
|
|
46
|
+
else:
|
|
47
|
+
code = self.code
|
|
48
|
+
|
|
49
|
+
name: None | str | Unset
|
|
50
|
+
if isinstance(self.name, Unset):
|
|
51
|
+
name = UNSET
|
|
52
|
+
else:
|
|
53
|
+
name = self.name
|
|
54
|
+
|
|
55
|
+
email: None | str | Unset
|
|
56
|
+
if isinstance(self.email, Unset):
|
|
57
|
+
email = UNSET
|
|
58
|
+
else:
|
|
59
|
+
email = self.email
|
|
60
|
+
|
|
61
|
+
user_id: None | str | Unset
|
|
62
|
+
if isinstance(self.user_id, Unset):
|
|
63
|
+
user_id = UNSET
|
|
64
|
+
else:
|
|
65
|
+
user_id = self.user_id
|
|
66
|
+
|
|
67
|
+
default_commission_rate: float | None | str | Unset
|
|
68
|
+
if isinstance(self.default_commission_rate, Unset):
|
|
69
|
+
default_commission_rate = UNSET
|
|
70
|
+
else:
|
|
71
|
+
default_commission_rate = self.default_commission_rate
|
|
72
|
+
|
|
73
|
+
is_active: bool | None | Unset
|
|
74
|
+
if isinstance(self.is_active, Unset):
|
|
75
|
+
is_active = UNSET
|
|
76
|
+
else:
|
|
77
|
+
is_active = self.is_active
|
|
78
|
+
|
|
79
|
+
ext_data: dict[str, Any] | None | Unset
|
|
80
|
+
if isinstance(self.ext_data, Unset):
|
|
81
|
+
ext_data = UNSET
|
|
82
|
+
elif isinstance(self.ext_data, UpdateSalesRepRequestExtDataType0):
|
|
83
|
+
ext_data = self.ext_data.to_dict()
|
|
84
|
+
else:
|
|
85
|
+
ext_data = self.ext_data
|
|
86
|
+
|
|
87
|
+
field_dict: dict[str, Any] = {}
|
|
88
|
+
field_dict.update(self.additional_properties)
|
|
89
|
+
field_dict.update({})
|
|
90
|
+
if code is not UNSET:
|
|
91
|
+
field_dict["code"] = code
|
|
92
|
+
if name is not UNSET:
|
|
93
|
+
field_dict["name"] = name
|
|
94
|
+
if email is not UNSET:
|
|
95
|
+
field_dict["email"] = email
|
|
96
|
+
if user_id is not UNSET:
|
|
97
|
+
field_dict["user_id"] = user_id
|
|
98
|
+
if default_commission_rate is not UNSET:
|
|
99
|
+
field_dict["default_commission_rate"] = default_commission_rate
|
|
100
|
+
if is_active is not UNSET:
|
|
101
|
+
field_dict["is_active"] = is_active
|
|
102
|
+
if ext_data is not UNSET:
|
|
103
|
+
field_dict["ext_data"] = ext_data
|
|
104
|
+
|
|
105
|
+
return field_dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
109
|
+
from ..models.update_sales_rep_request_ext_data_type_0 import UpdateSalesRepRequestExtDataType0
|
|
110
|
+
|
|
111
|
+
d = dict(src_dict)
|
|
112
|
+
|
|
113
|
+
def _parse_code(data: object) -> None | str | Unset:
|
|
114
|
+
if data is None:
|
|
115
|
+
return data
|
|
116
|
+
if isinstance(data, Unset):
|
|
117
|
+
return data
|
|
118
|
+
return cast(None | str | Unset, data)
|
|
119
|
+
|
|
120
|
+
code = _parse_code(d.pop("code", UNSET))
|
|
121
|
+
|
|
122
|
+
def _parse_name(data: object) -> None | str | Unset:
|
|
123
|
+
if data is None:
|
|
124
|
+
return data
|
|
125
|
+
if isinstance(data, Unset):
|
|
126
|
+
return data
|
|
127
|
+
return cast(None | str | Unset, data)
|
|
128
|
+
|
|
129
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
130
|
+
|
|
131
|
+
def _parse_email(data: object) -> None | str | Unset:
|
|
132
|
+
if data is None:
|
|
133
|
+
return data
|
|
134
|
+
if isinstance(data, Unset):
|
|
135
|
+
return data
|
|
136
|
+
return cast(None | str | Unset, data)
|
|
137
|
+
|
|
138
|
+
email = _parse_email(d.pop("email", UNSET))
|
|
139
|
+
|
|
140
|
+
def _parse_user_id(data: object) -> None | str | Unset:
|
|
141
|
+
if data is None:
|
|
142
|
+
return data
|
|
143
|
+
if isinstance(data, Unset):
|
|
144
|
+
return data
|
|
145
|
+
return cast(None | str | Unset, data)
|
|
146
|
+
|
|
147
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
148
|
+
|
|
149
|
+
def _parse_default_commission_rate(data: object) -> float | None | str | Unset:
|
|
150
|
+
if data is None:
|
|
151
|
+
return data
|
|
152
|
+
if isinstance(data, Unset):
|
|
153
|
+
return data
|
|
154
|
+
return cast(float | None | str | Unset, data)
|
|
155
|
+
|
|
156
|
+
default_commission_rate = _parse_default_commission_rate(d.pop("default_commission_rate", UNSET))
|
|
157
|
+
|
|
158
|
+
def _parse_is_active(data: object) -> bool | None | Unset:
|
|
159
|
+
if data is None:
|
|
160
|
+
return data
|
|
161
|
+
if isinstance(data, Unset):
|
|
162
|
+
return data
|
|
163
|
+
return cast(bool | None | Unset, data)
|
|
164
|
+
|
|
165
|
+
is_active = _parse_is_active(d.pop("is_active", UNSET))
|
|
166
|
+
|
|
167
|
+
def _parse_ext_data(data: object) -> None | Unset | UpdateSalesRepRequestExtDataType0:
|
|
168
|
+
if data is None:
|
|
169
|
+
return data
|
|
170
|
+
if isinstance(data, Unset):
|
|
171
|
+
return data
|
|
172
|
+
try:
|
|
173
|
+
if not isinstance(data, dict):
|
|
174
|
+
raise TypeError()
|
|
175
|
+
ext_data_type_0 = UpdateSalesRepRequestExtDataType0.from_dict(data)
|
|
176
|
+
|
|
177
|
+
return ext_data_type_0
|
|
178
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
179
|
+
pass
|
|
180
|
+
return cast(None | Unset | UpdateSalesRepRequestExtDataType0, data)
|
|
181
|
+
|
|
182
|
+
ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
|
|
183
|
+
|
|
184
|
+
update_sales_rep_request = cls(
|
|
185
|
+
code=code,
|
|
186
|
+
name=name,
|
|
187
|
+
email=email,
|
|
188
|
+
user_id=user_id,
|
|
189
|
+
default_commission_rate=default_commission_rate,
|
|
190
|
+
is_active=is_active,
|
|
191
|
+
ext_data=ext_data,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
update_sales_rep_request.additional_properties = d
|
|
195
|
+
return update_sales_rep_request
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def additional_keys(self) -> list[str]:
|
|
199
|
+
return list(self.additional_properties.keys())
|
|
200
|
+
|
|
201
|
+
def __getitem__(self, key: str) -> Any:
|
|
202
|
+
return self.additional_properties[key]
|
|
203
|
+
|
|
204
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
205
|
+
self.additional_properties[key] = value
|
|
206
|
+
|
|
207
|
+
def __delitem__(self, key: str) -> None:
|
|
208
|
+
del self.additional_properties[key]
|
|
209
|
+
|
|
210
|
+
def __contains__(self, key: str) -> bool:
|
|
211
|
+
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="UpdateSalesRepRequestExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class UpdateSalesRepRequestExtDataType0:
|
|
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
|
+
update_sales_rep_request_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
update_sales_rep_request_ext_data_type_0.additional_properties = d
|
|
31
|
+
return update_sales_rep_request_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
|
|
@@ -22,11 +22,15 @@ class UpsertInventoryConfigRequest:
|
|
|
22
22
|
Attributes:
|
|
23
23
|
costing_method (CostingMethod | Unset):
|
|
24
24
|
default_warehouse_id (None | str | Unset):
|
|
25
|
+
default_cost_list_id (None | str | Unset):
|
|
26
|
+
default_price_list_id (None | str | Unset):
|
|
25
27
|
ext_data (None | Unset | UpsertInventoryConfigRequestExtDataType0):
|
|
26
28
|
"""
|
|
27
29
|
|
|
28
30
|
costing_method: CostingMethod | Unset = UNSET
|
|
29
31
|
default_warehouse_id: None | str | Unset = UNSET
|
|
32
|
+
default_cost_list_id: None | str | Unset = UNSET
|
|
33
|
+
default_price_list_id: None | str | Unset = UNSET
|
|
30
34
|
ext_data: None | Unset | UpsertInventoryConfigRequestExtDataType0 = UNSET
|
|
31
35
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
36
|
|
|
@@ -43,6 +47,18 @@ class UpsertInventoryConfigRequest:
|
|
|
43
47
|
else:
|
|
44
48
|
default_warehouse_id = self.default_warehouse_id
|
|
45
49
|
|
|
50
|
+
default_cost_list_id: None | str | Unset
|
|
51
|
+
if isinstance(self.default_cost_list_id, Unset):
|
|
52
|
+
default_cost_list_id = UNSET
|
|
53
|
+
else:
|
|
54
|
+
default_cost_list_id = self.default_cost_list_id
|
|
55
|
+
|
|
56
|
+
default_price_list_id: None | str | Unset
|
|
57
|
+
if isinstance(self.default_price_list_id, Unset):
|
|
58
|
+
default_price_list_id = UNSET
|
|
59
|
+
else:
|
|
60
|
+
default_price_list_id = self.default_price_list_id
|
|
61
|
+
|
|
46
62
|
ext_data: dict[str, Any] | None | Unset
|
|
47
63
|
if isinstance(self.ext_data, Unset):
|
|
48
64
|
ext_data = UNSET
|
|
@@ -58,6 +74,10 @@ class UpsertInventoryConfigRequest:
|
|
|
58
74
|
field_dict["costing_method"] = costing_method
|
|
59
75
|
if default_warehouse_id is not UNSET:
|
|
60
76
|
field_dict["default_warehouse_id"] = default_warehouse_id
|
|
77
|
+
if default_cost_list_id is not UNSET:
|
|
78
|
+
field_dict["default_cost_list_id"] = default_cost_list_id
|
|
79
|
+
if default_price_list_id is not UNSET:
|
|
80
|
+
field_dict["default_price_list_id"] = default_price_list_id
|
|
61
81
|
if ext_data is not UNSET:
|
|
62
82
|
field_dict["ext_data"] = ext_data
|
|
63
83
|
|
|
@@ -84,6 +104,24 @@ class UpsertInventoryConfigRequest:
|
|
|
84
104
|
|
|
85
105
|
default_warehouse_id = _parse_default_warehouse_id(d.pop("default_warehouse_id", UNSET))
|
|
86
106
|
|
|
107
|
+
def _parse_default_cost_list_id(data: object) -> None | str | Unset:
|
|
108
|
+
if data is None:
|
|
109
|
+
return data
|
|
110
|
+
if isinstance(data, Unset):
|
|
111
|
+
return data
|
|
112
|
+
return cast(None | str | Unset, data)
|
|
113
|
+
|
|
114
|
+
default_cost_list_id = _parse_default_cost_list_id(d.pop("default_cost_list_id", UNSET))
|
|
115
|
+
|
|
116
|
+
def _parse_default_price_list_id(data: object) -> None | str | Unset:
|
|
117
|
+
if data is None:
|
|
118
|
+
return data
|
|
119
|
+
if isinstance(data, Unset):
|
|
120
|
+
return data
|
|
121
|
+
return cast(None | str | Unset, data)
|
|
122
|
+
|
|
123
|
+
default_price_list_id = _parse_default_price_list_id(d.pop("default_price_list_id", UNSET))
|
|
124
|
+
|
|
87
125
|
def _parse_ext_data(data: object) -> None | Unset | UpsertInventoryConfigRequestExtDataType0:
|
|
88
126
|
if data is None:
|
|
89
127
|
return data
|
|
@@ -104,6 +142,8 @@ class UpsertInventoryConfigRequest:
|
|
|
104
142
|
upsert_inventory_config_request = cls(
|
|
105
143
|
costing_method=costing_method,
|
|
106
144
|
default_warehouse_id=default_warehouse_id,
|
|
145
|
+
default_cost_list_id=default_cost_list_id,
|
|
146
|
+
default_price_list_id=default_price_list_id,
|
|
107
147
|
ext_data=ext_data,
|
|
108
148
|
)
|
|
109
149
|
|
|
@@ -0,0 +1,62 @@
|
|
|
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="UpsertItemSourcingCostRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class UpsertItemSourcingCostRequest:
|
|
14
|
+
"""Set the current vendor-item cost for one sourcing relationship.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
unit_cost (float):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
unit_cost: float
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
unit_cost = self.unit_cost
|
|
25
|
+
|
|
26
|
+
field_dict: dict[str, Any] = {}
|
|
27
|
+
field_dict.update(self.additional_properties)
|
|
28
|
+
field_dict.update(
|
|
29
|
+
{
|
|
30
|
+
"unit_cost": unit_cost,
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
return field_dict
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
38
|
+
d = dict(src_dict)
|
|
39
|
+
unit_cost = d.pop("unit_cost")
|
|
40
|
+
|
|
41
|
+
upsert_item_sourcing_cost_request = cls(
|
|
42
|
+
unit_cost=unit_cost,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
upsert_item_sourcing_cost_request.additional_properties = d
|
|
46
|
+
return upsert_item_sourcing_cost_request
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def additional_keys(self) -> list[str]:
|
|
50
|
+
return list(self.additional_properties.keys())
|
|
51
|
+
|
|
52
|
+
def __getitem__(self, key: str) -> Any:
|
|
53
|
+
return self.additional_properties[key]
|
|
54
|
+
|
|
55
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
56
|
+
self.additional_properties[key] = value
|
|
57
|
+
|
|
58
|
+
def __delitem__(self, key: str) -> None:
|
|
59
|
+
del self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __contains__(self, key: str) -> bool:
|
|
62
|
+
return key in self.additional_properties
|
|
@@ -15,6 +15,7 @@ if TYPE_CHECKING:
|
|
|
15
15
|
from ..models.channel_allocation import ChannelAllocation
|
|
16
16
|
from ..models.goods_receipt_line import GoodsReceiptLine
|
|
17
17
|
from ..models.inventory_config import InventoryConfig
|
|
18
|
+
from ..models.inventory_item_location import InventoryItemLocation
|
|
18
19
|
from ..models.inventory_replenishment_policy import InventoryReplenishmentPolicy
|
|
19
20
|
from ..models.pick_ticket_line import PickTicketLine
|
|
20
21
|
from ..models.project import Project
|
|
@@ -58,6 +59,7 @@ class WarehouseLocation:
|
|
|
58
59
|
warehouse (None | Unset | Warehouse):
|
|
59
60
|
parent (None | Unset | WarehouseLocation):
|
|
60
61
|
children (list[WarehouseLocation] | None | Unset):
|
|
62
|
+
inventory_item_assignments (list[InventoryItemLocation] | None | Unset):
|
|
61
63
|
stock_balances (list[StockBalance] | None | Unset):
|
|
62
64
|
stock_transactions_from (list[StockTransaction] | None | Unset):
|
|
63
65
|
stock_transactions_to (list[StockTransaction] | None | Unset):
|
|
@@ -96,6 +98,7 @@ class WarehouseLocation:
|
|
|
96
98
|
warehouse: None | Unset | Warehouse = UNSET
|
|
97
99
|
parent: None | Unset | WarehouseLocation = UNSET
|
|
98
100
|
children: list[WarehouseLocation] | None | Unset = UNSET
|
|
101
|
+
inventory_item_assignments: list[InventoryItemLocation] | None | Unset = UNSET
|
|
99
102
|
stock_balances: list[StockBalance] | None | Unset = UNSET
|
|
100
103
|
stock_transactions_from: list[StockTransaction] | None | Unset = UNSET
|
|
101
104
|
stock_transactions_to: list[StockTransaction] | None | Unset = UNSET
|
|
@@ -222,6 +225,18 @@ class WarehouseLocation:
|
|
|
222
225
|
else:
|
|
223
226
|
children = self.children
|
|
224
227
|
|
|
228
|
+
inventory_item_assignments: list[dict[str, Any]] | None | Unset
|
|
229
|
+
if isinstance(self.inventory_item_assignments, Unset):
|
|
230
|
+
inventory_item_assignments = UNSET
|
|
231
|
+
elif isinstance(self.inventory_item_assignments, list):
|
|
232
|
+
inventory_item_assignments = []
|
|
233
|
+
for inventory_item_assignments_type_0_item_data in self.inventory_item_assignments:
|
|
234
|
+
inventory_item_assignments_type_0_item = inventory_item_assignments_type_0_item_data.to_dict()
|
|
235
|
+
inventory_item_assignments.append(inventory_item_assignments_type_0_item)
|
|
236
|
+
|
|
237
|
+
else:
|
|
238
|
+
inventory_item_assignments = self.inventory_item_assignments
|
|
239
|
+
|
|
225
240
|
stock_balances: list[dict[str, Any]] | None | Unset
|
|
226
241
|
if isinstance(self.stock_balances, Unset):
|
|
227
242
|
stock_balances = UNSET
|
|
@@ -430,6 +445,8 @@ class WarehouseLocation:
|
|
|
430
445
|
field_dict["parent"] = parent
|
|
431
446
|
if children is not UNSET:
|
|
432
447
|
field_dict["children"] = children
|
|
448
|
+
if inventory_item_assignments is not UNSET:
|
|
449
|
+
field_dict["inventory_item_assignments"] = inventory_item_assignments
|
|
433
450
|
if stock_balances is not UNSET:
|
|
434
451
|
field_dict["stock_balances"] = stock_balances
|
|
435
452
|
if stock_transactions_from is not UNSET:
|
|
@@ -466,6 +483,7 @@ class WarehouseLocation:
|
|
|
466
483
|
from ..models.channel_allocation import ChannelAllocation
|
|
467
484
|
from ..models.goods_receipt_line import GoodsReceiptLine
|
|
468
485
|
from ..models.inventory_config import InventoryConfig
|
|
486
|
+
from ..models.inventory_item_location import InventoryItemLocation
|
|
469
487
|
from ..models.inventory_replenishment_policy import InventoryReplenishmentPolicy
|
|
470
488
|
from ..models.pick_ticket_line import PickTicketLine
|
|
471
489
|
from ..models.project import Project
|
|
@@ -652,6 +670,30 @@ class WarehouseLocation:
|
|
|
652
670
|
|
|
653
671
|
children = _parse_children(d.pop("children", UNSET))
|
|
654
672
|
|
|
673
|
+
def _parse_inventory_item_assignments(data: object) -> list[InventoryItemLocation] | None | Unset:
|
|
674
|
+
if data is None:
|
|
675
|
+
return data
|
|
676
|
+
if isinstance(data, Unset):
|
|
677
|
+
return data
|
|
678
|
+
try:
|
|
679
|
+
if not isinstance(data, list):
|
|
680
|
+
raise TypeError()
|
|
681
|
+
inventory_item_assignments_type_0 = []
|
|
682
|
+
_inventory_item_assignments_type_0 = data
|
|
683
|
+
for inventory_item_assignments_type_0_item_data in _inventory_item_assignments_type_0:
|
|
684
|
+
inventory_item_assignments_type_0_item = InventoryItemLocation.from_dict(
|
|
685
|
+
inventory_item_assignments_type_0_item_data
|
|
686
|
+
)
|
|
687
|
+
|
|
688
|
+
inventory_item_assignments_type_0.append(inventory_item_assignments_type_0_item)
|
|
689
|
+
|
|
690
|
+
return inventory_item_assignments_type_0
|
|
691
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
692
|
+
pass
|
|
693
|
+
return cast(list[InventoryItemLocation] | None | Unset, data)
|
|
694
|
+
|
|
695
|
+
inventory_item_assignments = _parse_inventory_item_assignments(d.pop("inventory_item_assignments", UNSET))
|
|
696
|
+
|
|
655
697
|
def _parse_stock_balances(data: object) -> list[StockBalance] | None | Unset:
|
|
656
698
|
if data is None:
|
|
657
699
|
return data
|
|
@@ -999,6 +1041,7 @@ class WarehouseLocation:
|
|
|
999
1041
|
warehouse=warehouse,
|
|
1000
1042
|
parent=parent,
|
|
1001
1043
|
children=children,
|
|
1044
|
+
inventory_item_assignments=inventory_item_assignments,
|
|
1002
1045
|
stock_balances=stock_balances,
|
|
1003
1046
|
stock_transactions_from=stock_transactions_from,
|
|
1004
1047
|
stock_transactions_to=stock_transactions_to,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="WarehouseLocationItemResponse")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@_attrs_define
|
|
14
|
+
class WarehouseLocationItemResponse:
|
|
15
|
+
"""An item assigned to a location, with its live balance at that location.
|
|
16
|
+
|
|
17
|
+
Attributes:
|
|
18
|
+
inventory_item_id (str):
|
|
19
|
+
sku (str):
|
|
20
|
+
name (str):
|
|
21
|
+
is_active (bool):
|
|
22
|
+
is_assigned (bool):
|
|
23
|
+
on_hand_qty (float):
|
|
24
|
+
available_qty (float):
|
|
25
|
+
reserved_qty (float):
|
|
26
|
+
on_order_qty (float):
|
|
27
|
+
in_transit_qty (float):
|
|
28
|
+
last_transaction_at (datetime.datetime | None):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
inventory_item_id: str
|
|
32
|
+
sku: str
|
|
33
|
+
name: str
|
|
34
|
+
is_active: bool
|
|
35
|
+
is_assigned: bool
|
|
36
|
+
on_hand_qty: float
|
|
37
|
+
available_qty: float
|
|
38
|
+
reserved_qty: float
|
|
39
|
+
on_order_qty: float
|
|
40
|
+
in_transit_qty: float
|
|
41
|
+
last_transaction_at: datetime.datetime | None
|
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
inventory_item_id = self.inventory_item_id
|
|
46
|
+
|
|
47
|
+
sku = self.sku
|
|
48
|
+
|
|
49
|
+
name = self.name
|
|
50
|
+
|
|
51
|
+
is_active = self.is_active
|
|
52
|
+
|
|
53
|
+
is_assigned = self.is_assigned
|
|
54
|
+
|
|
55
|
+
on_hand_qty = self.on_hand_qty
|
|
56
|
+
|
|
57
|
+
available_qty = self.available_qty
|
|
58
|
+
|
|
59
|
+
reserved_qty = self.reserved_qty
|
|
60
|
+
|
|
61
|
+
on_order_qty = self.on_order_qty
|
|
62
|
+
|
|
63
|
+
in_transit_qty = self.in_transit_qty
|
|
64
|
+
|
|
65
|
+
last_transaction_at: None | str
|
|
66
|
+
if isinstance(self.last_transaction_at, datetime.datetime):
|
|
67
|
+
last_transaction_at = self.last_transaction_at.isoformat()
|
|
68
|
+
else:
|
|
69
|
+
last_transaction_at = self.last_transaction_at
|
|
70
|
+
|
|
71
|
+
field_dict: dict[str, Any] = {}
|
|
72
|
+
field_dict.update(self.additional_properties)
|
|
73
|
+
field_dict.update(
|
|
74
|
+
{
|
|
75
|
+
"inventory_item_id": inventory_item_id,
|
|
76
|
+
"sku": sku,
|
|
77
|
+
"name": name,
|
|
78
|
+
"is_active": is_active,
|
|
79
|
+
"is_assigned": is_assigned,
|
|
80
|
+
"on_hand_qty": on_hand_qty,
|
|
81
|
+
"available_qty": available_qty,
|
|
82
|
+
"reserved_qty": reserved_qty,
|
|
83
|
+
"on_order_qty": on_order_qty,
|
|
84
|
+
"in_transit_qty": in_transit_qty,
|
|
85
|
+
"last_transaction_at": last_transaction_at,
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return field_dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
93
|
+
d = dict(src_dict)
|
|
94
|
+
inventory_item_id = d.pop("inventory_item_id")
|
|
95
|
+
|
|
96
|
+
sku = d.pop("sku")
|
|
97
|
+
|
|
98
|
+
name = d.pop("name")
|
|
99
|
+
|
|
100
|
+
is_active = d.pop("is_active")
|
|
101
|
+
|
|
102
|
+
is_assigned = d.pop("is_assigned")
|
|
103
|
+
|
|
104
|
+
on_hand_qty = d.pop("on_hand_qty")
|
|
105
|
+
|
|
106
|
+
available_qty = d.pop("available_qty")
|
|
107
|
+
|
|
108
|
+
reserved_qty = d.pop("reserved_qty")
|
|
109
|
+
|
|
110
|
+
on_order_qty = d.pop("on_order_qty")
|
|
111
|
+
|
|
112
|
+
in_transit_qty = d.pop("in_transit_qty")
|
|
113
|
+
|
|
114
|
+
def _parse_last_transaction_at(data: object) -> datetime.datetime | None:
|
|
115
|
+
if data is None:
|
|
116
|
+
return data
|
|
117
|
+
try:
|
|
118
|
+
if not isinstance(data, str):
|
|
119
|
+
raise TypeError()
|
|
120
|
+
last_transaction_at_type_0 = datetime.datetime.fromisoformat(data)
|
|
121
|
+
|
|
122
|
+
return last_transaction_at_type_0
|
|
123
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
124
|
+
pass
|
|
125
|
+
return cast(datetime.datetime | None, data)
|
|
126
|
+
|
|
127
|
+
last_transaction_at = _parse_last_transaction_at(d.pop("last_transaction_at"))
|
|
128
|
+
|
|
129
|
+
warehouse_location_item_response = cls(
|
|
130
|
+
inventory_item_id=inventory_item_id,
|
|
131
|
+
sku=sku,
|
|
132
|
+
name=name,
|
|
133
|
+
is_active=is_active,
|
|
134
|
+
is_assigned=is_assigned,
|
|
135
|
+
on_hand_qty=on_hand_qty,
|
|
136
|
+
available_qty=available_qty,
|
|
137
|
+
reserved_qty=reserved_qty,
|
|
138
|
+
on_order_qty=on_order_qty,
|
|
139
|
+
in_transit_qty=in_transit_qty,
|
|
140
|
+
last_transaction_at=last_transaction_at,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
warehouse_location_item_response.additional_properties = d
|
|
144
|
+
return warehouse_location_item_response
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def additional_keys(self) -> list[str]:
|
|
148
|
+
return list(self.additional_properties.keys())
|
|
149
|
+
|
|
150
|
+
def __getitem__(self, key: str) -> Any:
|
|
151
|
+
return self.additional_properties[key]
|
|
152
|
+
|
|
153
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
154
|
+
self.additional_properties[key] = value
|
|
155
|
+
|
|
156
|
+
def __delitem__(self, key: str) -> None:
|
|
157
|
+
del self.additional_properties[key]
|
|
158
|
+
|
|
159
|
+
def __contains__(self, key: str) -> bool:
|
|
160
|
+
return key in self.additional_properties
|