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,166 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.item_sourcing_options_response import ItemSourcingOptionsResponse
|
|
10
|
+
from ...types import UNSET, Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
project_id: str,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
|
|
18
|
+
params: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
params["projectId"] = project_id
|
|
21
|
+
|
|
22
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
23
|
+
|
|
24
|
+
_kwargs: dict[str, Any] = {
|
|
25
|
+
"method": "get",
|
|
26
|
+
"url": "/v1/apps/purchasing/item-sourcing/options",
|
|
27
|
+
"params": params,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> HTTPValidationError | ItemSourcingOptionsResponse | None:
|
|
36
|
+
if response.status_code == 200:
|
|
37
|
+
response_200 = ItemSourcingOptionsResponse.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_200
|
|
40
|
+
|
|
41
|
+
if response.status_code == 422:
|
|
42
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_422
|
|
45
|
+
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[HTTPValidationError | ItemSourcingOptionsResponse]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient | Client,
|
|
66
|
+
project_id: str,
|
|
67
|
+
) -> Response[HTTPValidationError | ItemSourcingOptionsResponse]:
|
|
68
|
+
"""Get Item Sourcing Options
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
project_id (str):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[HTTPValidationError | ItemSourcingOptionsResponse]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
kwargs = _get_kwargs(
|
|
82
|
+
project_id=project_id,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = client.get_httpx_client().request(
|
|
86
|
+
**kwargs,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def sync(
|
|
93
|
+
*,
|
|
94
|
+
client: AuthenticatedClient | Client,
|
|
95
|
+
project_id: str,
|
|
96
|
+
) -> HTTPValidationError | ItemSourcingOptionsResponse | None:
|
|
97
|
+
"""Get Item Sourcing Options
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
project_id (str):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
HTTPValidationError | ItemSourcingOptionsResponse
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
return sync_detailed(
|
|
111
|
+
client=client,
|
|
112
|
+
project_id=project_id,
|
|
113
|
+
).parsed
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
async def asyncio_detailed(
|
|
117
|
+
*,
|
|
118
|
+
client: AuthenticatedClient | Client,
|
|
119
|
+
project_id: str,
|
|
120
|
+
) -> Response[HTTPValidationError | ItemSourcingOptionsResponse]:
|
|
121
|
+
"""Get Item Sourcing Options
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
project_id (str):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[HTTPValidationError | ItemSourcingOptionsResponse]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
project_id=project_id,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
+
|
|
140
|
+
return _build_response(client=client, response=response)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio(
|
|
144
|
+
*,
|
|
145
|
+
client: AuthenticatedClient | Client,
|
|
146
|
+
project_id: str,
|
|
147
|
+
) -> HTTPValidationError | ItemSourcingOptionsResponse | None:
|
|
148
|
+
"""Get Item Sourcing Options
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
project_id (str):
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
|
+
|
|
157
|
+
Returns:
|
|
158
|
+
HTTPValidationError | ItemSourcingOptionsResponse
|
|
159
|
+
"""
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
await asyncio_detailed(
|
|
163
|
+
client=client,
|
|
164
|
+
project_id=project_id,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.list_item_sourcing_response import ListItemSourcingResponse
|
|
10
|
+
from ...models.purchasing_list_item_sourcing_filter_operator_type_0 import PurchasingListItemSourcingFilterOperatorType0
|
|
11
|
+
from ...models.purchasing_list_item_sourcing_sort_direction_type_0 import PurchasingListItemSourcingSortDirectionType0
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
inventory_item_id: None | str | Unset = UNSET,
|
|
18
|
+
vendor_id: None | str | Unset = UNSET,
|
|
19
|
+
is_active: bool | None | Unset = UNSET,
|
|
20
|
+
search: None | str | Unset = UNSET,
|
|
21
|
+
sort_by: None | str | Unset = UNSET,
|
|
22
|
+
sort_direction: None | PurchasingListItemSourcingSortDirectionType0 | Unset = UNSET,
|
|
23
|
+
filter_column: None | str | Unset = UNSET,
|
|
24
|
+
filter_operator: None | PurchasingListItemSourcingFilterOperatorType0 | Unset = UNSET,
|
|
25
|
+
filter_value: None | str | Unset = UNSET,
|
|
26
|
+
limit: int | Unset = 100,
|
|
27
|
+
offset: int | Unset = 0,
|
|
28
|
+
project_id: str,
|
|
29
|
+
) -> dict[str, Any]:
|
|
30
|
+
|
|
31
|
+
params: dict[str, Any] = {}
|
|
32
|
+
|
|
33
|
+
json_inventory_item_id: None | str | Unset
|
|
34
|
+
if isinstance(inventory_item_id, Unset):
|
|
35
|
+
json_inventory_item_id = UNSET
|
|
36
|
+
else:
|
|
37
|
+
json_inventory_item_id = inventory_item_id
|
|
38
|
+
params["inventory_item_id"] = json_inventory_item_id
|
|
39
|
+
|
|
40
|
+
json_vendor_id: None | str | Unset
|
|
41
|
+
if isinstance(vendor_id, Unset):
|
|
42
|
+
json_vendor_id = UNSET
|
|
43
|
+
else:
|
|
44
|
+
json_vendor_id = vendor_id
|
|
45
|
+
params["vendor_id"] = json_vendor_id
|
|
46
|
+
|
|
47
|
+
json_is_active: bool | None | Unset
|
|
48
|
+
if isinstance(is_active, Unset):
|
|
49
|
+
json_is_active = UNSET
|
|
50
|
+
else:
|
|
51
|
+
json_is_active = is_active
|
|
52
|
+
params["is_active"] = json_is_active
|
|
53
|
+
|
|
54
|
+
json_search: None | str | Unset
|
|
55
|
+
if isinstance(search, Unset):
|
|
56
|
+
json_search = UNSET
|
|
57
|
+
else:
|
|
58
|
+
json_search = search
|
|
59
|
+
params["search"] = json_search
|
|
60
|
+
|
|
61
|
+
json_sort_by: None | str | Unset
|
|
62
|
+
if isinstance(sort_by, Unset):
|
|
63
|
+
json_sort_by = UNSET
|
|
64
|
+
else:
|
|
65
|
+
json_sort_by = sort_by
|
|
66
|
+
params["sort_by"] = json_sort_by
|
|
67
|
+
|
|
68
|
+
json_sort_direction: None | str | Unset
|
|
69
|
+
if isinstance(sort_direction, Unset):
|
|
70
|
+
json_sort_direction = UNSET
|
|
71
|
+
elif isinstance(sort_direction, PurchasingListItemSourcingSortDirectionType0):
|
|
72
|
+
json_sort_direction = sort_direction.value
|
|
73
|
+
else:
|
|
74
|
+
json_sort_direction = sort_direction
|
|
75
|
+
params["sort_direction"] = json_sort_direction
|
|
76
|
+
|
|
77
|
+
json_filter_column: None | str | Unset
|
|
78
|
+
if isinstance(filter_column, Unset):
|
|
79
|
+
json_filter_column = UNSET
|
|
80
|
+
else:
|
|
81
|
+
json_filter_column = filter_column
|
|
82
|
+
params["filter_column"] = json_filter_column
|
|
83
|
+
|
|
84
|
+
json_filter_operator: None | str | Unset
|
|
85
|
+
if isinstance(filter_operator, Unset):
|
|
86
|
+
json_filter_operator = UNSET
|
|
87
|
+
elif isinstance(filter_operator, PurchasingListItemSourcingFilterOperatorType0):
|
|
88
|
+
json_filter_operator = filter_operator.value
|
|
89
|
+
else:
|
|
90
|
+
json_filter_operator = filter_operator
|
|
91
|
+
params["filter_operator"] = json_filter_operator
|
|
92
|
+
|
|
93
|
+
json_filter_value: None | str | Unset
|
|
94
|
+
if isinstance(filter_value, Unset):
|
|
95
|
+
json_filter_value = UNSET
|
|
96
|
+
else:
|
|
97
|
+
json_filter_value = filter_value
|
|
98
|
+
params["filter_value"] = json_filter_value
|
|
99
|
+
|
|
100
|
+
params["limit"] = limit
|
|
101
|
+
|
|
102
|
+
params["offset"] = offset
|
|
103
|
+
|
|
104
|
+
params["projectId"] = project_id
|
|
105
|
+
|
|
106
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
107
|
+
|
|
108
|
+
_kwargs: dict[str, Any] = {
|
|
109
|
+
"method": "get",
|
|
110
|
+
"url": "/v1/apps/purchasing/item-sourcing",
|
|
111
|
+
"params": params,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return _kwargs
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _parse_response(
|
|
118
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
119
|
+
) -> HTTPValidationError | ListItemSourcingResponse | None:
|
|
120
|
+
if response.status_code == 200:
|
|
121
|
+
response_200 = ListItemSourcingResponse.from_dict(response.json())
|
|
122
|
+
|
|
123
|
+
return response_200
|
|
124
|
+
|
|
125
|
+
if response.status_code == 422:
|
|
126
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
127
|
+
|
|
128
|
+
return response_422
|
|
129
|
+
|
|
130
|
+
if client.raise_on_unexpected_status:
|
|
131
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
132
|
+
else:
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def _build_response(
|
|
137
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
138
|
+
) -> Response[HTTPValidationError | ListItemSourcingResponse]:
|
|
139
|
+
return Response(
|
|
140
|
+
status_code=HTTPStatus(response.status_code),
|
|
141
|
+
content=response.content,
|
|
142
|
+
headers=response.headers,
|
|
143
|
+
parsed=_parse_response(client=client, response=response),
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def sync_detailed(
|
|
148
|
+
*,
|
|
149
|
+
client: AuthenticatedClient | Client,
|
|
150
|
+
inventory_item_id: None | str | Unset = UNSET,
|
|
151
|
+
vendor_id: None | str | Unset = UNSET,
|
|
152
|
+
is_active: bool | None | Unset = UNSET,
|
|
153
|
+
search: None | str | Unset = UNSET,
|
|
154
|
+
sort_by: None | str | Unset = UNSET,
|
|
155
|
+
sort_direction: None | PurchasingListItemSourcingSortDirectionType0 | Unset = UNSET,
|
|
156
|
+
filter_column: None | str | Unset = UNSET,
|
|
157
|
+
filter_operator: None | PurchasingListItemSourcingFilterOperatorType0 | Unset = UNSET,
|
|
158
|
+
filter_value: None | str | Unset = UNSET,
|
|
159
|
+
limit: int | Unset = 100,
|
|
160
|
+
offset: int | Unset = 0,
|
|
161
|
+
project_id: str,
|
|
162
|
+
) -> Response[HTTPValidationError | ListItemSourcingResponse]:
|
|
163
|
+
"""List Item Sourcing
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
inventory_item_id (None | str | Unset):
|
|
167
|
+
vendor_id (None | str | Unset):
|
|
168
|
+
is_active (bool | None | Unset):
|
|
169
|
+
search (None | str | Unset):
|
|
170
|
+
sort_by (None | str | Unset):
|
|
171
|
+
sort_direction (None | PurchasingListItemSourcingSortDirectionType0 | Unset):
|
|
172
|
+
filter_column (None | str | Unset):
|
|
173
|
+
filter_operator (None | PurchasingListItemSourcingFilterOperatorType0 | Unset):
|
|
174
|
+
filter_value (None | str | Unset):
|
|
175
|
+
limit (int | Unset): Default: 100.
|
|
176
|
+
offset (int | Unset): Default: 0.
|
|
177
|
+
project_id (str):
|
|
178
|
+
|
|
179
|
+
Raises:
|
|
180
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
181
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
Response[HTTPValidationError | ListItemSourcingResponse]
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
kwargs = _get_kwargs(
|
|
188
|
+
inventory_item_id=inventory_item_id,
|
|
189
|
+
vendor_id=vendor_id,
|
|
190
|
+
is_active=is_active,
|
|
191
|
+
search=search,
|
|
192
|
+
sort_by=sort_by,
|
|
193
|
+
sort_direction=sort_direction,
|
|
194
|
+
filter_column=filter_column,
|
|
195
|
+
filter_operator=filter_operator,
|
|
196
|
+
filter_value=filter_value,
|
|
197
|
+
limit=limit,
|
|
198
|
+
offset=offset,
|
|
199
|
+
project_id=project_id,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
response = client.get_httpx_client().request(
|
|
203
|
+
**kwargs,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
return _build_response(client=client, response=response)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def sync(
|
|
210
|
+
*,
|
|
211
|
+
client: AuthenticatedClient | Client,
|
|
212
|
+
inventory_item_id: None | str | Unset = UNSET,
|
|
213
|
+
vendor_id: None | str | Unset = UNSET,
|
|
214
|
+
is_active: bool | None | Unset = UNSET,
|
|
215
|
+
search: None | str | Unset = UNSET,
|
|
216
|
+
sort_by: None | str | Unset = UNSET,
|
|
217
|
+
sort_direction: None | PurchasingListItemSourcingSortDirectionType0 | Unset = UNSET,
|
|
218
|
+
filter_column: None | str | Unset = UNSET,
|
|
219
|
+
filter_operator: None | PurchasingListItemSourcingFilterOperatorType0 | Unset = UNSET,
|
|
220
|
+
filter_value: None | str | Unset = UNSET,
|
|
221
|
+
limit: int | Unset = 100,
|
|
222
|
+
offset: int | Unset = 0,
|
|
223
|
+
project_id: str,
|
|
224
|
+
) -> HTTPValidationError | ListItemSourcingResponse | None:
|
|
225
|
+
"""List Item Sourcing
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
inventory_item_id (None | str | Unset):
|
|
229
|
+
vendor_id (None | str | Unset):
|
|
230
|
+
is_active (bool | None | Unset):
|
|
231
|
+
search (None | str | Unset):
|
|
232
|
+
sort_by (None | str | Unset):
|
|
233
|
+
sort_direction (None | PurchasingListItemSourcingSortDirectionType0 | Unset):
|
|
234
|
+
filter_column (None | str | Unset):
|
|
235
|
+
filter_operator (None | PurchasingListItemSourcingFilterOperatorType0 | Unset):
|
|
236
|
+
filter_value (None | str | Unset):
|
|
237
|
+
limit (int | Unset): Default: 100.
|
|
238
|
+
offset (int | Unset): Default: 0.
|
|
239
|
+
project_id (str):
|
|
240
|
+
|
|
241
|
+
Raises:
|
|
242
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
243
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
244
|
+
|
|
245
|
+
Returns:
|
|
246
|
+
HTTPValidationError | ListItemSourcingResponse
|
|
247
|
+
"""
|
|
248
|
+
|
|
249
|
+
return sync_detailed(
|
|
250
|
+
client=client,
|
|
251
|
+
inventory_item_id=inventory_item_id,
|
|
252
|
+
vendor_id=vendor_id,
|
|
253
|
+
is_active=is_active,
|
|
254
|
+
search=search,
|
|
255
|
+
sort_by=sort_by,
|
|
256
|
+
sort_direction=sort_direction,
|
|
257
|
+
filter_column=filter_column,
|
|
258
|
+
filter_operator=filter_operator,
|
|
259
|
+
filter_value=filter_value,
|
|
260
|
+
limit=limit,
|
|
261
|
+
offset=offset,
|
|
262
|
+
project_id=project_id,
|
|
263
|
+
).parsed
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
async def asyncio_detailed(
|
|
267
|
+
*,
|
|
268
|
+
client: AuthenticatedClient | Client,
|
|
269
|
+
inventory_item_id: None | str | Unset = UNSET,
|
|
270
|
+
vendor_id: None | str | Unset = UNSET,
|
|
271
|
+
is_active: bool | None | Unset = UNSET,
|
|
272
|
+
search: None | str | Unset = UNSET,
|
|
273
|
+
sort_by: None | str | Unset = UNSET,
|
|
274
|
+
sort_direction: None | PurchasingListItemSourcingSortDirectionType0 | Unset = UNSET,
|
|
275
|
+
filter_column: None | str | Unset = UNSET,
|
|
276
|
+
filter_operator: None | PurchasingListItemSourcingFilterOperatorType0 | Unset = UNSET,
|
|
277
|
+
filter_value: None | str | Unset = UNSET,
|
|
278
|
+
limit: int | Unset = 100,
|
|
279
|
+
offset: int | Unset = 0,
|
|
280
|
+
project_id: str,
|
|
281
|
+
) -> Response[HTTPValidationError | ListItemSourcingResponse]:
|
|
282
|
+
"""List Item Sourcing
|
|
283
|
+
|
|
284
|
+
Args:
|
|
285
|
+
inventory_item_id (None | str | Unset):
|
|
286
|
+
vendor_id (None | str | Unset):
|
|
287
|
+
is_active (bool | None | Unset):
|
|
288
|
+
search (None | str | Unset):
|
|
289
|
+
sort_by (None | str | Unset):
|
|
290
|
+
sort_direction (None | PurchasingListItemSourcingSortDirectionType0 | Unset):
|
|
291
|
+
filter_column (None | str | Unset):
|
|
292
|
+
filter_operator (None | PurchasingListItemSourcingFilterOperatorType0 | Unset):
|
|
293
|
+
filter_value (None | str | Unset):
|
|
294
|
+
limit (int | Unset): Default: 100.
|
|
295
|
+
offset (int | Unset): Default: 0.
|
|
296
|
+
project_id (str):
|
|
297
|
+
|
|
298
|
+
Raises:
|
|
299
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
300
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
301
|
+
|
|
302
|
+
Returns:
|
|
303
|
+
Response[HTTPValidationError | ListItemSourcingResponse]
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
kwargs = _get_kwargs(
|
|
307
|
+
inventory_item_id=inventory_item_id,
|
|
308
|
+
vendor_id=vendor_id,
|
|
309
|
+
is_active=is_active,
|
|
310
|
+
search=search,
|
|
311
|
+
sort_by=sort_by,
|
|
312
|
+
sort_direction=sort_direction,
|
|
313
|
+
filter_column=filter_column,
|
|
314
|
+
filter_operator=filter_operator,
|
|
315
|
+
filter_value=filter_value,
|
|
316
|
+
limit=limit,
|
|
317
|
+
offset=offset,
|
|
318
|
+
project_id=project_id,
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
322
|
+
|
|
323
|
+
return _build_response(client=client, response=response)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
async def asyncio(
|
|
327
|
+
*,
|
|
328
|
+
client: AuthenticatedClient | Client,
|
|
329
|
+
inventory_item_id: None | str | Unset = UNSET,
|
|
330
|
+
vendor_id: None | str | Unset = UNSET,
|
|
331
|
+
is_active: bool | None | Unset = UNSET,
|
|
332
|
+
search: None | str | Unset = UNSET,
|
|
333
|
+
sort_by: None | str | Unset = UNSET,
|
|
334
|
+
sort_direction: None | PurchasingListItemSourcingSortDirectionType0 | Unset = UNSET,
|
|
335
|
+
filter_column: None | str | Unset = UNSET,
|
|
336
|
+
filter_operator: None | PurchasingListItemSourcingFilterOperatorType0 | Unset = UNSET,
|
|
337
|
+
filter_value: None | str | Unset = UNSET,
|
|
338
|
+
limit: int | Unset = 100,
|
|
339
|
+
offset: int | Unset = 0,
|
|
340
|
+
project_id: str,
|
|
341
|
+
) -> HTTPValidationError | ListItemSourcingResponse | None:
|
|
342
|
+
"""List Item Sourcing
|
|
343
|
+
|
|
344
|
+
Args:
|
|
345
|
+
inventory_item_id (None | str | Unset):
|
|
346
|
+
vendor_id (None | str | Unset):
|
|
347
|
+
is_active (bool | None | Unset):
|
|
348
|
+
search (None | str | Unset):
|
|
349
|
+
sort_by (None | str | Unset):
|
|
350
|
+
sort_direction (None | PurchasingListItemSourcingSortDirectionType0 | Unset):
|
|
351
|
+
filter_column (None | str | Unset):
|
|
352
|
+
filter_operator (None | PurchasingListItemSourcingFilterOperatorType0 | Unset):
|
|
353
|
+
filter_value (None | str | Unset):
|
|
354
|
+
limit (int | Unset): Default: 100.
|
|
355
|
+
offset (int | Unset): Default: 0.
|
|
356
|
+
project_id (str):
|
|
357
|
+
|
|
358
|
+
Raises:
|
|
359
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
360
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
361
|
+
|
|
362
|
+
Returns:
|
|
363
|
+
HTTPValidationError | ListItemSourcingResponse
|
|
364
|
+
"""
|
|
365
|
+
|
|
366
|
+
return (
|
|
367
|
+
await asyncio_detailed(
|
|
368
|
+
client=client,
|
|
369
|
+
inventory_item_id=inventory_item_id,
|
|
370
|
+
vendor_id=vendor_id,
|
|
371
|
+
is_active=is_active,
|
|
372
|
+
search=search,
|
|
373
|
+
sort_by=sort_by,
|
|
374
|
+
sort_direction=sort_direction,
|
|
375
|
+
filter_column=filter_column,
|
|
376
|
+
filter_operator=filter_operator,
|
|
377
|
+
filter_value=filter_value,
|
|
378
|
+
limit=limit,
|
|
379
|
+
offset=offset,
|
|
380
|
+
project_id=project_id,
|
|
381
|
+
)
|
|
382
|
+
).parsed
|