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,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_price_list_customer_assignment_request_ext_data_type_0 import (
|
|
13
|
+
CreatePriceListCustomerAssignmentRequestExtDataType0,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="CreatePriceListCustomerAssignmentRequest")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class CreatePriceListCustomerAssignmentRequest:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
customer_id (str):
|
|
25
|
+
is_active (bool | Unset): Default: True.
|
|
26
|
+
ext_data (CreatePriceListCustomerAssignmentRequestExtDataType0 | None | Unset):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
customer_id: str
|
|
30
|
+
is_active: bool | Unset = True
|
|
31
|
+
ext_data: CreatePriceListCustomerAssignmentRequestExtDataType0 | 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_price_list_customer_assignment_request_ext_data_type_0 import (
|
|
36
|
+
CreatePriceListCustomerAssignmentRequestExtDataType0,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
customer_id = self.customer_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, CreatePriceListCustomerAssignmentRequestExtDataType0):
|
|
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
|
+
"customer_id": customer_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_price_list_customer_assignment_request_ext_data_type_0 import (
|
|
68
|
+
CreatePriceListCustomerAssignmentRequestExtDataType0,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
customer_id = d.pop("customer_id")
|
|
73
|
+
|
|
74
|
+
is_active = d.pop("is_active", UNSET)
|
|
75
|
+
|
|
76
|
+
def _parse_ext_data(data: object) -> CreatePriceListCustomerAssignmentRequestExtDataType0 | 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 = CreatePriceListCustomerAssignmentRequestExtDataType0.from_dict(data)
|
|
85
|
+
|
|
86
|
+
return ext_data_type_0
|
|
87
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
88
|
+
pass
|
|
89
|
+
return cast(CreatePriceListCustomerAssignmentRequestExtDataType0 | None | Unset, data)
|
|
90
|
+
|
|
91
|
+
ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
|
|
92
|
+
|
|
93
|
+
create_price_list_customer_assignment_request = cls(
|
|
94
|
+
customer_id=customer_id,
|
|
95
|
+
is_active=is_active,
|
|
96
|
+
ext_data=ext_data,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
create_price_list_customer_assignment_request.additional_properties = d
|
|
100
|
+
return create_price_list_customer_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="CreatePriceListCustomerAssignmentRequestExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreatePriceListCustomerAssignmentRequestExtDataType0:
|
|
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_price_list_customer_assignment_request_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
create_price_list_customer_assignment_request_ext_data_type_0.additional_properties = d
|
|
31
|
+
return create_price_list_customer_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
|
|
@@ -20,13 +20,13 @@ class CreatePriceListRequest:
|
|
|
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 (CreatePriceListRequestExtDataType0 | 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: CreatePriceListRequestExtDataType0 | None | Unset = UNSET
|
|
32
32
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
@@ -53,10 +53,9 @@ class CreatePriceListRequest:
|
|
|
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 CreatePriceListRequest:
|
|
|
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
|
|
|
@@ -21,9 +21,10 @@ class CreateSalesOrderLineRequest:
|
|
|
21
21
|
Attributes:
|
|
22
22
|
description (str):
|
|
23
23
|
quantity (float):
|
|
24
|
-
unit_price (float):
|
|
25
24
|
inventory_item_id (None | str | Unset):
|
|
26
25
|
sku (None | str | Unset):
|
|
26
|
+
notes (None | str | Unset):
|
|
27
|
+
unit_price (float | None | Unset):
|
|
27
28
|
extended_price (float | Unset): Default: 0.0.
|
|
28
29
|
quantity_fulfilled (float | Unset): Default: 0.0.
|
|
29
30
|
ext_data (CreateSalesOrderLineRequestExtDataType0 | None | Unset):
|
|
@@ -31,9 +32,10 @@ class CreateSalesOrderLineRequest:
|
|
|
31
32
|
|
|
32
33
|
description: str
|
|
33
34
|
quantity: float
|
|
34
|
-
unit_price: float
|
|
35
35
|
inventory_item_id: None | str | Unset = UNSET
|
|
36
36
|
sku: None | str | Unset = UNSET
|
|
37
|
+
notes: None | str | Unset = UNSET
|
|
38
|
+
unit_price: float | None | Unset = UNSET
|
|
37
39
|
extended_price: float | Unset = 0.0
|
|
38
40
|
quantity_fulfilled: float | Unset = 0.0
|
|
39
41
|
ext_data: CreateSalesOrderLineRequestExtDataType0 | None | Unset = UNSET
|
|
@@ -46,8 +48,6 @@ class CreateSalesOrderLineRequest:
|
|
|
46
48
|
|
|
47
49
|
quantity = self.quantity
|
|
48
50
|
|
|
49
|
-
unit_price = self.unit_price
|
|
50
|
-
|
|
51
51
|
inventory_item_id: None | str | Unset
|
|
52
52
|
if isinstance(self.inventory_item_id, Unset):
|
|
53
53
|
inventory_item_id = UNSET
|
|
@@ -60,6 +60,18 @@ class CreateSalesOrderLineRequest:
|
|
|
60
60
|
else:
|
|
61
61
|
sku = self.sku
|
|
62
62
|
|
|
63
|
+
notes: None | str | Unset
|
|
64
|
+
if isinstance(self.notes, Unset):
|
|
65
|
+
notes = UNSET
|
|
66
|
+
else:
|
|
67
|
+
notes = self.notes
|
|
68
|
+
|
|
69
|
+
unit_price: float | None | Unset
|
|
70
|
+
if isinstance(self.unit_price, Unset):
|
|
71
|
+
unit_price = UNSET
|
|
72
|
+
else:
|
|
73
|
+
unit_price = self.unit_price
|
|
74
|
+
|
|
63
75
|
extended_price = self.extended_price
|
|
64
76
|
|
|
65
77
|
quantity_fulfilled = self.quantity_fulfilled
|
|
@@ -78,13 +90,16 @@ class CreateSalesOrderLineRequest:
|
|
|
78
90
|
{
|
|
79
91
|
"description": description,
|
|
80
92
|
"quantity": quantity,
|
|
81
|
-
"unit_price": unit_price,
|
|
82
93
|
}
|
|
83
94
|
)
|
|
84
95
|
if inventory_item_id is not UNSET:
|
|
85
96
|
field_dict["inventory_item_id"] = inventory_item_id
|
|
86
97
|
if sku is not UNSET:
|
|
87
98
|
field_dict["sku"] = sku
|
|
99
|
+
if notes is not UNSET:
|
|
100
|
+
field_dict["notes"] = notes
|
|
101
|
+
if unit_price is not UNSET:
|
|
102
|
+
field_dict["unit_price"] = unit_price
|
|
88
103
|
if extended_price is not UNSET:
|
|
89
104
|
field_dict["extended_price"] = extended_price
|
|
90
105
|
if quantity_fulfilled is not UNSET:
|
|
@@ -103,8 +118,6 @@ class CreateSalesOrderLineRequest:
|
|
|
103
118
|
|
|
104
119
|
quantity = d.pop("quantity")
|
|
105
120
|
|
|
106
|
-
unit_price = d.pop("unit_price")
|
|
107
|
-
|
|
108
121
|
def _parse_inventory_item_id(data: object) -> None | str | Unset:
|
|
109
122
|
if data is None:
|
|
110
123
|
return data
|
|
@@ -123,6 +136,24 @@ class CreateSalesOrderLineRequest:
|
|
|
123
136
|
|
|
124
137
|
sku = _parse_sku(d.pop("sku", UNSET))
|
|
125
138
|
|
|
139
|
+
def _parse_notes(data: object) -> None | str | Unset:
|
|
140
|
+
if data is None:
|
|
141
|
+
return data
|
|
142
|
+
if isinstance(data, Unset):
|
|
143
|
+
return data
|
|
144
|
+
return cast(None | str | Unset, data)
|
|
145
|
+
|
|
146
|
+
notes = _parse_notes(d.pop("notes", UNSET))
|
|
147
|
+
|
|
148
|
+
def _parse_unit_price(data: object) -> float | None | Unset:
|
|
149
|
+
if data is None:
|
|
150
|
+
return data
|
|
151
|
+
if isinstance(data, Unset):
|
|
152
|
+
return data
|
|
153
|
+
return cast(float | None | Unset, data)
|
|
154
|
+
|
|
155
|
+
unit_price = _parse_unit_price(d.pop("unit_price", UNSET))
|
|
156
|
+
|
|
126
157
|
extended_price = d.pop("extended_price", UNSET)
|
|
127
158
|
|
|
128
159
|
quantity_fulfilled = d.pop("quantity_fulfilled", UNSET)
|
|
@@ -147,9 +178,10 @@ class CreateSalesOrderLineRequest:
|
|
|
147
178
|
create_sales_order_line_request = cls(
|
|
148
179
|
description=description,
|
|
149
180
|
quantity=quantity,
|
|
150
|
-
unit_price=unit_price,
|
|
151
181
|
inventory_item_id=inventory_item_id,
|
|
152
182
|
sku=sku,
|
|
183
|
+
notes=notes,
|
|
184
|
+
unit_price=unit_price,
|
|
153
185
|
extended_price=extended_price,
|
|
154
186
|
quantity_fulfilled=quantity_fulfilled,
|
|
155
187
|
ext_data=ext_data,
|
|
@@ -24,6 +24,8 @@ class CreateSalesOrderRequest:
|
|
|
24
24
|
Attributes:
|
|
25
25
|
so_number (str):
|
|
26
26
|
customer_id (None | str | Unset):
|
|
27
|
+
sales_rep_id (None | str | Unset):
|
|
28
|
+
commission_rate_snapshot (float | None | str | Unset):
|
|
27
29
|
channel_id (None | str | Unset):
|
|
28
30
|
external_id (None | str | Unset):
|
|
29
31
|
lifecycle_status (CanonicalStatus | Unset):
|
|
@@ -40,6 +42,8 @@ class CreateSalesOrderRequest:
|
|
|
40
42
|
|
|
41
43
|
so_number: str
|
|
42
44
|
customer_id: None | str | Unset = UNSET
|
|
45
|
+
sales_rep_id: None | str | Unset = UNSET
|
|
46
|
+
commission_rate_snapshot: float | None | str | Unset = UNSET
|
|
43
47
|
channel_id: None | str | Unset = UNSET
|
|
44
48
|
external_id: None | str | Unset = UNSET
|
|
45
49
|
lifecycle_status: CanonicalStatus | Unset = UNSET
|
|
@@ -65,6 +69,18 @@ class CreateSalesOrderRequest:
|
|
|
65
69
|
else:
|
|
66
70
|
customer_id = self.customer_id
|
|
67
71
|
|
|
72
|
+
sales_rep_id: None | str | Unset
|
|
73
|
+
if isinstance(self.sales_rep_id, Unset):
|
|
74
|
+
sales_rep_id = UNSET
|
|
75
|
+
else:
|
|
76
|
+
sales_rep_id = self.sales_rep_id
|
|
77
|
+
|
|
78
|
+
commission_rate_snapshot: float | None | str | Unset
|
|
79
|
+
if isinstance(self.commission_rate_snapshot, Unset):
|
|
80
|
+
commission_rate_snapshot = UNSET
|
|
81
|
+
else:
|
|
82
|
+
commission_rate_snapshot = self.commission_rate_snapshot
|
|
83
|
+
|
|
68
84
|
channel_id: None | str | Unset
|
|
69
85
|
if isinstance(self.channel_id, Unset):
|
|
70
86
|
channel_id = UNSET
|
|
@@ -147,6 +163,10 @@ class CreateSalesOrderRequest:
|
|
|
147
163
|
)
|
|
148
164
|
if customer_id is not UNSET:
|
|
149
165
|
field_dict["customer_id"] = customer_id
|
|
166
|
+
if sales_rep_id is not UNSET:
|
|
167
|
+
field_dict["sales_rep_id"] = sales_rep_id
|
|
168
|
+
if commission_rate_snapshot is not UNSET:
|
|
169
|
+
field_dict["commission_rate_snapshot"] = commission_rate_snapshot
|
|
150
170
|
if channel_id is not UNSET:
|
|
151
171
|
field_dict["channel_id"] = channel_id
|
|
152
172
|
if external_id is not UNSET:
|
|
@@ -191,6 +211,24 @@ class CreateSalesOrderRequest:
|
|
|
191
211
|
|
|
192
212
|
customer_id = _parse_customer_id(d.pop("customer_id", UNSET))
|
|
193
213
|
|
|
214
|
+
def _parse_sales_rep_id(data: object) -> None | str | Unset:
|
|
215
|
+
if data is None:
|
|
216
|
+
return data
|
|
217
|
+
if isinstance(data, Unset):
|
|
218
|
+
return data
|
|
219
|
+
return cast(None | str | Unset, data)
|
|
220
|
+
|
|
221
|
+
sales_rep_id = _parse_sales_rep_id(d.pop("sales_rep_id", UNSET))
|
|
222
|
+
|
|
223
|
+
def _parse_commission_rate_snapshot(data: object) -> float | None | str | Unset:
|
|
224
|
+
if data is None:
|
|
225
|
+
return data
|
|
226
|
+
if isinstance(data, Unset):
|
|
227
|
+
return data
|
|
228
|
+
return cast(float | None | str | Unset, data)
|
|
229
|
+
|
|
230
|
+
commission_rate_snapshot = _parse_commission_rate_snapshot(d.pop("commission_rate_snapshot", UNSET))
|
|
231
|
+
|
|
194
232
|
def _parse_channel_id(data: object) -> None | str | Unset:
|
|
195
233
|
if data is None:
|
|
196
234
|
return data
|
|
@@ -317,6 +355,8 @@ class CreateSalesOrderRequest:
|
|
|
317
355
|
create_sales_order_request = cls(
|
|
318
356
|
so_number=so_number,
|
|
319
357
|
customer_id=customer_id,
|
|
358
|
+
sales_rep_id=sales_rep_id,
|
|
359
|
+
commission_rate_snapshot=commission_rate_snapshot,
|
|
320
360
|
channel_id=channel_id,
|
|
321
361
|
external_id=external_id,
|
|
322
362
|
lifecycle_status=lifecycle_status,
|
|
@@ -0,0 +1,181 @@
|
|
|
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_sales_rep_request_ext_data_type_0 import CreateSalesRepRequestExtDataType0
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="CreateSalesRepRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class CreateSalesRepRequest:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
code (str):
|
|
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
|
+
ext_data (CreateSalesRepRequestExtDataType0 | None | Unset):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
code: str
|
|
31
|
+
name: None | str | Unset = UNSET
|
|
32
|
+
email: None | str | Unset = UNSET
|
|
33
|
+
user_id: None | str | Unset = UNSET
|
|
34
|
+
default_commission_rate: float | None | str | Unset = UNSET
|
|
35
|
+
ext_data: CreateSalesRepRequestExtDataType0 | None | Unset = UNSET
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
from ..models.create_sales_rep_request_ext_data_type_0 import CreateSalesRepRequestExtDataType0
|
|
40
|
+
|
|
41
|
+
code = self.code
|
|
42
|
+
|
|
43
|
+
name: None | str | Unset
|
|
44
|
+
if isinstance(self.name, Unset):
|
|
45
|
+
name = UNSET
|
|
46
|
+
else:
|
|
47
|
+
name = self.name
|
|
48
|
+
|
|
49
|
+
email: None | str | Unset
|
|
50
|
+
if isinstance(self.email, Unset):
|
|
51
|
+
email = UNSET
|
|
52
|
+
else:
|
|
53
|
+
email = self.email
|
|
54
|
+
|
|
55
|
+
user_id: None | str | Unset
|
|
56
|
+
if isinstance(self.user_id, Unset):
|
|
57
|
+
user_id = UNSET
|
|
58
|
+
else:
|
|
59
|
+
user_id = self.user_id
|
|
60
|
+
|
|
61
|
+
default_commission_rate: float | None | str | Unset
|
|
62
|
+
if isinstance(self.default_commission_rate, Unset):
|
|
63
|
+
default_commission_rate = UNSET
|
|
64
|
+
else:
|
|
65
|
+
default_commission_rate = self.default_commission_rate
|
|
66
|
+
|
|
67
|
+
ext_data: dict[str, Any] | None | Unset
|
|
68
|
+
if isinstance(self.ext_data, Unset):
|
|
69
|
+
ext_data = UNSET
|
|
70
|
+
elif isinstance(self.ext_data, CreateSalesRepRequestExtDataType0):
|
|
71
|
+
ext_data = self.ext_data.to_dict()
|
|
72
|
+
else:
|
|
73
|
+
ext_data = self.ext_data
|
|
74
|
+
|
|
75
|
+
field_dict: dict[str, Any] = {}
|
|
76
|
+
field_dict.update(self.additional_properties)
|
|
77
|
+
field_dict.update(
|
|
78
|
+
{
|
|
79
|
+
"code": code,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
if name is not UNSET:
|
|
83
|
+
field_dict["name"] = name
|
|
84
|
+
if email is not UNSET:
|
|
85
|
+
field_dict["email"] = email
|
|
86
|
+
if user_id is not UNSET:
|
|
87
|
+
field_dict["user_id"] = user_id
|
|
88
|
+
if default_commission_rate is not UNSET:
|
|
89
|
+
field_dict["default_commission_rate"] = default_commission_rate
|
|
90
|
+
if ext_data is not UNSET:
|
|
91
|
+
field_dict["ext_data"] = ext_data
|
|
92
|
+
|
|
93
|
+
return field_dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
from ..models.create_sales_rep_request_ext_data_type_0 import CreateSalesRepRequestExtDataType0
|
|
98
|
+
|
|
99
|
+
d = dict(src_dict)
|
|
100
|
+
code = d.pop("code")
|
|
101
|
+
|
|
102
|
+
def _parse_name(data: object) -> None | str | Unset:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
if isinstance(data, Unset):
|
|
106
|
+
return data
|
|
107
|
+
return cast(None | str | Unset, data)
|
|
108
|
+
|
|
109
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
110
|
+
|
|
111
|
+
def _parse_email(data: object) -> None | str | Unset:
|
|
112
|
+
if data is None:
|
|
113
|
+
return data
|
|
114
|
+
if isinstance(data, Unset):
|
|
115
|
+
return data
|
|
116
|
+
return cast(None | str | Unset, data)
|
|
117
|
+
|
|
118
|
+
email = _parse_email(d.pop("email", UNSET))
|
|
119
|
+
|
|
120
|
+
def _parse_user_id(data: object) -> None | str | Unset:
|
|
121
|
+
if data is None:
|
|
122
|
+
return data
|
|
123
|
+
if isinstance(data, Unset):
|
|
124
|
+
return data
|
|
125
|
+
return cast(None | str | Unset, data)
|
|
126
|
+
|
|
127
|
+
user_id = _parse_user_id(d.pop("user_id", UNSET))
|
|
128
|
+
|
|
129
|
+
def _parse_default_commission_rate(data: object) -> float | None | str | Unset:
|
|
130
|
+
if data is None:
|
|
131
|
+
return data
|
|
132
|
+
if isinstance(data, Unset):
|
|
133
|
+
return data
|
|
134
|
+
return cast(float | None | str | Unset, data)
|
|
135
|
+
|
|
136
|
+
default_commission_rate = _parse_default_commission_rate(d.pop("default_commission_rate", UNSET))
|
|
137
|
+
|
|
138
|
+
def _parse_ext_data(data: object) -> CreateSalesRepRequestExtDataType0 | None | Unset:
|
|
139
|
+
if data is None:
|
|
140
|
+
return data
|
|
141
|
+
if isinstance(data, Unset):
|
|
142
|
+
return data
|
|
143
|
+
try:
|
|
144
|
+
if not isinstance(data, dict):
|
|
145
|
+
raise TypeError()
|
|
146
|
+
ext_data_type_0 = CreateSalesRepRequestExtDataType0.from_dict(data)
|
|
147
|
+
|
|
148
|
+
return ext_data_type_0
|
|
149
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
150
|
+
pass
|
|
151
|
+
return cast(CreateSalesRepRequestExtDataType0 | None | Unset, data)
|
|
152
|
+
|
|
153
|
+
ext_data = _parse_ext_data(d.pop("ext_data", UNSET))
|
|
154
|
+
|
|
155
|
+
create_sales_rep_request = cls(
|
|
156
|
+
code=code,
|
|
157
|
+
name=name,
|
|
158
|
+
email=email,
|
|
159
|
+
user_id=user_id,
|
|
160
|
+
default_commission_rate=default_commission_rate,
|
|
161
|
+
ext_data=ext_data,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
create_sales_rep_request.additional_properties = d
|
|
165
|
+
return create_sales_rep_request
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def additional_keys(self) -> list[str]:
|
|
169
|
+
return list(self.additional_properties.keys())
|
|
170
|
+
|
|
171
|
+
def __getitem__(self, key: str) -> Any:
|
|
172
|
+
return self.additional_properties[key]
|
|
173
|
+
|
|
174
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
175
|
+
self.additional_properties[key] = value
|
|
176
|
+
|
|
177
|
+
def __delitem__(self, key: str) -> None:
|
|
178
|
+
del self.additional_properties[key]
|
|
179
|
+
|
|
180
|
+
def __contains__(self, key: str) -> bool:
|
|
181
|
+
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="CreateSalesRepRequestExtDataType0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreateSalesRepRequestExtDataType0:
|
|
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_sales_rep_request_ext_data_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
create_sales_rep_request_ext_data_type_0.additional_properties = d
|
|
31
|
+
return create_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
|