ordercloud-python 2026.4.1__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.
- ordercloud/__init__.py +37 -0
- ordercloud/auth.py +136 -0
- ordercloud/client.py +211 -0
- ordercloud/config.py +42 -0
- ordercloud/errors.py +47 -0
- ordercloud/http.py +218 -0
- ordercloud/middleware.py +66 -0
- ordercloud/models/__init__.py +271 -0
- ordercloud/models/address.py +47 -0
- ordercloud/models/api_client.py +116 -0
- ordercloud/models/approval.py +73 -0
- ordercloud/models/assignments.py +402 -0
- ordercloud/models/auth_models.py +114 -0
- ordercloud/models/bundle.py +31 -0
- ordercloud/models/buyer.py +271 -0
- ordercloud/models/catalog.py +33 -0
- ordercloud/models/category.py +35 -0
- ordercloud/models/cost_center.py +27 -0
- ordercloud/models/credit_card.py +35 -0
- ordercloud/models/delivery.py +277 -0
- ordercloud/models/discount.py +63 -0
- ordercloud/models/integration.py +76 -0
- ordercloud/models/inventory_record.py +53 -0
- ordercloud/models/line_item.py +95 -0
- ordercloud/models/line_item_types.py +89 -0
- ordercloud/models/message_sender.py +80 -0
- ordercloud/models/misc.py +280 -0
- ordercloud/models/open_id_connect.py +47 -0
- ordercloud/models/order.py +477 -0
- ordercloud/models/order_return.py +92 -0
- ordercloud/models/payment.py +77 -0
- ordercloud/models/price_schedule.py +76 -0
- ordercloud/models/product.py +227 -0
- ordercloud/models/product_collection.py +186 -0
- ordercloud/models/promotion.py +297 -0
- ordercloud/models/security.py +89 -0
- ordercloud/models/shared.py +131 -0
- ordercloud/models/shipment.py +150 -0
- ordercloud/models/spec.py +67 -0
- ordercloud/models/spending_account.py +33 -0
- ordercloud/models/subscription.py +125 -0
- ordercloud/models/supplier.py +43 -0
- ordercloud/models/sync.py +172 -0
- ordercloud/models/user.py +207 -0
- ordercloud/models/user_group.py +27 -0
- ordercloud/models/webhook.py +58 -0
- ordercloud/py.typed +0 -0
- ordercloud/resources/__init__.py +65 -0
- ordercloud/resources/addresses.py +228 -0
- ordercloud/resources/admin_addresses.py +128 -0
- ordercloud/resources/admin_user_groups.py +185 -0
- ordercloud/resources/admin_users.py +150 -0
- ordercloud/resources/api_clients.py +308 -0
- ordercloud/resources/approval_rules.py +144 -0
- ordercloud/resources/base.py +145 -0
- ordercloud/resources/bundle_line_items.py +59 -0
- ordercloud/resources/bundle_subscription_items.py +54 -0
- ordercloud/resources/bundles.py +278 -0
- ordercloud/resources/buyer_groups.py +128 -0
- ordercloud/resources/buyers.py +164 -0
- ordercloud/resources/cart.py +613 -0
- ordercloud/resources/catalogs.py +311 -0
- ordercloud/resources/categories.py +392 -0
- ordercloud/resources/cost_centers.py +222 -0
- ordercloud/resources/credit_cards.py +227 -0
- ordercloud/resources/delivery_configurations.py +132 -0
- ordercloud/resources/discounts.py +201 -0
- ordercloud/resources/entity_syncs.py +534 -0
- ordercloud/resources/error_configs.py +71 -0
- ordercloud/resources/forgotten_credentials.py +74 -0
- ordercloud/resources/group_orders.py +28 -0
- ordercloud/resources/impersonation_configs.py +132 -0
- ordercloud/resources/incrementors.py +128 -0
- ordercloud/resources/integration_events.py +203 -0
- ordercloud/resources/inventory_integrations.py +65 -0
- ordercloud/resources/inventory_records.py +484 -0
- ordercloud/resources/line_items.py +262 -0
- ordercloud/resources/locales.py +203 -0
- ordercloud/resources/me.py +1882 -0
- ordercloud/resources/message_senders.py +261 -0
- ordercloud/resources/open_id_connects.py +128 -0
- ordercloud/resources/order_returns.py +306 -0
- ordercloud/resources/order_syncs.py +65 -0
- ordercloud/resources/orders.py +689 -0
- ordercloud/resources/payments.py +176 -0
- ordercloud/resources/price_schedules.py +164 -0
- ordercloud/resources/product_collections.py +116 -0
- ordercloud/resources/product_facets.py +128 -0
- ordercloud/resources/product_syncs.py +76 -0
- ordercloud/resources/products.py +454 -0
- ordercloud/resources/promotion_integrations.py +65 -0
- ordercloud/resources/promotions.py +203 -0
- ordercloud/resources/security_profiles.py +222 -0
- ordercloud/resources/seller_approval_rules.py +128 -0
- ordercloud/resources/shipments.py +256 -0
- ordercloud/resources/specs.py +313 -0
- ordercloud/resources/spending_accounts.py +227 -0
- ordercloud/resources/subscription_integrations.py +65 -0
- ordercloud/resources/subscription_items.py +146 -0
- ordercloud/resources/subscriptions.py +128 -0
- ordercloud/resources/supplier_addresses.py +144 -0
- ordercloud/resources/supplier_user_groups.py +210 -0
- ordercloud/resources/supplier_users.py +170 -0
- ordercloud/resources/suppliers.py +190 -0
- ordercloud/resources/tracking_events.py +130 -0
- ordercloud/resources/user_groups.py +210 -0
- ordercloud/resources/users.py +254 -0
- ordercloud/resources/webhooks.py +128 -0
- ordercloud/resources/xp_indices.py +77 -0
- ordercloud/sync_client.py +170 -0
- ordercloud_python-2026.4.1.dist-info/METADATA +552 -0
- ordercloud_python-2026.4.1.dist-info/RECORD +114 -0
- ordercloud_python-2026.4.1.dist-info/WHEEL +4 -0
- ordercloud_python-2026.4.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud EntitySyncs API resource."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Any, Union
|
|
7
|
+
|
|
8
|
+
from ..models.sync import (
|
|
9
|
+
EntitySyncConfig,
|
|
10
|
+
SyncAdminUser,
|
|
11
|
+
SyncBuyer,
|
|
12
|
+
SyncBuyerUser,
|
|
13
|
+
SyncBuyerUserGroup,
|
|
14
|
+
SyncCategory,
|
|
15
|
+
SyncInventoryRecord,
|
|
16
|
+
SyncSupplier,
|
|
17
|
+
SyncSupplierUser,
|
|
18
|
+
)
|
|
19
|
+
from .base import BaseResource
|
|
20
|
+
|
|
21
|
+
__all__ = ["EntitySyncsResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class EntitySyncsResource(BaseResource):
|
|
25
|
+
"""Operations on OrderCloud EntitySyncs."""
|
|
26
|
+
|
|
27
|
+
async def get_admin_users(
|
|
28
|
+
self,
|
|
29
|
+
) -> EntitySyncConfig:
|
|
30
|
+
"""Retrieve the entity sync delivery configuration for admin users
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
The EntitySyncConfig object.
|
|
34
|
+
"""
|
|
35
|
+
resp = await self._http.get("/integrations/entitysync/adminusers")
|
|
36
|
+
return EntitySyncConfig(**resp.json())
|
|
37
|
+
|
|
38
|
+
async def save_admin_users(
|
|
39
|
+
self,
|
|
40
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
41
|
+
) -> EntitySyncConfig:
|
|
42
|
+
"""Create or update the entity sync delivery configuration for admin users
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
The EntitySyncConfig object.
|
|
49
|
+
"""
|
|
50
|
+
resp = await self._http.put(
|
|
51
|
+
"/integrations/entitysync/adminusers",
|
|
52
|
+
json=self._serialize(entity_sync_config),
|
|
53
|
+
)
|
|
54
|
+
return EntitySyncConfig(**resp.json())
|
|
55
|
+
|
|
56
|
+
async def delete_admin_users(
|
|
57
|
+
self,
|
|
58
|
+
) -> None:
|
|
59
|
+
"""Delete the entity sync delivery configuration for admin users"""
|
|
60
|
+
await self._http.delete("/integrations/entitysync/adminusers")
|
|
61
|
+
|
|
62
|
+
async def patch_admin_users(
|
|
63
|
+
self,
|
|
64
|
+
partial: dict[str, Any],
|
|
65
|
+
) -> EntitySyncConfig:
|
|
66
|
+
"""Partially update the entity sync delivery configuration for admin users
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
partial: A dict of fields to update.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
The EntitySyncConfig object.
|
|
73
|
+
"""
|
|
74
|
+
resp = await self._http.patch("/integrations/entitysync/adminusers", json=partial)
|
|
75
|
+
return EntitySyncConfig(**resp.json())
|
|
76
|
+
|
|
77
|
+
async def sync_admin_user(
|
|
78
|
+
self,
|
|
79
|
+
sync_admin_user: Union[SyncAdminUser, dict[str, Any]],
|
|
80
|
+
) -> None:
|
|
81
|
+
"""Sync an admin user
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
sync_admin_user: A ``SyncAdminUser`` model or dict. Required fields: UserID.
|
|
85
|
+
"""
|
|
86
|
+
await self._http.post(
|
|
87
|
+
"/integrations/entitysync/adminusers/sync", json=self._serialize(sync_admin_user)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
async def get_buyers(
|
|
91
|
+
self,
|
|
92
|
+
) -> EntitySyncConfig:
|
|
93
|
+
"""Retrieve the entity sync delivery configuration for buyers
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
The EntitySyncConfig object.
|
|
97
|
+
"""
|
|
98
|
+
resp = await self._http.get("/integrations/entitysync/buyers")
|
|
99
|
+
return EntitySyncConfig(**resp.json())
|
|
100
|
+
|
|
101
|
+
async def save_buyers(
|
|
102
|
+
self,
|
|
103
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
104
|
+
) -> EntitySyncConfig:
|
|
105
|
+
"""Create or update the entity sync delivery configuration for buyers
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
The EntitySyncConfig object.
|
|
112
|
+
"""
|
|
113
|
+
resp = await self._http.put(
|
|
114
|
+
"/integrations/entitysync/buyers",
|
|
115
|
+
json=self._serialize(entity_sync_config),
|
|
116
|
+
)
|
|
117
|
+
return EntitySyncConfig(**resp.json())
|
|
118
|
+
|
|
119
|
+
async def delete_buyers(
|
|
120
|
+
self,
|
|
121
|
+
) -> None:
|
|
122
|
+
"""Delete the entity sync delivery configuration for buyers"""
|
|
123
|
+
await self._http.delete("/integrations/entitysync/buyers")
|
|
124
|
+
|
|
125
|
+
async def patch_buyers(
|
|
126
|
+
self,
|
|
127
|
+
partial: dict[str, Any],
|
|
128
|
+
) -> EntitySyncConfig:
|
|
129
|
+
"""Partially update the entity sync delivery configuration for buyers
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
partial: A dict of fields to update.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
The EntitySyncConfig object.
|
|
136
|
+
"""
|
|
137
|
+
resp = await self._http.patch("/integrations/entitysync/buyers", json=partial)
|
|
138
|
+
return EntitySyncConfig(**resp.json())
|
|
139
|
+
|
|
140
|
+
async def sync_buyer(
|
|
141
|
+
self,
|
|
142
|
+
sync_buyer: Union[SyncBuyer, dict[str, Any]],
|
|
143
|
+
) -> None:
|
|
144
|
+
"""Sync a buyer
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
sync_buyer: A ``SyncBuyer`` model or dict. Required fields: BuyerID.
|
|
148
|
+
"""
|
|
149
|
+
await self._http.post(
|
|
150
|
+
"/integrations/entitysync/buyers/sync", json=self._serialize(sync_buyer)
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
async def get_buyer_user_groups(
|
|
154
|
+
self,
|
|
155
|
+
) -> EntitySyncConfig:
|
|
156
|
+
"""Retrieve the entity sync delivery configuration for buyer user groups
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
The EntitySyncConfig object.
|
|
160
|
+
"""
|
|
161
|
+
resp = await self._http.get("/integrations/entitysync/buyers/usergroups")
|
|
162
|
+
return EntitySyncConfig(**resp.json())
|
|
163
|
+
|
|
164
|
+
async def save_user_groups(
|
|
165
|
+
self,
|
|
166
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
167
|
+
) -> EntitySyncConfig:
|
|
168
|
+
"""Create or update the entity sync delivery configuration for buyer user groups
|
|
169
|
+
|
|
170
|
+
Args:
|
|
171
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
The EntitySyncConfig object.
|
|
175
|
+
"""
|
|
176
|
+
resp = await self._http.put(
|
|
177
|
+
"/integrations/entitysync/buyers/usergroups",
|
|
178
|
+
json=self._serialize(entity_sync_config),
|
|
179
|
+
)
|
|
180
|
+
return EntitySyncConfig(**resp.json())
|
|
181
|
+
|
|
182
|
+
async def delete_user_groups(
|
|
183
|
+
self,
|
|
184
|
+
) -> None:
|
|
185
|
+
"""Delete the entity sync delivery configuration for buyer user groups"""
|
|
186
|
+
await self._http.delete("/integrations/entitysync/buyers/usergroups")
|
|
187
|
+
|
|
188
|
+
async def patch_buyer_user_groups(
|
|
189
|
+
self,
|
|
190
|
+
partial: dict[str, Any],
|
|
191
|
+
) -> EntitySyncConfig:
|
|
192
|
+
"""Partially update the entity sync delivery configuration for buyer user groups
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
partial: A dict of fields to update.
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
The EntitySyncConfig object.
|
|
199
|
+
"""
|
|
200
|
+
resp = await self._http.patch("/integrations/entitysync/buyers/usergroups", json=partial)
|
|
201
|
+
return EntitySyncConfig(**resp.json())
|
|
202
|
+
|
|
203
|
+
async def sync_buyer_user_group(
|
|
204
|
+
self,
|
|
205
|
+
sync_buyer_user_group: Union[SyncBuyerUserGroup, dict[str, Any]],
|
|
206
|
+
) -> None:
|
|
207
|
+
"""Sync a buyer user group
|
|
208
|
+
|
|
209
|
+
Args:
|
|
210
|
+
sync_buyer_user_group: A ``SyncBuyerUserGroup`` model or dict. Required fields: BuyerID, UserGroupID.
|
|
211
|
+
"""
|
|
212
|
+
await self._http.post(
|
|
213
|
+
"/integrations/entitysync/buyers/usergroups/sync",
|
|
214
|
+
json=self._serialize(sync_buyer_user_group),
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
async def get_buyer_users(
|
|
218
|
+
self,
|
|
219
|
+
) -> EntitySyncConfig:
|
|
220
|
+
"""Retrieve the entity sync delivery configuration for buyer users
|
|
221
|
+
|
|
222
|
+
Returns:
|
|
223
|
+
The EntitySyncConfig object.
|
|
224
|
+
"""
|
|
225
|
+
resp = await self._http.get("/integrations/entitysync/buyers/users")
|
|
226
|
+
return EntitySyncConfig(**resp.json())
|
|
227
|
+
|
|
228
|
+
async def save_buyer_users(
|
|
229
|
+
self,
|
|
230
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
231
|
+
) -> EntitySyncConfig:
|
|
232
|
+
"""Create or update the entity sync delivery configuration for buyer users
|
|
233
|
+
|
|
234
|
+
Args:
|
|
235
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
236
|
+
|
|
237
|
+
Returns:
|
|
238
|
+
The EntitySyncConfig object.
|
|
239
|
+
"""
|
|
240
|
+
resp = await self._http.put(
|
|
241
|
+
"/integrations/entitysync/buyers/users",
|
|
242
|
+
json=self._serialize(entity_sync_config),
|
|
243
|
+
)
|
|
244
|
+
return EntitySyncConfig(**resp.json())
|
|
245
|
+
|
|
246
|
+
async def delete_buyer_users(
|
|
247
|
+
self,
|
|
248
|
+
) -> None:
|
|
249
|
+
"""Delete the entity sync delivery configuration for buyer users"""
|
|
250
|
+
await self._http.delete("/integrations/entitysync/buyers/users")
|
|
251
|
+
|
|
252
|
+
async def patch_buyer_users(
|
|
253
|
+
self,
|
|
254
|
+
partial: dict[str, Any],
|
|
255
|
+
) -> EntitySyncConfig:
|
|
256
|
+
"""Partially update the entity sync delivery configuration for buyer users
|
|
257
|
+
|
|
258
|
+
Args:
|
|
259
|
+
partial: A dict of fields to update.
|
|
260
|
+
|
|
261
|
+
Returns:
|
|
262
|
+
The EntitySyncConfig object.
|
|
263
|
+
"""
|
|
264
|
+
resp = await self._http.patch("/integrations/entitysync/buyers/users", json=partial)
|
|
265
|
+
return EntitySyncConfig(**resp.json())
|
|
266
|
+
|
|
267
|
+
async def sync_buyer_user(
|
|
268
|
+
self,
|
|
269
|
+
sync_buyer_user: Union[SyncBuyerUser, dict[str, Any]],
|
|
270
|
+
) -> None:
|
|
271
|
+
"""Sync a buyer user
|
|
272
|
+
|
|
273
|
+
Args:
|
|
274
|
+
sync_buyer_user: A ``SyncBuyerUser`` model or dict. Required fields: BuyerID, UserID.
|
|
275
|
+
"""
|
|
276
|
+
await self._http.post(
|
|
277
|
+
"/integrations/entitysync/buyers/users/sync", json=self._serialize(sync_buyer_user)
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
async def get_categories(
|
|
281
|
+
self,
|
|
282
|
+
) -> EntitySyncConfig:
|
|
283
|
+
"""Retrieve the entity sync delivery configuration for categories
|
|
284
|
+
|
|
285
|
+
Returns:
|
|
286
|
+
The EntitySyncConfig object.
|
|
287
|
+
"""
|
|
288
|
+
resp = await self._http.get("/integrations/entitysync/categories")
|
|
289
|
+
return EntitySyncConfig(**resp.json())
|
|
290
|
+
|
|
291
|
+
async def save_categories(
|
|
292
|
+
self,
|
|
293
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
294
|
+
) -> EntitySyncConfig:
|
|
295
|
+
"""Create or update the entity sync delivery configuration for categories
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
299
|
+
|
|
300
|
+
Returns:
|
|
301
|
+
The EntitySyncConfig object.
|
|
302
|
+
"""
|
|
303
|
+
resp = await self._http.put(
|
|
304
|
+
"/integrations/entitysync/categories",
|
|
305
|
+
json=self._serialize(entity_sync_config),
|
|
306
|
+
)
|
|
307
|
+
return EntitySyncConfig(**resp.json())
|
|
308
|
+
|
|
309
|
+
async def delete_categories(
|
|
310
|
+
self,
|
|
311
|
+
) -> None:
|
|
312
|
+
"""Delete the entity sync delivery configuration for categories"""
|
|
313
|
+
await self._http.delete("/integrations/entitysync/categories")
|
|
314
|
+
|
|
315
|
+
async def patch_categories(
|
|
316
|
+
self,
|
|
317
|
+
partial: dict[str, Any],
|
|
318
|
+
) -> EntitySyncConfig:
|
|
319
|
+
"""Partially update the entity sync delivery configuration for categories
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
partial: A dict of fields to update.
|
|
323
|
+
|
|
324
|
+
Returns:
|
|
325
|
+
The EntitySyncConfig object.
|
|
326
|
+
"""
|
|
327
|
+
resp = await self._http.patch("/integrations/entitysync/categories", json=partial)
|
|
328
|
+
return EntitySyncConfig(**resp.json())
|
|
329
|
+
|
|
330
|
+
async def sync_category(
|
|
331
|
+
self,
|
|
332
|
+
sync_category: Union[SyncCategory, dict[str, Any]],
|
|
333
|
+
) -> None:
|
|
334
|
+
"""Sync a category
|
|
335
|
+
|
|
336
|
+
Args:
|
|
337
|
+
sync_category: A ``SyncCategory`` model or dict. Required fields: CatalogID, CategoryID.
|
|
338
|
+
"""
|
|
339
|
+
await self._http.post(
|
|
340
|
+
"/integrations/entitysync/categories/sync", json=self._serialize(sync_category)
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
async def get_inventory_records(
|
|
344
|
+
self,
|
|
345
|
+
) -> EntitySyncConfig:
|
|
346
|
+
"""Retrieve the entity sync delivery configuration for inventory records
|
|
347
|
+
|
|
348
|
+
Returns:
|
|
349
|
+
The EntitySyncConfig object.
|
|
350
|
+
"""
|
|
351
|
+
resp = await self._http.get("/integrations/entitysync/products/inventoryrecords")
|
|
352
|
+
return EntitySyncConfig(**resp.json())
|
|
353
|
+
|
|
354
|
+
async def save_inventory_records(
|
|
355
|
+
self,
|
|
356
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
357
|
+
) -> EntitySyncConfig:
|
|
358
|
+
"""Create or update the entity sync delivery configuration for inventory records
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
362
|
+
|
|
363
|
+
Returns:
|
|
364
|
+
The EntitySyncConfig object.
|
|
365
|
+
"""
|
|
366
|
+
resp = await self._http.put(
|
|
367
|
+
"/integrations/entitysync/products/inventoryrecords",
|
|
368
|
+
json=self._serialize(entity_sync_config),
|
|
369
|
+
)
|
|
370
|
+
return EntitySyncConfig(**resp.json())
|
|
371
|
+
|
|
372
|
+
async def delete_inventory_records(
|
|
373
|
+
self,
|
|
374
|
+
) -> None:
|
|
375
|
+
"""Delete the entity sync delivery configuration for inventory records"""
|
|
376
|
+
await self._http.delete("/integrations/entitysync/products/inventoryrecords")
|
|
377
|
+
|
|
378
|
+
async def patch_inventory_records(
|
|
379
|
+
self,
|
|
380
|
+
partial: dict[str, Any],
|
|
381
|
+
) -> EntitySyncConfig:
|
|
382
|
+
"""Partially update the entity sync delivery configuration for inventory records
|
|
383
|
+
|
|
384
|
+
Args:
|
|
385
|
+
partial: A dict of fields to update.
|
|
386
|
+
|
|
387
|
+
Returns:
|
|
388
|
+
The EntitySyncConfig object.
|
|
389
|
+
"""
|
|
390
|
+
resp = await self._http.patch(
|
|
391
|
+
"/integrations/entitysync/products/inventoryrecords", json=partial
|
|
392
|
+
)
|
|
393
|
+
return EntitySyncConfig(**resp.json())
|
|
394
|
+
|
|
395
|
+
async def sync_inventory_record(
|
|
396
|
+
self,
|
|
397
|
+
sync_inventory_record: Union[SyncInventoryRecord, dict[str, Any]],
|
|
398
|
+
) -> None:
|
|
399
|
+
"""Sync an inventory record
|
|
400
|
+
|
|
401
|
+
Args:
|
|
402
|
+
sync_inventory_record: A ``SyncInventoryRecord`` model or dict. Required fields: ProductID, InventoryRecordID.
|
|
403
|
+
"""
|
|
404
|
+
await self._http.post(
|
|
405
|
+
"/integrations/entitysync/products/inventoryrecords/sync",
|
|
406
|
+
json=self._serialize(sync_inventory_record),
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
async def sync_supplier(
|
|
410
|
+
self,
|
|
411
|
+
sync_supplier: Union[SyncSupplier, dict[str, Any]],
|
|
412
|
+
) -> None:
|
|
413
|
+
"""Sync a supplier
|
|
414
|
+
|
|
415
|
+
Args:
|
|
416
|
+
sync_supplier: A ``SyncSupplier`` model or dict. Required fields: SupplierID.
|
|
417
|
+
"""
|
|
418
|
+
await self._http.post(
|
|
419
|
+
"/integrations/entitysync/supplier/sync", json=self._serialize(sync_supplier)
|
|
420
|
+
)
|
|
421
|
+
|
|
422
|
+
async def get_suppliers(
|
|
423
|
+
self,
|
|
424
|
+
) -> EntitySyncConfig:
|
|
425
|
+
"""Retrieve the entity sync delivery configuration for suppliers
|
|
426
|
+
|
|
427
|
+
Returns:
|
|
428
|
+
The EntitySyncConfig object.
|
|
429
|
+
"""
|
|
430
|
+
resp = await self._http.get("/integrations/entitysync/suppliers")
|
|
431
|
+
return EntitySyncConfig(**resp.json())
|
|
432
|
+
|
|
433
|
+
async def save_suppliers(
|
|
434
|
+
self,
|
|
435
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
436
|
+
) -> EntitySyncConfig:
|
|
437
|
+
"""Create or update the entity sync delivery configuration for suppliers
|
|
438
|
+
|
|
439
|
+
Args:
|
|
440
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
441
|
+
|
|
442
|
+
Returns:
|
|
443
|
+
The EntitySyncConfig object.
|
|
444
|
+
"""
|
|
445
|
+
resp = await self._http.put(
|
|
446
|
+
"/integrations/entitysync/suppliers",
|
|
447
|
+
json=self._serialize(entity_sync_config),
|
|
448
|
+
)
|
|
449
|
+
return EntitySyncConfig(**resp.json())
|
|
450
|
+
|
|
451
|
+
async def delete_suppliers(
|
|
452
|
+
self,
|
|
453
|
+
) -> None:
|
|
454
|
+
"""Delete the entity sync delivery configuration for suppliers"""
|
|
455
|
+
await self._http.delete("/integrations/entitysync/suppliers")
|
|
456
|
+
|
|
457
|
+
async def patch_suppliers(
|
|
458
|
+
self,
|
|
459
|
+
partial: dict[str, Any],
|
|
460
|
+
) -> EntitySyncConfig:
|
|
461
|
+
"""Partially update the entity sync delivery configuration for suppliers
|
|
462
|
+
|
|
463
|
+
Args:
|
|
464
|
+
partial: A dict of fields to update.
|
|
465
|
+
|
|
466
|
+
Returns:
|
|
467
|
+
The EntitySyncConfig object.
|
|
468
|
+
"""
|
|
469
|
+
resp = await self._http.patch("/integrations/entitysync/suppliers", json=partial)
|
|
470
|
+
return EntitySyncConfig(**resp.json())
|
|
471
|
+
|
|
472
|
+
async def get_supplier_users(
|
|
473
|
+
self,
|
|
474
|
+
) -> EntitySyncConfig:
|
|
475
|
+
"""Retrieve the entity sync delivery configuration for supplier users
|
|
476
|
+
|
|
477
|
+
Returns:
|
|
478
|
+
The EntitySyncConfig object.
|
|
479
|
+
"""
|
|
480
|
+
resp = await self._http.get("/integrations/entitysync/suppliers/users")
|
|
481
|
+
return EntitySyncConfig(**resp.json())
|
|
482
|
+
|
|
483
|
+
async def save_supplier_users(
|
|
484
|
+
self,
|
|
485
|
+
entity_sync_config: Union[EntitySyncConfig, dict[str, Any]],
|
|
486
|
+
) -> EntitySyncConfig:
|
|
487
|
+
"""Create or update the entity sync delivery configuration for supplier users
|
|
488
|
+
|
|
489
|
+
Args:
|
|
490
|
+
entity_sync_config: A ``EntitySyncConfig`` model or dict. Required fields: DeliveryConfigID, SyncEntityChanged, SyncEntityDeleted.
|
|
491
|
+
|
|
492
|
+
Returns:
|
|
493
|
+
The EntitySyncConfig object.
|
|
494
|
+
"""
|
|
495
|
+
resp = await self._http.put(
|
|
496
|
+
"/integrations/entitysync/suppliers/users",
|
|
497
|
+
json=self._serialize(entity_sync_config),
|
|
498
|
+
)
|
|
499
|
+
return EntitySyncConfig(**resp.json())
|
|
500
|
+
|
|
501
|
+
async def delete_supplier_users(
|
|
502
|
+
self,
|
|
503
|
+
) -> None:
|
|
504
|
+
"""Delete the entity sync delivery configuration for supplier users"""
|
|
505
|
+
await self._http.delete("/integrations/entitysync/suppliers/users")
|
|
506
|
+
|
|
507
|
+
async def patch_supplier_users(
|
|
508
|
+
self,
|
|
509
|
+
partial: dict[str, Any],
|
|
510
|
+
) -> EntitySyncConfig:
|
|
511
|
+
"""Partially update the entity sync delivery configuration for supplier users
|
|
512
|
+
|
|
513
|
+
Args:
|
|
514
|
+
partial: A dict of fields to update.
|
|
515
|
+
|
|
516
|
+
Returns:
|
|
517
|
+
The EntitySyncConfig object.
|
|
518
|
+
"""
|
|
519
|
+
resp = await self._http.patch("/integrations/entitysync/suppliers/users", json=partial)
|
|
520
|
+
return EntitySyncConfig(**resp.json())
|
|
521
|
+
|
|
522
|
+
async def sync_supplier_user(
|
|
523
|
+
self,
|
|
524
|
+
sync_supplier_user: Union[SyncSupplierUser, dict[str, Any]],
|
|
525
|
+
) -> None:
|
|
526
|
+
"""Sync a supplier user
|
|
527
|
+
|
|
528
|
+
Args:
|
|
529
|
+
sync_supplier_user: A ``SyncSupplierUser`` model or dict. Required fields: SupplierID, UserID.
|
|
530
|
+
"""
|
|
531
|
+
await self._http.post(
|
|
532
|
+
"/integrations/entitysync/suppliers/users/sync",
|
|
533
|
+
json=self._serialize(sync_supplier_user),
|
|
534
|
+
)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud ErrorConfigs API resource."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Any, Union
|
|
7
|
+
|
|
8
|
+
from ..models.delivery import ErrorConfig
|
|
9
|
+
from .base import BaseResource
|
|
10
|
+
|
|
11
|
+
__all__ = ["ErrorConfigsResource"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ErrorConfigsResource(BaseResource):
|
|
15
|
+
"""Operations on OrderCloud ErrorConfigs."""
|
|
16
|
+
|
|
17
|
+
async def get(
|
|
18
|
+
self,
|
|
19
|
+
) -> ErrorConfig:
|
|
20
|
+
"""Retrieve an error config
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
The ErrorConfig object.
|
|
24
|
+
"""
|
|
25
|
+
resp = await self._http.get("/integrations/ErrorConfig")
|
|
26
|
+
return ErrorConfig(**resp.json())
|
|
27
|
+
|
|
28
|
+
async def save(
|
|
29
|
+
self,
|
|
30
|
+
error_config: Union[ErrorConfig, dict[str, Any]],
|
|
31
|
+
) -> ErrorConfig:
|
|
32
|
+
"""Create or update an error config
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
error_config: A ``ErrorConfig`` model or dict. Required fields: DeliveryConfigID.
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
The ErrorConfig object.
|
|
39
|
+
"""
|
|
40
|
+
resp = await self._http.put(
|
|
41
|
+
"/integrations/ErrorConfig",
|
|
42
|
+
json=self._serialize(error_config),
|
|
43
|
+
)
|
|
44
|
+
return ErrorConfig(**resp.json())
|
|
45
|
+
|
|
46
|
+
async def delete(
|
|
47
|
+
self,
|
|
48
|
+
) -> None:
|
|
49
|
+
"""Delete an error config"""
|
|
50
|
+
await self._http.delete("/integrations/ErrorConfig")
|
|
51
|
+
|
|
52
|
+
async def patch(
|
|
53
|
+
self,
|
|
54
|
+
partial: dict[str, Any],
|
|
55
|
+
) -> ErrorConfig:
|
|
56
|
+
"""Partially update an error config
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
partial: A dict of fields to update.
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
The ErrorConfig object.
|
|
63
|
+
"""
|
|
64
|
+
resp = await self._http.patch("/integrations/ErrorConfig", json=partial)
|
|
65
|
+
return ErrorConfig(**resp.json())
|
|
66
|
+
|
|
67
|
+
async def validate(
|
|
68
|
+
self,
|
|
69
|
+
) -> None:
|
|
70
|
+
"""Validates an error config"""
|
|
71
|
+
await self._http.post("/integrations/ErrorConfig/validate")
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud ForgottenCredentials API resource."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Any, Optional, Union
|
|
7
|
+
|
|
8
|
+
from ..models.auth_models import OneTimePasswordRequest, PasswordReset, PasswordResetRequest
|
|
9
|
+
from .base import BaseResource
|
|
10
|
+
|
|
11
|
+
__all__ = ["ForgottenCredentialsResource"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ForgottenCredentialsResource(BaseResource):
|
|
15
|
+
"""Operations on OrderCloud ForgottenCredentials."""
|
|
16
|
+
|
|
17
|
+
async def send_one_time_password(
|
|
18
|
+
self,
|
|
19
|
+
one_time_password_request: Union[OneTimePasswordRequest, dict[str, Any]],
|
|
20
|
+
) -> None:
|
|
21
|
+
"""Send an one time password
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
one_time_password_request: A ``OneTimePasswordRequest`` model or dict. Required fields: ClientID.
|
|
25
|
+
"""
|
|
26
|
+
await self._http.post(
|
|
27
|
+
"/password/onetimepassword", json=self._serialize(one_time_password_request)
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
async def send_verification_code(
|
|
31
|
+
self,
|
|
32
|
+
password_reset_request: Union[PasswordResetRequest, dict[str, Any]],
|
|
33
|
+
) -> None:
|
|
34
|
+
"""Send a verification code
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
password_reset_request: A ``PasswordResetRequest`` model or dict. Required fields: ClientID.
|
|
38
|
+
"""
|
|
39
|
+
await self._http.post("/password/reset", json=self._serialize(password_reset_request))
|
|
40
|
+
|
|
41
|
+
async def reset_password_by_verification_code(
|
|
42
|
+
self,
|
|
43
|
+
verification_code: str,
|
|
44
|
+
password_reset: Union[PasswordReset, dict[str, Any]],
|
|
45
|
+
) -> None:
|
|
46
|
+
"""Reset a password by verification code
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
verification_code: Verification code of the password reset.
|
|
50
|
+
password_reset: A ``PasswordReset`` model or dict. Required fields: ClientID, Username.
|
|
51
|
+
"""
|
|
52
|
+
await self._http.put(
|
|
53
|
+
f"/password/reset/{verification_code}",
|
|
54
|
+
json=self._serialize(password_reset),
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
async def retrieve_username(
|
|
58
|
+
self,
|
|
59
|
+
*,
|
|
60
|
+
client_id: Optional[str],
|
|
61
|
+
email: Optional[str],
|
|
62
|
+
) -> None:
|
|
63
|
+
"""Retrieve a username
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
client_id: ID of the client.
|
|
67
|
+
email: Email of the forgotten credentials.
|
|
68
|
+
"""
|
|
69
|
+
_params: dict[str, Any] = {}
|
|
70
|
+
if client_id is not None:
|
|
71
|
+
_params["clientID"] = client_id
|
|
72
|
+
if email is not None:
|
|
73
|
+
_params["email"] = email
|
|
74
|
+
await self._http.post("/username/retrieve", params=_params or None)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud GroupOrders API resource."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from ..models.auth_models import AccessToken
|
|
7
|
+
from .base import BaseResource
|
|
8
|
+
|
|
9
|
+
__all__ = ["GroupOrdersResource"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GroupOrdersResource(BaseResource):
|
|
13
|
+
"""Operations on OrderCloud GroupOrders."""
|
|
14
|
+
|
|
15
|
+
async def get_token(
|
|
16
|
+
self,
|
|
17
|
+
invitation_id: str,
|
|
18
|
+
) -> AccessToken:
|
|
19
|
+
"""Retrieve a group order token
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
invitation_id: ID of the invitation.
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
The AccessToken object.
|
|
26
|
+
"""
|
|
27
|
+
resp = await self._http.post(f"/grouporders/{invitation_id}/token")
|
|
28
|
+
return AccessToken(**resp.json())
|