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,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="CostListVendorAssignmentResponseExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CostListVendorAssignmentResponseExtDataType0:
|
|
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
|
+
cost_list_vendor_assignment_response_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
cost_list_vendor_assignment_response_ext_data_type_0.additional_properties = d
|
|
31
|
+
return cost_list_vendor_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
|
|
@@ -11,6 +11,7 @@ from ..types import UNSET, Unset
|
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from ..models.cost_list import CostList
|
|
14
|
+
from ..models.item_sourcing import ItemSourcing
|
|
14
15
|
from ..models.project import Project
|
|
15
16
|
from ..models.unit_of_measure import UnitOfMeasure
|
|
16
17
|
|
|
@@ -33,6 +34,7 @@ class CostRule:
|
|
|
33
34
|
is_active (bool):
|
|
34
35
|
created_at (datetime.datetime):
|
|
35
36
|
updated_at (datetime.datetime):
|
|
37
|
+
item_sourcing_id (None | str | Unset):
|
|
36
38
|
name (None | str | Unset):
|
|
37
39
|
uom_id (None | str | Unset):
|
|
38
40
|
min_quantity (float | None | Unset):
|
|
@@ -44,6 +46,7 @@ class CostRule:
|
|
|
44
46
|
ext_data (None | str | Unset):
|
|
45
47
|
project (None | Project | Unset):
|
|
46
48
|
cost_list (CostList | None | Unset):
|
|
49
|
+
item_sourcing (ItemSourcing | None | Unset):
|
|
47
50
|
uom (None | UnitOfMeasure | Unset):
|
|
48
51
|
"""
|
|
49
52
|
|
|
@@ -57,6 +60,7 @@ class CostRule:
|
|
|
57
60
|
is_active: bool
|
|
58
61
|
created_at: datetime.datetime
|
|
59
62
|
updated_at: datetime.datetime
|
|
63
|
+
item_sourcing_id: None | str | Unset = UNSET
|
|
60
64
|
name: None | str | Unset = UNSET
|
|
61
65
|
uom_id: None | str | Unset = UNSET
|
|
62
66
|
min_quantity: float | None | Unset = UNSET
|
|
@@ -68,11 +72,13 @@ class CostRule:
|
|
|
68
72
|
ext_data: None | str | Unset = UNSET
|
|
69
73
|
project: None | Project | Unset = UNSET
|
|
70
74
|
cost_list: CostList | None | Unset = UNSET
|
|
75
|
+
item_sourcing: ItemSourcing | None | Unset = UNSET
|
|
71
76
|
uom: None | UnitOfMeasure | Unset = UNSET
|
|
72
77
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
73
78
|
|
|
74
79
|
def to_dict(self) -> dict[str, Any]:
|
|
75
80
|
from ..models.cost_list import CostList
|
|
81
|
+
from ..models.item_sourcing import ItemSourcing
|
|
76
82
|
from ..models.project import Project
|
|
77
83
|
from ..models.unit_of_measure import UnitOfMeasure
|
|
78
84
|
|
|
@@ -96,6 +102,12 @@ class CostRule:
|
|
|
96
102
|
|
|
97
103
|
updated_at = self.updated_at.isoformat()
|
|
98
104
|
|
|
105
|
+
item_sourcing_id: None | str | Unset
|
|
106
|
+
if isinstance(self.item_sourcing_id, Unset):
|
|
107
|
+
item_sourcing_id = UNSET
|
|
108
|
+
else:
|
|
109
|
+
item_sourcing_id = self.item_sourcing_id
|
|
110
|
+
|
|
99
111
|
name: None | str | Unset
|
|
100
112
|
if isinstance(self.name, Unset):
|
|
101
113
|
name = UNSET
|
|
@@ -170,6 +182,14 @@ class CostRule:
|
|
|
170
182
|
else:
|
|
171
183
|
cost_list = self.cost_list
|
|
172
184
|
|
|
185
|
+
item_sourcing: dict[str, Any] | None | Unset
|
|
186
|
+
if isinstance(self.item_sourcing, Unset):
|
|
187
|
+
item_sourcing = UNSET
|
|
188
|
+
elif isinstance(self.item_sourcing, ItemSourcing):
|
|
189
|
+
item_sourcing = self.item_sourcing.to_dict()
|
|
190
|
+
else:
|
|
191
|
+
item_sourcing = self.item_sourcing
|
|
192
|
+
|
|
173
193
|
uom: dict[str, Any] | None | Unset
|
|
174
194
|
if isinstance(self.uom, Unset):
|
|
175
195
|
uom = UNSET
|
|
@@ -194,6 +214,8 @@ class CostRule:
|
|
|
194
214
|
"updated_at": updated_at,
|
|
195
215
|
}
|
|
196
216
|
)
|
|
217
|
+
if item_sourcing_id is not UNSET:
|
|
218
|
+
field_dict["item_sourcing_id"] = item_sourcing_id
|
|
197
219
|
if name is not UNSET:
|
|
198
220
|
field_dict["name"] = name
|
|
199
221
|
if uom_id is not UNSET:
|
|
@@ -216,6 +238,8 @@ class CostRule:
|
|
|
216
238
|
field_dict["project"] = project
|
|
217
239
|
if cost_list is not UNSET:
|
|
218
240
|
field_dict["cost_list"] = cost_list
|
|
241
|
+
if item_sourcing is not UNSET:
|
|
242
|
+
field_dict["item_sourcing"] = item_sourcing
|
|
219
243
|
if uom is not UNSET:
|
|
220
244
|
field_dict["uom"] = uom
|
|
221
245
|
|
|
@@ -224,6 +248,7 @@ class CostRule:
|
|
|
224
248
|
@classmethod
|
|
225
249
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
226
250
|
from ..models.cost_list import CostList
|
|
251
|
+
from ..models.item_sourcing import ItemSourcing
|
|
227
252
|
from ..models.project import Project
|
|
228
253
|
from ..models.unit_of_measure import UnitOfMeasure
|
|
229
254
|
|
|
@@ -248,6 +273,15 @@ class CostRule:
|
|
|
248
273
|
|
|
249
274
|
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
250
275
|
|
|
276
|
+
def _parse_item_sourcing_id(data: object) -> None | str | Unset:
|
|
277
|
+
if data is None:
|
|
278
|
+
return data
|
|
279
|
+
if isinstance(data, Unset):
|
|
280
|
+
return data
|
|
281
|
+
return cast(None | str | Unset, data)
|
|
282
|
+
|
|
283
|
+
item_sourcing_id = _parse_item_sourcing_id(d.pop("item_sourcing_id", UNSET))
|
|
284
|
+
|
|
251
285
|
def _parse_name(data: object) -> None | str | Unset:
|
|
252
286
|
if data is None:
|
|
253
287
|
return data
|
|
@@ -379,6 +413,23 @@ class CostRule:
|
|
|
379
413
|
|
|
380
414
|
cost_list = _parse_cost_list(d.pop("cost_list", UNSET))
|
|
381
415
|
|
|
416
|
+
def _parse_item_sourcing(data: object) -> ItemSourcing | None | Unset:
|
|
417
|
+
if data is None:
|
|
418
|
+
return data
|
|
419
|
+
if isinstance(data, Unset):
|
|
420
|
+
return data
|
|
421
|
+
try:
|
|
422
|
+
if not isinstance(data, dict):
|
|
423
|
+
raise TypeError()
|
|
424
|
+
item_sourcing_type_0 = ItemSourcing.from_dict(data)
|
|
425
|
+
|
|
426
|
+
return item_sourcing_type_0
|
|
427
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
428
|
+
pass
|
|
429
|
+
return cast(ItemSourcing | None | Unset, data)
|
|
430
|
+
|
|
431
|
+
item_sourcing = _parse_item_sourcing(d.pop("item_sourcing", UNSET))
|
|
432
|
+
|
|
382
433
|
def _parse_uom(data: object) -> None | UnitOfMeasure | Unset:
|
|
383
434
|
if data is None:
|
|
384
435
|
return data
|
|
@@ -407,6 +458,7 @@ class CostRule:
|
|
|
407
458
|
is_active=is_active,
|
|
408
459
|
created_at=created_at,
|
|
409
460
|
updated_at=updated_at,
|
|
461
|
+
item_sourcing_id=item_sourcing_id,
|
|
410
462
|
name=name,
|
|
411
463
|
uom_id=uom_id,
|
|
412
464
|
min_quantity=min_quantity,
|
|
@@ -418,6 +470,7 @@ class CostRule:
|
|
|
418
470
|
ext_data=ext_data,
|
|
419
471
|
project=project,
|
|
420
472
|
cost_list=cost_list,
|
|
473
|
+
item_sourcing=item_sourcing,
|
|
421
474
|
uom=uom,
|
|
422
475
|
)
|
|
423
476
|
|
|
@@ -7,6 +7,8 @@ from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
|
7
7
|
from attrs import define as _attrs_define
|
|
8
8
|
from attrs import field as _attrs_field
|
|
9
9
|
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
10
12
|
if TYPE_CHECKING:
|
|
11
13
|
from ..models.cost_rule_response_ext_data_type_0 import CostRuleResponseExtDataType0
|
|
12
14
|
from ..models.cost_rule_response_item_match import CostRuleResponseItemMatch
|
|
@@ -39,6 +41,7 @@ class CostRuleResponse:
|
|
|
39
41
|
ext_data (CostRuleResponseExtDataType0 | None):
|
|
40
42
|
created_at (datetime.datetime):
|
|
41
43
|
updated_at (datetime.datetime):
|
|
44
|
+
item_sourcing_id (None | str | Unset):
|
|
42
45
|
"""
|
|
43
46
|
|
|
44
47
|
id: str
|
|
@@ -60,6 +63,7 @@ class CostRuleResponse:
|
|
|
60
63
|
ext_data: CostRuleResponseExtDataType0 | None
|
|
61
64
|
created_at: datetime.datetime
|
|
62
65
|
updated_at: datetime.datetime
|
|
66
|
+
item_sourcing_id: None | str | Unset = UNSET
|
|
63
67
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
64
68
|
|
|
65
69
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -121,6 +125,12 @@ class CostRuleResponse:
|
|
|
121
125
|
|
|
122
126
|
updated_at = self.updated_at.isoformat()
|
|
123
127
|
|
|
128
|
+
item_sourcing_id: None | str | Unset
|
|
129
|
+
if isinstance(self.item_sourcing_id, Unset):
|
|
130
|
+
item_sourcing_id = UNSET
|
|
131
|
+
else:
|
|
132
|
+
item_sourcing_id = self.item_sourcing_id
|
|
133
|
+
|
|
124
134
|
field_dict: dict[str, Any] = {}
|
|
125
135
|
field_dict.update(self.additional_properties)
|
|
126
136
|
field_dict.update(
|
|
@@ -146,6 +156,8 @@ class CostRuleResponse:
|
|
|
146
156
|
"updated_at": updated_at,
|
|
147
157
|
}
|
|
148
158
|
)
|
|
159
|
+
if item_sourcing_id is not UNSET:
|
|
160
|
+
field_dict["item_sourcing_id"] = item_sourcing_id
|
|
149
161
|
|
|
150
162
|
return field_dict
|
|
151
163
|
|
|
@@ -263,6 +275,15 @@ class CostRuleResponse:
|
|
|
263
275
|
|
|
264
276
|
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
265
277
|
|
|
278
|
+
def _parse_item_sourcing_id(data: object) -> None | str | Unset:
|
|
279
|
+
if data is None:
|
|
280
|
+
return data
|
|
281
|
+
if isinstance(data, Unset):
|
|
282
|
+
return data
|
|
283
|
+
return cast(None | str | Unset, data)
|
|
284
|
+
|
|
285
|
+
item_sourcing_id = _parse_item_sourcing_id(d.pop("item_sourcing_id", UNSET))
|
|
286
|
+
|
|
266
287
|
cost_rule_response = cls(
|
|
267
288
|
id=id,
|
|
268
289
|
project_id=project_id,
|
|
@@ -283,6 +304,7 @@ class CostRuleResponse:
|
|
|
283
304
|
ext_data=ext_data,
|
|
284
305
|
created_at=created_at,
|
|
285
306
|
updated_at=updated_at,
|
|
307
|
+
item_sourcing_id=item_sourcing_id,
|
|
286
308
|
)
|
|
287
309
|
|
|
288
310
|
cost_rule_response.additional_properties = d
|
|
@@ -20,13 +20,13 @@ class CreateCostListRequest:
|
|
|
20
20
|
"""
|
|
21
21
|
Attributes:
|
|
22
22
|
name (str):
|
|
23
|
-
currency (str
|
|
23
|
+
currency (str):
|
|
24
24
|
is_active (bool | Unset): Default: True.
|
|
25
25
|
ext_data (CreateCostListRequestExtDataType0 | None | Unset):
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
name: str
|
|
29
|
-
currency: str
|
|
29
|
+
currency: str
|
|
30
30
|
is_active: bool | Unset = True
|
|
31
31
|
ext_data: CreateCostListRequestExtDataType0 | None | Unset = UNSET
|
|
32
32
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -53,10 +53,9 @@ class CreateCostListRequest:
|
|
|
53
53
|
field_dict.update(
|
|
54
54
|
{
|
|
55
55
|
"name": name,
|
|
56
|
+
"currency": currency,
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
|
-
if currency is not UNSET:
|
|
59
|
-
field_dict["currency"] = currency
|
|
60
59
|
if is_active is not UNSET:
|
|
61
60
|
field_dict["is_active"] = is_active
|
|
62
61
|
if ext_data is not UNSET:
|
|
@@ -71,7 +70,7 @@ class CreateCostListRequest:
|
|
|
71
70
|
d = dict(src_dict)
|
|
72
71
|
name = d.pop("name")
|
|
73
72
|
|
|
74
|
-
currency = d.pop("currency"
|
|
73
|
+
currency = d.pop("currency")
|
|
75
74
|
|
|
76
75
|
is_active = d.pop("is_active", UNSET)
|
|
77
76
|
|
|
@@ -0,0 +1,116 @@
|
|
|
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.create_cost_list_vendor_assignment_request_ext_data_type_0 import (
|
|
13
|
+
CreateCostListVendorAssignmentRequestExtDataType0,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="CreateCostListVendorAssignmentRequest")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class CreateCostListVendorAssignmentRequest:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
vendor_id (str):
|
|
25
|
+
is_active (bool | Unset): Default: True.
|
|
26
|
+
ext_data (CreateCostListVendorAssignmentRequestExtDataType0 | None | Unset):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
vendor_id: str
|
|
30
|
+
is_active: bool | Unset = True
|
|
31
|
+
ext_data: CreateCostListVendorAssignmentRequestExtDataType0 | None | Unset = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
from ..models.create_cost_list_vendor_assignment_request_ext_data_type_0 import (
|
|
36
|
+
CreateCostListVendorAssignmentRequestExtDataType0,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
vendor_id = self.vendor_id
|
|
40
|
+
|
|
41
|
+
is_active = self.is_active
|
|
42
|
+
|
|
43
|
+
ext_data: dict[str, Any] | None | Unset
|
|
44
|
+
if isinstance(self.ext_data, Unset):
|
|
45
|
+
ext_data = UNSET
|
|
46
|
+
elif isinstance(self.ext_data, CreateCostListVendorAssignmentRequestExtDataType0):
|
|
47
|
+
ext_data = self.ext_data.to_dict()
|
|
48
|
+
else:
|
|
49
|
+
ext_data = self.ext_data
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update(
|
|
54
|
+
{
|
|
55
|
+
"vendor_id": vendor_id,
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
if is_active is not UNSET:
|
|
59
|
+
field_dict["is_active"] = is_active
|
|
60
|
+
if ext_data is not UNSET:
|
|
61
|
+
field_dict["ext_data"] = ext_data
|
|
62
|
+
|
|
63
|
+
return field_dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
67
|
+
from ..models.create_cost_list_vendor_assignment_request_ext_data_type_0 import (
|
|
68
|
+
CreateCostListVendorAssignmentRequestExtDataType0,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
vendor_id = d.pop("vendor_id")
|
|
73
|
+
|
|
74
|
+
is_active = d.pop("is_active", UNSET)
|
|
75
|
+
|
|
76
|
+
def _parse_ext_data(data: object) -> CreateCostListVendorAssignmentRequestExtDataType0 | None | Unset:
|
|
77
|
+
if data is None:
|
|
78
|
+
return data
|
|
79
|
+
if isinstance(data, Unset):
|
|
80
|
+
return data
|
|
81
|
+
try:
|
|
82
|
+
if not isinstance(data, dict):
|
|
83
|
+
raise TypeError()
|
|
84
|
+
ext_data_type_0 = CreateCostListVendorAssignmentRequestExtDataType0.from_dict(data)
|
|
85
|
+
|
|
86
|
+
return ext_data_type_0
|
|
87
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
88
|
+
pass
|
|
89
|
+
return cast(CreateCostListVendorAssignmentRequestExtDataType0 | None | Unset, data)
|
|
90
|
+
|
|
91
|
+
ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
|
|
92
|
+
|
|
93
|
+
create_cost_list_vendor_assignment_request = cls(
|
|
94
|
+
vendor_id=vendor_id,
|
|
95
|
+
is_active=is_active,
|
|
96
|
+
ext_data=ext_data,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
create_cost_list_vendor_assignment_request.additional_properties = d
|
|
100
|
+
return create_cost_list_vendor_assignment_request
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def additional_keys(self) -> list[str]:
|
|
104
|
+
return list(self.additional_properties.keys())
|
|
105
|
+
|
|
106
|
+
def __getitem__(self, key: str) -> Any:
|
|
107
|
+
return self.additional_properties[key]
|
|
108
|
+
|
|
109
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
110
|
+
self.additional_properties[key] = value
|
|
111
|
+
|
|
112
|
+
def __delitem__(self, key: str) -> None:
|
|
113
|
+
del self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __contains__(self, key: str) -> bool:
|
|
116
|
+
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="CreateCostListVendorAssignmentRequestExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreateCostListVendorAssignmentRequestExtDataType0:
|
|
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
|
+
create_cost_list_vendor_assignment_request_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
create_cost_list_vendor_assignment_request_ext_data_type_0.additional_properties = d
|
|
31
|
+
return create_cost_list_vendor_assignment_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
|
|
@@ -25,6 +25,7 @@ class CreateCustomerRequest:
|
|
|
25
25
|
phone (None | str | Unset):
|
|
26
26
|
currency (str | Unset): Default: 'USD'.
|
|
27
27
|
payment_term_id (None | str | Unset):
|
|
28
|
+
sales_rep_id (None | str | Unset):
|
|
28
29
|
default_billing_address_entry_id (None | str | Unset):
|
|
29
30
|
default_shipping_address_entry_id (None | str | Unset):
|
|
30
31
|
credit_limit (float | None | Unset):
|
|
@@ -37,6 +38,7 @@ class CreateCustomerRequest:
|
|
|
37
38
|
phone: None | str | Unset = UNSET
|
|
38
39
|
currency: str | Unset = "USD"
|
|
39
40
|
payment_term_id: None | str | Unset = UNSET
|
|
41
|
+
sales_rep_id: None | str | Unset = UNSET
|
|
40
42
|
default_billing_address_entry_id: None | str | Unset = UNSET
|
|
41
43
|
default_shipping_address_entry_id: None | str | Unset = UNSET
|
|
42
44
|
credit_limit: float | None | Unset = UNSET
|
|
@@ -70,6 +72,12 @@ class CreateCustomerRequest:
|
|
|
70
72
|
else:
|
|
71
73
|
payment_term_id = self.payment_term_id
|
|
72
74
|
|
|
75
|
+
sales_rep_id: None | str | Unset
|
|
76
|
+
if isinstance(self.sales_rep_id, Unset):
|
|
77
|
+
sales_rep_id = UNSET
|
|
78
|
+
else:
|
|
79
|
+
sales_rep_id = self.sales_rep_id
|
|
80
|
+
|
|
73
81
|
default_billing_address_entry_id: None | str | Unset
|
|
74
82
|
if isinstance(self.default_billing_address_entry_id, Unset):
|
|
75
83
|
default_billing_address_entry_id = UNSET
|
|
@@ -112,6 +120,8 @@ class CreateCustomerRequest:
|
|
|
112
120
|
field_dict["currency"] = currency
|
|
113
121
|
if payment_term_id is not UNSET:
|
|
114
122
|
field_dict["payment_term_id"] = payment_term_id
|
|
123
|
+
if sales_rep_id is not UNSET:
|
|
124
|
+
field_dict["sales_rep_id"] = sales_rep_id
|
|
115
125
|
if default_billing_address_entry_id is not UNSET:
|
|
116
126
|
field_dict["default_billing_address_entry_id"] = default_billing_address_entry_id
|
|
117
127
|
if default_shipping_address_entry_id is not UNSET:
|
|
@@ -161,6 +171,15 @@ class CreateCustomerRequest:
|
|
|
161
171
|
|
|
162
172
|
payment_term_id = _parse_payment_term_id(d.pop("payment_term_id", UNSET))
|
|
163
173
|
|
|
174
|
+
def _parse_sales_rep_id(data: object) -> None | str | Unset:
|
|
175
|
+
if data is None:
|
|
176
|
+
return data
|
|
177
|
+
if isinstance(data, Unset):
|
|
178
|
+
return data
|
|
179
|
+
return cast(None | str | Unset, data)
|
|
180
|
+
|
|
181
|
+
sales_rep_id = _parse_sales_rep_id(d.pop("sales_rep_id", UNSET))
|
|
182
|
+
|
|
164
183
|
def _parse_default_billing_address_entry_id(data: object) -> None | str | Unset:
|
|
165
184
|
if data is None:
|
|
166
185
|
return data
|
|
@@ -216,6 +235,7 @@ class CreateCustomerRequest:
|
|
|
216
235
|
phone=phone,
|
|
217
236
|
currency=currency,
|
|
218
237
|
payment_term_id=payment_term_id,
|
|
238
|
+
sales_rep_id=sales_rep_id,
|
|
219
239
|
default_billing_address_entry_id=default_billing_address_entry_id,
|
|
220
240
|
default_shipping_address_entry_id=default_shipping_address_entry_id,
|
|
221
241
|
credit_limit=credit_limit,
|