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,202 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.item_sourcing_response import ItemSourcingResponse
|
|
11
|
+
from ...models.update_item_sourcing_request import UpdateItemSourcingRequest
|
|
12
|
+
from ...types import UNSET, Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
sourcing_id: str,
|
|
17
|
+
*,
|
|
18
|
+
body: UpdateItemSourcingRequest,
|
|
19
|
+
project_id: str,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
params["projectId"] = project_id
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "patch",
|
|
31
|
+
"url": "/v1/apps/purchasing/item-sourcing/{sourcing_id}".format(
|
|
32
|
+
sourcing_id=quote(str(sourcing_id), safe=""),
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
_kwargs["json"] = body.to_dict()
|
|
38
|
+
|
|
39
|
+
headers["Content-Type"] = "application/json"
|
|
40
|
+
|
|
41
|
+
_kwargs["headers"] = headers
|
|
42
|
+
return _kwargs
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _parse_response(
|
|
46
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
47
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
48
|
+
if response.status_code == 200:
|
|
49
|
+
response_200 = ItemSourcingResponse.from_dict(response.json())
|
|
50
|
+
|
|
51
|
+
return response_200
|
|
52
|
+
|
|
53
|
+
if response.status_code == 422:
|
|
54
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
55
|
+
|
|
56
|
+
return response_422
|
|
57
|
+
|
|
58
|
+
if client.raise_on_unexpected_status:
|
|
59
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
60
|
+
else:
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _build_response(
|
|
65
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
66
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
67
|
+
return Response(
|
|
68
|
+
status_code=HTTPStatus(response.status_code),
|
|
69
|
+
content=response.content,
|
|
70
|
+
headers=response.headers,
|
|
71
|
+
parsed=_parse_response(client=client, response=response),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def sync_detailed(
|
|
76
|
+
sourcing_id: str,
|
|
77
|
+
*,
|
|
78
|
+
client: AuthenticatedClient | Client,
|
|
79
|
+
body: UpdateItemSourcingRequest,
|
|
80
|
+
project_id: str,
|
|
81
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
82
|
+
"""Update Item Sourcing
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
sourcing_id (str):
|
|
86
|
+
project_id (str):
|
|
87
|
+
body (UpdateItemSourcingRequest): Partial inline update for a sourcing relationship.
|
|
88
|
+
|
|
89
|
+
Raises:
|
|
90
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
91
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
92
|
+
|
|
93
|
+
Returns:
|
|
94
|
+
Response[HTTPValidationError | ItemSourcingResponse]
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
kwargs = _get_kwargs(
|
|
98
|
+
sourcing_id=sourcing_id,
|
|
99
|
+
body=body,
|
|
100
|
+
project_id=project_id,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = client.get_httpx_client().request(
|
|
104
|
+
**kwargs,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def sync(
|
|
111
|
+
sourcing_id: str,
|
|
112
|
+
*,
|
|
113
|
+
client: AuthenticatedClient | Client,
|
|
114
|
+
body: UpdateItemSourcingRequest,
|
|
115
|
+
project_id: str,
|
|
116
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
117
|
+
"""Update Item Sourcing
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
sourcing_id (str):
|
|
121
|
+
project_id (str):
|
|
122
|
+
body (UpdateItemSourcingRequest): Partial inline update for a sourcing relationship.
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
HTTPValidationError | ItemSourcingResponse
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
return sync_detailed(
|
|
133
|
+
sourcing_id=sourcing_id,
|
|
134
|
+
client=client,
|
|
135
|
+
body=body,
|
|
136
|
+
project_id=project_id,
|
|
137
|
+
).parsed
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
async def asyncio_detailed(
|
|
141
|
+
sourcing_id: str,
|
|
142
|
+
*,
|
|
143
|
+
client: AuthenticatedClient | Client,
|
|
144
|
+
body: UpdateItemSourcingRequest,
|
|
145
|
+
project_id: str,
|
|
146
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
147
|
+
"""Update Item Sourcing
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
sourcing_id (str):
|
|
151
|
+
project_id (str):
|
|
152
|
+
body (UpdateItemSourcingRequest): Partial inline update for a sourcing relationship.
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
Response[HTTPValidationError | ItemSourcingResponse]
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
kwargs = _get_kwargs(
|
|
163
|
+
sourcing_id=sourcing_id,
|
|
164
|
+
body=body,
|
|
165
|
+
project_id=project_id,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
169
|
+
|
|
170
|
+
return _build_response(client=client, response=response)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
async def asyncio(
|
|
174
|
+
sourcing_id: str,
|
|
175
|
+
*,
|
|
176
|
+
client: AuthenticatedClient | Client,
|
|
177
|
+
body: UpdateItemSourcingRequest,
|
|
178
|
+
project_id: str,
|
|
179
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
180
|
+
"""Update Item Sourcing
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
sourcing_id (str):
|
|
184
|
+
project_id (str):
|
|
185
|
+
body (UpdateItemSourcingRequest): Partial inline update for a sourcing relationship.
|
|
186
|
+
|
|
187
|
+
Raises:
|
|
188
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
189
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
190
|
+
|
|
191
|
+
Returns:
|
|
192
|
+
HTTPValidationError | ItemSourcingResponse
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
return (
|
|
196
|
+
await asyncio_detailed(
|
|
197
|
+
sourcing_id=sourcing_id,
|
|
198
|
+
client=client,
|
|
199
|
+
body=body,
|
|
200
|
+
project_id=project_id,
|
|
201
|
+
)
|
|
202
|
+
).parsed
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.item_sourcing_response import ItemSourcingResponse
|
|
11
|
+
from ...models.upsert_item_sourcing_cost_request import UpsertItemSourcingCostRequest
|
|
12
|
+
from ...types import UNSET, Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
sourcing_id: str,
|
|
17
|
+
*,
|
|
18
|
+
body: UpsertItemSourcingCostRequest,
|
|
19
|
+
project_id: str,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
params["projectId"] = project_id
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "put",
|
|
31
|
+
"url": "/v1/apps/purchasing/item-sourcing/{sourcing_id}/cost".format(
|
|
32
|
+
sourcing_id=quote(str(sourcing_id), safe=""),
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
_kwargs["json"] = body.to_dict()
|
|
38
|
+
|
|
39
|
+
headers["Content-Type"] = "application/json"
|
|
40
|
+
|
|
41
|
+
_kwargs["headers"] = headers
|
|
42
|
+
return _kwargs
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _parse_response(
|
|
46
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
47
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
48
|
+
if response.status_code == 200:
|
|
49
|
+
response_200 = ItemSourcingResponse.from_dict(response.json())
|
|
50
|
+
|
|
51
|
+
return response_200
|
|
52
|
+
|
|
53
|
+
if response.status_code == 422:
|
|
54
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
55
|
+
|
|
56
|
+
return response_422
|
|
57
|
+
|
|
58
|
+
if client.raise_on_unexpected_status:
|
|
59
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
60
|
+
else:
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _build_response(
|
|
65
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
66
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
67
|
+
return Response(
|
|
68
|
+
status_code=HTTPStatus(response.status_code),
|
|
69
|
+
content=response.content,
|
|
70
|
+
headers=response.headers,
|
|
71
|
+
parsed=_parse_response(client=client, response=response),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def sync_detailed(
|
|
76
|
+
sourcing_id: str,
|
|
77
|
+
*,
|
|
78
|
+
client: AuthenticatedClient | Client,
|
|
79
|
+
body: UpsertItemSourcingCostRequest,
|
|
80
|
+
project_id: str,
|
|
81
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
82
|
+
"""Upsert Item Sourcing Cost
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
sourcing_id (str):
|
|
86
|
+
project_id (str):
|
|
87
|
+
body (UpsertItemSourcingCostRequest): Set the current vendor-item cost for one sourcing
|
|
88
|
+
relationship.
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Response[HTTPValidationError | ItemSourcingResponse]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
kwargs = _get_kwargs(
|
|
99
|
+
sourcing_id=sourcing_id,
|
|
100
|
+
body=body,
|
|
101
|
+
project_id=project_id,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
response = client.get_httpx_client().request(
|
|
105
|
+
**kwargs,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
return _build_response(client=client, response=response)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def sync(
|
|
112
|
+
sourcing_id: str,
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient | Client,
|
|
115
|
+
body: UpsertItemSourcingCostRequest,
|
|
116
|
+
project_id: str,
|
|
117
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
118
|
+
"""Upsert Item Sourcing Cost
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
sourcing_id (str):
|
|
122
|
+
project_id (str):
|
|
123
|
+
body (UpsertItemSourcingCostRequest): Set the current vendor-item cost for one sourcing
|
|
124
|
+
relationship.
|
|
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
|
+
HTTPValidationError | ItemSourcingResponse
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
sourcing_id=sourcing_id,
|
|
136
|
+
client=client,
|
|
137
|
+
body=body,
|
|
138
|
+
project_id=project_id,
|
|
139
|
+
).parsed
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
async def asyncio_detailed(
|
|
143
|
+
sourcing_id: str,
|
|
144
|
+
*,
|
|
145
|
+
client: AuthenticatedClient | Client,
|
|
146
|
+
body: UpsertItemSourcingCostRequest,
|
|
147
|
+
project_id: str,
|
|
148
|
+
) -> Response[HTTPValidationError | ItemSourcingResponse]:
|
|
149
|
+
"""Upsert Item Sourcing Cost
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
sourcing_id (str):
|
|
153
|
+
project_id (str):
|
|
154
|
+
body (UpsertItemSourcingCostRequest): Set the current vendor-item cost for one sourcing
|
|
155
|
+
relationship.
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Response[HTTPValidationError | ItemSourcingResponse]
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
kwargs = _get_kwargs(
|
|
166
|
+
sourcing_id=sourcing_id,
|
|
167
|
+
body=body,
|
|
168
|
+
project_id=project_id,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
172
|
+
|
|
173
|
+
return _build_response(client=client, response=response)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
async def asyncio(
|
|
177
|
+
sourcing_id: str,
|
|
178
|
+
*,
|
|
179
|
+
client: AuthenticatedClient | Client,
|
|
180
|
+
body: UpsertItemSourcingCostRequest,
|
|
181
|
+
project_id: str,
|
|
182
|
+
) -> HTTPValidationError | ItemSourcingResponse | None:
|
|
183
|
+
"""Upsert Item Sourcing Cost
|
|
184
|
+
|
|
185
|
+
Args:
|
|
186
|
+
sourcing_id (str):
|
|
187
|
+
project_id (str):
|
|
188
|
+
body (UpsertItemSourcingCostRequest): Set the current vendor-item cost for one sourcing
|
|
189
|
+
relationship.
|
|
190
|
+
|
|
191
|
+
Raises:
|
|
192
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
193
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
HTTPValidationError | ItemSourcingResponse
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
await asyncio_detailed(
|
|
201
|
+
sourcing_id=sourcing_id,
|
|
202
|
+
client=client,
|
|
203
|
+
body=body,
|
|
204
|
+
project_id=project_id,
|
|
205
|
+
)
|
|
206
|
+
).parsed
|
|
@@ -17,6 +17,7 @@ def _get_kwargs(
|
|
|
17
17
|
lifecycle_status: CanonicalStatus | None | Unset = UNSET,
|
|
18
18
|
status_group: Literal["active"] | None | Unset = UNSET,
|
|
19
19
|
customer_id: None | str | Unset = UNSET,
|
|
20
|
+
sales_rep_id: None | str | Unset = UNSET,
|
|
20
21
|
channel_id: None | str | Unset = UNSET,
|
|
21
22
|
sort_by: None | str | Unset = UNSET,
|
|
22
23
|
sort_direction: None | SalesListOrdersSortDirectionType0 | Unset = UNSET,
|
|
@@ -51,6 +52,13 @@ def _get_kwargs(
|
|
|
51
52
|
json_customer_id = customer_id
|
|
52
53
|
params["customer_id"] = json_customer_id
|
|
53
54
|
|
|
55
|
+
json_sales_rep_id: None | str | Unset
|
|
56
|
+
if isinstance(sales_rep_id, Unset):
|
|
57
|
+
json_sales_rep_id = UNSET
|
|
58
|
+
else:
|
|
59
|
+
json_sales_rep_id = sales_rep_id
|
|
60
|
+
params["sales_rep_id"] = json_sales_rep_id
|
|
61
|
+
|
|
54
62
|
json_channel_id: None | str | Unset
|
|
55
63
|
if isinstance(channel_id, Unset):
|
|
56
64
|
json_channel_id = UNSET
|
|
@@ -134,6 +142,7 @@ def sync_detailed(
|
|
|
134
142
|
lifecycle_status: CanonicalStatus | None | Unset = UNSET,
|
|
135
143
|
status_group: Literal["active"] | None | Unset = UNSET,
|
|
136
144
|
customer_id: None | str | Unset = UNSET,
|
|
145
|
+
sales_rep_id: None | str | Unset = UNSET,
|
|
137
146
|
channel_id: None | str | Unset = UNSET,
|
|
138
147
|
sort_by: None | str | Unset = UNSET,
|
|
139
148
|
sort_direction: None | SalesListOrdersSortDirectionType0 | Unset = UNSET,
|
|
@@ -148,6 +157,7 @@ def sync_detailed(
|
|
|
148
157
|
lifecycle_status (CanonicalStatus | None | Unset):
|
|
149
158
|
status_group (Literal['active'] | None | Unset):
|
|
150
159
|
customer_id (None | str | Unset):
|
|
160
|
+
sales_rep_id (None | str | Unset):
|
|
151
161
|
channel_id (None | str | Unset):
|
|
152
162
|
sort_by (None | str | Unset):
|
|
153
163
|
sort_direction (None | SalesListOrdersSortDirectionType0 | Unset):
|
|
@@ -168,6 +178,7 @@ def sync_detailed(
|
|
|
168
178
|
lifecycle_status=lifecycle_status,
|
|
169
179
|
status_group=status_group,
|
|
170
180
|
customer_id=customer_id,
|
|
181
|
+
sales_rep_id=sales_rep_id,
|
|
171
182
|
channel_id=channel_id,
|
|
172
183
|
sort_by=sort_by,
|
|
173
184
|
sort_direction=sort_direction,
|
|
@@ -190,6 +201,7 @@ def sync(
|
|
|
190
201
|
lifecycle_status: CanonicalStatus | None | Unset = UNSET,
|
|
191
202
|
status_group: Literal["active"] | None | Unset = UNSET,
|
|
192
203
|
customer_id: None | str | Unset = UNSET,
|
|
204
|
+
sales_rep_id: None | str | Unset = UNSET,
|
|
193
205
|
channel_id: None | str | Unset = UNSET,
|
|
194
206
|
sort_by: None | str | Unset = UNSET,
|
|
195
207
|
sort_direction: None | SalesListOrdersSortDirectionType0 | Unset = UNSET,
|
|
@@ -204,6 +216,7 @@ def sync(
|
|
|
204
216
|
lifecycle_status (CanonicalStatus | None | Unset):
|
|
205
217
|
status_group (Literal['active'] | None | Unset):
|
|
206
218
|
customer_id (None | str | Unset):
|
|
219
|
+
sales_rep_id (None | str | Unset):
|
|
207
220
|
channel_id (None | str | Unset):
|
|
208
221
|
sort_by (None | str | Unset):
|
|
209
222
|
sort_direction (None | SalesListOrdersSortDirectionType0 | Unset):
|
|
@@ -225,6 +238,7 @@ def sync(
|
|
|
225
238
|
lifecycle_status=lifecycle_status,
|
|
226
239
|
status_group=status_group,
|
|
227
240
|
customer_id=customer_id,
|
|
241
|
+
sales_rep_id=sales_rep_id,
|
|
228
242
|
channel_id=channel_id,
|
|
229
243
|
sort_by=sort_by,
|
|
230
244
|
sort_direction=sort_direction,
|
|
@@ -241,6 +255,7 @@ async def asyncio_detailed(
|
|
|
241
255
|
lifecycle_status: CanonicalStatus | None | Unset = UNSET,
|
|
242
256
|
status_group: Literal["active"] | None | Unset = UNSET,
|
|
243
257
|
customer_id: None | str | Unset = UNSET,
|
|
258
|
+
sales_rep_id: None | str | Unset = UNSET,
|
|
244
259
|
channel_id: None | str | Unset = UNSET,
|
|
245
260
|
sort_by: None | str | Unset = UNSET,
|
|
246
261
|
sort_direction: None | SalesListOrdersSortDirectionType0 | Unset = UNSET,
|
|
@@ -255,6 +270,7 @@ async def asyncio_detailed(
|
|
|
255
270
|
lifecycle_status (CanonicalStatus | None | Unset):
|
|
256
271
|
status_group (Literal['active'] | None | Unset):
|
|
257
272
|
customer_id (None | str | Unset):
|
|
273
|
+
sales_rep_id (None | str | Unset):
|
|
258
274
|
channel_id (None | str | Unset):
|
|
259
275
|
sort_by (None | str | Unset):
|
|
260
276
|
sort_direction (None | SalesListOrdersSortDirectionType0 | Unset):
|
|
@@ -275,6 +291,7 @@ async def asyncio_detailed(
|
|
|
275
291
|
lifecycle_status=lifecycle_status,
|
|
276
292
|
status_group=status_group,
|
|
277
293
|
customer_id=customer_id,
|
|
294
|
+
sales_rep_id=sales_rep_id,
|
|
278
295
|
channel_id=channel_id,
|
|
279
296
|
sort_by=sort_by,
|
|
280
297
|
sort_direction=sort_direction,
|
|
@@ -295,6 +312,7 @@ async def asyncio(
|
|
|
295
312
|
lifecycle_status: CanonicalStatus | None | Unset = UNSET,
|
|
296
313
|
status_group: Literal["active"] | None | Unset = UNSET,
|
|
297
314
|
customer_id: None | str | Unset = UNSET,
|
|
315
|
+
sales_rep_id: None | str | Unset = UNSET,
|
|
298
316
|
channel_id: None | str | Unset = UNSET,
|
|
299
317
|
sort_by: None | str | Unset = UNSET,
|
|
300
318
|
sort_direction: None | SalesListOrdersSortDirectionType0 | Unset = UNSET,
|
|
@@ -309,6 +327,7 @@ async def asyncio(
|
|
|
309
327
|
lifecycle_status (CanonicalStatus | None | Unset):
|
|
310
328
|
status_group (Literal['active'] | None | Unset):
|
|
311
329
|
customer_id (None | str | Unset):
|
|
330
|
+
sales_rep_id (None | str | Unset):
|
|
312
331
|
channel_id (None | str | Unset):
|
|
313
332
|
sort_by (None | str | Unset):
|
|
314
333
|
sort_direction (None | SalesListOrdersSortDirectionType0 | Unset):
|
|
@@ -331,6 +350,7 @@ async def asyncio(
|
|
|
331
350
|
lifecycle_status=lifecycle_status,
|
|
332
351
|
status_group=status_group,
|
|
333
352
|
customer_id=customer_id,
|
|
353
|
+
sales_rep_id=sales_rep_id,
|
|
334
354
|
channel_id=channel_id,
|
|
335
355
|
sort_by=sort_by,
|
|
336
356
|
sort_direction=sort_direction,
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.pick_pack_ship_response import PickPackShipResponse
|
|
11
|
+
from ...types import UNSET, Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
packing_slip_id: str,
|
|
16
|
+
*,
|
|
17
|
+
project_id: str,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
params: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
params["projectId"] = project_id
|
|
23
|
+
|
|
24
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
25
|
+
|
|
26
|
+
_kwargs: dict[str, Any] = {
|
|
27
|
+
"method": "post",
|
|
28
|
+
"url": "/v1/apps/inventory/warehouse-workflow/pick-pack-ship/{packing_slip_id}/cancel".format(
|
|
29
|
+
packing_slip_id=quote(str(packing_slip_id), safe=""),
|
|
30
|
+
),
|
|
31
|
+
"params": params,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return _kwargs
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _parse_response(
|
|
38
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
39
|
+
) -> HTTPValidationError | PickPackShipResponse | None:
|
|
40
|
+
if response.status_code == 200:
|
|
41
|
+
response_200 = PickPackShipResponse.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_200
|
|
44
|
+
|
|
45
|
+
if response.status_code == 422:
|
|
46
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_422
|
|
49
|
+
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
58
|
+
) -> Response[HTTPValidationError | PickPackShipResponse]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
packing_slip_id: str,
|
|
69
|
+
*,
|
|
70
|
+
client: AuthenticatedClient | Client,
|
|
71
|
+
project_id: str,
|
|
72
|
+
) -> Response[HTTPValidationError | PickPackShipResponse]:
|
|
73
|
+
"""Cancel Pick Pack Ship
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
packing_slip_id (str):
|
|
77
|
+
project_id (str):
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
Response[HTTPValidationError | PickPackShipResponse]
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
kwargs = _get_kwargs(
|
|
88
|
+
packing_slip_id=packing_slip_id,
|
|
89
|
+
project_id=project_id,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
response = client.get_httpx_client().request(
|
|
93
|
+
**kwargs,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
return _build_response(client=client, response=response)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def sync(
|
|
100
|
+
packing_slip_id: str,
|
|
101
|
+
*,
|
|
102
|
+
client: AuthenticatedClient | Client,
|
|
103
|
+
project_id: str,
|
|
104
|
+
) -> HTTPValidationError | PickPackShipResponse | None:
|
|
105
|
+
"""Cancel Pick Pack Ship
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
packing_slip_id (str):
|
|
109
|
+
project_id (str):
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
HTTPValidationError | PickPackShipResponse
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
return sync_detailed(
|
|
120
|
+
packing_slip_id=packing_slip_id,
|
|
121
|
+
client=client,
|
|
122
|
+
project_id=project_id,
|
|
123
|
+
).parsed
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
async def asyncio_detailed(
|
|
127
|
+
packing_slip_id: str,
|
|
128
|
+
*,
|
|
129
|
+
client: AuthenticatedClient | Client,
|
|
130
|
+
project_id: str,
|
|
131
|
+
) -> Response[HTTPValidationError | PickPackShipResponse]:
|
|
132
|
+
"""Cancel Pick Pack Ship
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
packing_slip_id (str):
|
|
136
|
+
project_id (str):
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Response[HTTPValidationError | PickPackShipResponse]
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
kwargs = _get_kwargs(
|
|
147
|
+
packing_slip_id=packing_slip_id,
|
|
148
|
+
project_id=project_id,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(client=client, response=response)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def asyncio(
|
|
157
|
+
packing_slip_id: str,
|
|
158
|
+
*,
|
|
159
|
+
client: AuthenticatedClient | Client,
|
|
160
|
+
project_id: str,
|
|
161
|
+
) -> HTTPValidationError | PickPackShipResponse | None:
|
|
162
|
+
"""Cancel Pick Pack Ship
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
packing_slip_id (str):
|
|
166
|
+
project_id (str):
|
|
167
|
+
|
|
168
|
+
Raises:
|
|
169
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
170
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
HTTPValidationError | PickPackShipResponse
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
await asyncio_detailed(
|
|
178
|
+
packing_slip_id=packing_slip_id,
|
|
179
|
+
client=client,
|
|
180
|
+
project_id=project_id,
|
|
181
|
+
)
|
|
182
|
+
).parsed
|