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,297 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud PromotionOverride and related models."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Generic, Optional
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
|
|
9
|
+
from .shared import OrderCloudModel, XP
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"PromotionOverride",
|
|
13
|
+
"PromotionIntegration",
|
|
14
|
+
"AddedPromo",
|
|
15
|
+
"RemovedPromo",
|
|
16
|
+
"EligiblePromotion",
|
|
17
|
+
"RefreshPromosResponse",
|
|
18
|
+
"Promotion",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PromotionOverride(OrderCloudModel):
|
|
23
|
+
"""An OrderCloud PromotionOverride.
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
promotion_id:
|
|
27
|
+
amount: Overrides the promotion's calculated discount to this amount.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
promotion_id: Optional[str] = Field(None, alias="PromotionID")
|
|
31
|
+
amount: Optional[float] = Field(None, alias="Amount")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class PromotionIntegration(OrderCloudModel):
|
|
35
|
+
"""An OrderCloud PromotionIntegration.
|
|
36
|
+
|
|
37
|
+
Attributes:
|
|
38
|
+
hash_key: Security feature that allows your middleware to verify the digital signature in the request header to ensure you only accept trusted data.
|
|
39
|
+
url:
|
|
40
|
+
custom_auth_header_name: The header name that can be passed to your middleware.
|
|
41
|
+
custom_auth_header_value: The header value that can be passed to your middleware.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
hash_key: Optional[str] = Field(None, alias="HashKey")
|
|
45
|
+
url: Optional[str] = Field(None, alias="Url")
|
|
46
|
+
custom_auth_header_name: Optional[str] = Field(None, alias="CustomAuthHeaderName")
|
|
47
|
+
custom_auth_header_value: Optional[str] = Field(None, alias="CustomAuthHeaderValue")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class AddedPromo(OrderCloudModel, Generic[XP]):
|
|
51
|
+
"""An OrderCloud AddedPromo.
|
|
52
|
+
|
|
53
|
+
Attributes:
|
|
54
|
+
line_item_id:
|
|
55
|
+
amount:
|
|
56
|
+
id:
|
|
57
|
+
line_item_level: If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.
|
|
58
|
+
code: Must be unique. Entered by buyer when adding promo to order.
|
|
59
|
+
name:
|
|
60
|
+
redemption_limit: Limit the total number of orders this promotion can be applied to across all users.
|
|
61
|
+
redemption_limit_per_user: Limit the total number of orders this promotion can be applied to per user.
|
|
62
|
+
redemption_count: The number of times this promotion has been applied to an order. (read-only)
|
|
63
|
+
quantity_limit_per_order: Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
64
|
+
item_limit_per_order: Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
65
|
+
item_sort_by: Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.
|
|
66
|
+
description:
|
|
67
|
+
fine_print: For reference only. Terms, conditions, and other legal jargon.
|
|
68
|
+
start_date:
|
|
69
|
+
expiration_date:
|
|
70
|
+
eligible_expression: The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.
|
|
71
|
+
value_expression: The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.
|
|
72
|
+
can_combine: If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.
|
|
73
|
+
allow_all_buyers: Allow promo to be used by all buyers without creating explicit assignments.
|
|
74
|
+
owner_id: ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.
|
|
75
|
+
auto_apply:
|
|
76
|
+
active:
|
|
77
|
+
use_integration:
|
|
78
|
+
priority: Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.
|
|
79
|
+
xp:
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
line_item_id: Optional[str] = Field(None, alias="LineItemID")
|
|
83
|
+
amount: Optional[float] = Field(None, alias="Amount")
|
|
84
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
85
|
+
line_item_level: Optional[bool] = Field(None, alias="LineItemLevel")
|
|
86
|
+
code: Optional[str] = Field(None, alias="Code")
|
|
87
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
88
|
+
redemption_limit: Optional[int] = Field(None, alias="RedemptionLimit")
|
|
89
|
+
redemption_limit_per_user: Optional[int] = Field(None, alias="RedemptionLimitPerUser")
|
|
90
|
+
redemption_count: int = Field(0, alias="RedemptionCount")
|
|
91
|
+
quantity_limit_per_order: Optional[int] = Field(None, alias="QuantityLimitPerOrder")
|
|
92
|
+
item_limit_per_order: Optional[int] = Field(None, alias="ItemLimitPerOrder")
|
|
93
|
+
item_sort_by: Optional[str] = Field(None, alias="ItemSortBy")
|
|
94
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
95
|
+
fine_print: Optional[str] = Field(None, alias="FinePrint")
|
|
96
|
+
start_date: Optional[str] = Field(None, alias="StartDate")
|
|
97
|
+
expiration_date: Optional[str] = Field(None, alias="ExpirationDate")
|
|
98
|
+
eligible_expression: Optional[str] = Field(None, alias="EligibleExpression")
|
|
99
|
+
value_expression: Optional[str] = Field(None, alias="ValueExpression")
|
|
100
|
+
can_combine: Optional[bool] = Field(None, alias="CanCombine")
|
|
101
|
+
allow_all_buyers: Optional[bool] = Field(None, alias="AllowAllBuyers")
|
|
102
|
+
owner_id: Optional[str] = Field(None, alias="OwnerID")
|
|
103
|
+
auto_apply: bool = Field(False, alias="AutoApply")
|
|
104
|
+
active: bool = Field(True, alias="Active")
|
|
105
|
+
use_integration: Optional[bool] = Field(None, alias="UseIntegration")
|
|
106
|
+
priority: Optional[int] = Field(None, alias="Priority")
|
|
107
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class RemovedPromo(OrderCloudModel, Generic[XP]):
|
|
111
|
+
"""An OrderCloud RemovedPromo.
|
|
112
|
+
|
|
113
|
+
Attributes:
|
|
114
|
+
error_code:
|
|
115
|
+
reason:
|
|
116
|
+
line_item_id:
|
|
117
|
+
amount:
|
|
118
|
+
id:
|
|
119
|
+
line_item_level: If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.
|
|
120
|
+
code: Must be unique. Entered by buyer when adding promo to order.
|
|
121
|
+
name:
|
|
122
|
+
redemption_limit: Limit the total number of orders this promotion can be applied to across all users.
|
|
123
|
+
redemption_limit_per_user: Limit the total number of orders this promotion can be applied to per user.
|
|
124
|
+
redemption_count: The number of times this promotion has been applied to an order. (read-only)
|
|
125
|
+
quantity_limit_per_order: Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
126
|
+
item_limit_per_order: Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
127
|
+
item_sort_by: Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.
|
|
128
|
+
description:
|
|
129
|
+
fine_print: For reference only. Terms, conditions, and other legal jargon.
|
|
130
|
+
start_date:
|
|
131
|
+
expiration_date:
|
|
132
|
+
eligible_expression: The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.
|
|
133
|
+
value_expression: The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.
|
|
134
|
+
can_combine: If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.
|
|
135
|
+
allow_all_buyers: Allow promo to be used by all buyers without creating explicit assignments.
|
|
136
|
+
owner_id: ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.
|
|
137
|
+
auto_apply:
|
|
138
|
+
active:
|
|
139
|
+
use_integration:
|
|
140
|
+
priority: Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.
|
|
141
|
+
xp:
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
error_code: Optional[str] = Field(None, alias="ErrorCode")
|
|
145
|
+
reason: Optional[str] = Field(None, alias="Reason")
|
|
146
|
+
line_item_id: Optional[str] = Field(None, alias="LineItemID")
|
|
147
|
+
amount: Optional[float] = Field(None, alias="Amount")
|
|
148
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
149
|
+
line_item_level: Optional[bool] = Field(None, alias="LineItemLevel")
|
|
150
|
+
code: Optional[str] = Field(None, alias="Code")
|
|
151
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
152
|
+
redemption_limit: Optional[int] = Field(None, alias="RedemptionLimit")
|
|
153
|
+
redemption_limit_per_user: Optional[int] = Field(None, alias="RedemptionLimitPerUser")
|
|
154
|
+
redemption_count: int = Field(0, alias="RedemptionCount")
|
|
155
|
+
quantity_limit_per_order: Optional[int] = Field(None, alias="QuantityLimitPerOrder")
|
|
156
|
+
item_limit_per_order: Optional[int] = Field(None, alias="ItemLimitPerOrder")
|
|
157
|
+
item_sort_by: Optional[str] = Field(None, alias="ItemSortBy")
|
|
158
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
159
|
+
fine_print: Optional[str] = Field(None, alias="FinePrint")
|
|
160
|
+
start_date: Optional[str] = Field(None, alias="StartDate")
|
|
161
|
+
expiration_date: Optional[str] = Field(None, alias="ExpirationDate")
|
|
162
|
+
eligible_expression: Optional[str] = Field(None, alias="EligibleExpression")
|
|
163
|
+
value_expression: Optional[str] = Field(None, alias="ValueExpression")
|
|
164
|
+
can_combine: Optional[bool] = Field(None, alias="CanCombine")
|
|
165
|
+
allow_all_buyers: Optional[bool] = Field(None, alias="AllowAllBuyers")
|
|
166
|
+
owner_id: Optional[str] = Field(None, alias="OwnerID")
|
|
167
|
+
auto_apply: bool = Field(False, alias="AutoApply")
|
|
168
|
+
active: bool = Field(True, alias="Active")
|
|
169
|
+
use_integration: Optional[bool] = Field(None, alias="UseIntegration")
|
|
170
|
+
priority: Optional[int] = Field(None, alias="Priority")
|
|
171
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
class EligiblePromotion(OrderCloudModel, Generic[XP]):
|
|
175
|
+
"""An OrderCloud EligiblePromotion.
|
|
176
|
+
|
|
177
|
+
Attributes:
|
|
178
|
+
amount: (read-only)
|
|
179
|
+
id:
|
|
180
|
+
line_item_level: If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.
|
|
181
|
+
code: Must be unique. Entered by buyer when adding promo to order.
|
|
182
|
+
name:
|
|
183
|
+
redemption_limit: Limit the total number of orders this promotion can be applied to across all users.
|
|
184
|
+
redemption_limit_per_user: Limit the total number of orders this promotion can be applied to per user.
|
|
185
|
+
redemption_count: The number of times this promotion has been applied to an order. (read-only)
|
|
186
|
+
quantity_limit_per_order: Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
187
|
+
item_limit_per_order: Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
188
|
+
item_sort_by: Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.
|
|
189
|
+
description:
|
|
190
|
+
fine_print: For reference only. Terms, conditions, and other legal jargon.
|
|
191
|
+
start_date:
|
|
192
|
+
expiration_date:
|
|
193
|
+
eligible_expression: The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.
|
|
194
|
+
value_expression: The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.
|
|
195
|
+
can_combine: If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.
|
|
196
|
+
allow_all_buyers: Allow promo to be used by all buyers without creating explicit assignments.
|
|
197
|
+
owner_id: ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.
|
|
198
|
+
auto_apply:
|
|
199
|
+
active:
|
|
200
|
+
use_integration:
|
|
201
|
+
priority: Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.
|
|
202
|
+
xp:
|
|
203
|
+
"""
|
|
204
|
+
|
|
205
|
+
amount: float = Field(0.0, alias="Amount")
|
|
206
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
207
|
+
line_item_level: Optional[bool] = Field(None, alias="LineItemLevel")
|
|
208
|
+
code: Optional[str] = Field(None, alias="Code")
|
|
209
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
210
|
+
redemption_limit: Optional[int] = Field(None, alias="RedemptionLimit")
|
|
211
|
+
redemption_limit_per_user: Optional[int] = Field(None, alias="RedemptionLimitPerUser")
|
|
212
|
+
redemption_count: int = Field(0, alias="RedemptionCount")
|
|
213
|
+
quantity_limit_per_order: Optional[int] = Field(None, alias="QuantityLimitPerOrder")
|
|
214
|
+
item_limit_per_order: Optional[int] = Field(None, alias="ItemLimitPerOrder")
|
|
215
|
+
item_sort_by: Optional[str] = Field(None, alias="ItemSortBy")
|
|
216
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
217
|
+
fine_print: Optional[str] = Field(None, alias="FinePrint")
|
|
218
|
+
start_date: Optional[str] = Field(None, alias="StartDate")
|
|
219
|
+
expiration_date: Optional[str] = Field(None, alias="ExpirationDate")
|
|
220
|
+
eligible_expression: Optional[str] = Field(None, alias="EligibleExpression")
|
|
221
|
+
value_expression: Optional[str] = Field(None, alias="ValueExpression")
|
|
222
|
+
can_combine: Optional[bool] = Field(None, alias="CanCombine")
|
|
223
|
+
allow_all_buyers: Optional[bool] = Field(None, alias="AllowAllBuyers")
|
|
224
|
+
owner_id: Optional[str] = Field(None, alias="OwnerID")
|
|
225
|
+
auto_apply: bool = Field(False, alias="AutoApply")
|
|
226
|
+
active: bool = Field(True, alias="Active")
|
|
227
|
+
use_integration: Optional[bool] = Field(None, alias="UseIntegration")
|
|
228
|
+
priority: Optional[int] = Field(None, alias="Priority")
|
|
229
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class RefreshPromosResponse(OrderCloudModel):
|
|
233
|
+
"""An OrderCloud RefreshPromosResponse.
|
|
234
|
+
|
|
235
|
+
Attributes:
|
|
236
|
+
promos_added: Promotions that were auto-applied.
|
|
237
|
+
promos_removed: Promotions that were removed due to ineligibility or other reasons.
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
promos_added: Optional[list[AddedPromo]] = Field(None, alias="PromosAdded")
|
|
241
|
+
promos_removed: Optional[list[RemovedPromo]] = Field(None, alias="PromosRemoved")
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class Promotion(OrderCloudModel, Generic[XP]):
|
|
245
|
+
"""An OrderCloud Promotion.
|
|
246
|
+
|
|
247
|
+
Attributes:
|
|
248
|
+
id:
|
|
249
|
+
line_item_level: If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.
|
|
250
|
+
code: Must be unique. Entered by buyer when adding promo to order.
|
|
251
|
+
name:
|
|
252
|
+
redemption_limit: Limit the total number of orders this promotion can be applied to across all users.
|
|
253
|
+
redemption_limit_per_user: Limit the total number of orders this promotion can be applied to per user.
|
|
254
|
+
redemption_count: The number of times this promotion has been applied to an order. (read-only)
|
|
255
|
+
quantity_limit_per_order: Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
256
|
+
item_limit_per_order: Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.
|
|
257
|
+
item_sort_by: Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.
|
|
258
|
+
description:
|
|
259
|
+
fine_print: For reference only. Terms, conditions, and other legal jargon.
|
|
260
|
+
start_date:
|
|
261
|
+
expiration_date:
|
|
262
|
+
eligible_expression: The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.
|
|
263
|
+
value_expression: The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.
|
|
264
|
+
can_combine: If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.
|
|
265
|
+
allow_all_buyers: Allow promo to be used by all buyers without creating explicit assignments.
|
|
266
|
+
owner_id: ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.
|
|
267
|
+
auto_apply:
|
|
268
|
+
active:
|
|
269
|
+
use_integration:
|
|
270
|
+
priority: Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.
|
|
271
|
+
xp:
|
|
272
|
+
"""
|
|
273
|
+
|
|
274
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
275
|
+
line_item_level: Optional[bool] = Field(None, alias="LineItemLevel")
|
|
276
|
+
code: Optional[str] = Field(None, alias="Code")
|
|
277
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
278
|
+
redemption_limit: Optional[int] = Field(None, alias="RedemptionLimit")
|
|
279
|
+
redemption_limit_per_user: Optional[int] = Field(None, alias="RedemptionLimitPerUser")
|
|
280
|
+
redemption_count: int = Field(0, alias="RedemptionCount")
|
|
281
|
+
quantity_limit_per_order: Optional[int] = Field(None, alias="QuantityLimitPerOrder")
|
|
282
|
+
item_limit_per_order: Optional[int] = Field(None, alias="ItemLimitPerOrder")
|
|
283
|
+
item_sort_by: Optional[str] = Field(None, alias="ItemSortBy")
|
|
284
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
285
|
+
fine_print: Optional[str] = Field(None, alias="FinePrint")
|
|
286
|
+
start_date: Optional[str] = Field(None, alias="StartDate")
|
|
287
|
+
expiration_date: Optional[str] = Field(None, alias="ExpirationDate")
|
|
288
|
+
eligible_expression: Optional[str] = Field(None, alias="EligibleExpression")
|
|
289
|
+
value_expression: Optional[str] = Field(None, alias="ValueExpression")
|
|
290
|
+
can_combine: Optional[bool] = Field(None, alias="CanCombine")
|
|
291
|
+
allow_all_buyers: Optional[bool] = Field(None, alias="AllowAllBuyers")
|
|
292
|
+
owner_id: Optional[str] = Field(None, alias="OwnerID")
|
|
293
|
+
auto_apply: bool = Field(False, alias="AutoApply")
|
|
294
|
+
active: bool = Field(True, alias="Active")
|
|
295
|
+
use_integration: Optional[bool] = Field(None, alias="UseIntegration")
|
|
296
|
+
priority: Optional[int] = Field(None, alias="Priority")
|
|
297
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud PasswordConfig, ImpersonationConfig, SecurityProfile models."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Optional
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
|
|
9
|
+
from .shared import OrderCloudModel
|
|
10
|
+
from .misc import ApiRole
|
|
11
|
+
|
|
12
|
+
__all__ = ["PasswordConfig", "ImpersonationConfig", "SecurityProfile"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PasswordConfig(OrderCloudModel):
|
|
16
|
+
"""An OrderCloud PasswordConfig.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
limit_password_reuse: The number of passwords, including the current password, that are blocked from reuse. For example, if set to 1, any password except the current one can be reused.
|
|
20
|
+
max_consecutive_dupe_chars: The maximum number of consecutive repeating characters in a password.
|
|
21
|
+
maximum_password_age: The password expires after MaximumPasswordAge in days.
|
|
22
|
+
minimum_password_age: The password may not be changed again until this number of minutes has passed.
|
|
23
|
+
allowed_failed_attempts: The number of failed attempts before the account is locked for the LockoutDuration.
|
|
24
|
+
lockout_duration: The number of minutes an account is locked when the AllowedFailedAttempts is reached. Use 0 to indicate that lockout should be indefinite, requiring the manual intervention by an admin user.
|
|
25
|
+
upper_case_required: At least one upper case character is required.
|
|
26
|
+
lower_case_required: At least one lower case character is required.
|
|
27
|
+
special_character_required: At least one special character is required.
|
|
28
|
+
numeric_required: At least one number is required.
|
|
29
|
+
minimum_character_count: The minimum length of a password.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
limit_password_reuse: Optional[int] = Field(None, alias="LimitPasswordReuse")
|
|
33
|
+
max_consecutive_dupe_chars: Optional[int] = Field(None, alias="MaxConsecutiveDupeChars")
|
|
34
|
+
maximum_password_age: Optional[int] = Field(None, alias="MaximumPasswordAge")
|
|
35
|
+
minimum_password_age: Optional[int] = Field(None, alias="MinimumPasswordAge")
|
|
36
|
+
allowed_failed_attempts: Optional[int] = Field(None, alias="AllowedFailedAttempts")
|
|
37
|
+
lockout_duration: Optional[int] = Field(None, alias="LockoutDuration")
|
|
38
|
+
upper_case_required: Optional[bool] = Field(None, alias="UpperCaseRequired")
|
|
39
|
+
lower_case_required: Optional[bool] = Field(None, alias="LowerCaseRequired")
|
|
40
|
+
special_character_required: Optional[bool] = Field(None, alias="SpecialCharacterRequired")
|
|
41
|
+
numeric_required: Optional[bool] = Field(None, alias="NumericRequired")
|
|
42
|
+
minimum_character_count: Optional[int] = Field(None, alias="MinimumCharacterCount")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ImpersonationConfig(OrderCloudModel):
|
|
46
|
+
"""An OrderCloud ImpersonationConfig.
|
|
47
|
+
|
|
48
|
+
Attributes:
|
|
49
|
+
id:
|
|
50
|
+
impersonation_buyer_id: The BuyerID of the impersonator group or user (party doing the impersonating)
|
|
51
|
+
impersonation_group_id: The UserGroupID of the impersonator (party doing the impersonating)
|
|
52
|
+
impersonation_user_id: The UserID of the impersonator (party doing the impersonating)
|
|
53
|
+
buyer_id: The BuyerID of the impersonatee (party being impersonated). If null, the config can be used to impersonate users in any buyer in the marketplace that is able to access the specified API Client.
|
|
54
|
+
group_id: The UserGroupID of the impersonatee (party being impersonated)
|
|
55
|
+
user_id: The UserID of the impersonatee (party being impersonated)
|
|
56
|
+
security_profile_id:
|
|
57
|
+
client_id:
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
61
|
+
impersonation_buyer_id: Optional[str] = Field(None, alias="ImpersonationBuyerID")
|
|
62
|
+
impersonation_group_id: Optional[str] = Field(None, alias="ImpersonationGroupID")
|
|
63
|
+
impersonation_user_id: Optional[str] = Field(None, alias="ImpersonationUserID")
|
|
64
|
+
buyer_id: Optional[str] = Field(None, alias="BuyerID")
|
|
65
|
+
group_id: Optional[str] = Field(None, alias="GroupID")
|
|
66
|
+
user_id: Optional[str] = Field(None, alias="UserID")
|
|
67
|
+
security_profile_id: Optional[str] = Field(None, alias="SecurityProfileID")
|
|
68
|
+
client_id: Optional[str] = Field(None, alias="ClientID")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class SecurityProfile(OrderCloudModel):
|
|
72
|
+
"""An OrderCloud SecurityProfile.
|
|
73
|
+
|
|
74
|
+
Attributes:
|
|
75
|
+
id:
|
|
76
|
+
name:
|
|
77
|
+
roles:
|
|
78
|
+
custom_roles:
|
|
79
|
+
password_config:
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
83
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
84
|
+
roles: Optional[list[ApiRole]] = Field(None, alias="Roles")
|
|
85
|
+
custom_roles: Optional[list[str]] = Field(None, alias="CustomRoles")
|
|
86
|
+
password_config: Optional[_PasswordConfig] = Field(None, alias="PasswordConfig")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
_PasswordConfig = PasswordConfig
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"""Shared base classes and pagination types for OrderCloud models.
|
|
2
|
+
|
|
3
|
+
Generated models use snake_case field names with ``Field(alias="PascalCase")``
|
|
4
|
+
so that Python-side access is idiomatic (e.g. ``product.name``,
|
|
5
|
+
``page.meta.total_count``) while JSON serialisation still uses PascalCase
|
|
6
|
+
to match the OrderCloud API.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from enum import Enum
|
|
10
|
+
from typing import Any, Generic, Optional, TypeVar
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T")
|
|
15
|
+
XP = TypeVar("XP")
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"OrderCloudModel",
|
|
19
|
+
"OrderCloudEnum",
|
|
20
|
+
"XP",
|
|
21
|
+
"Meta",
|
|
22
|
+
"ListFacetValue",
|
|
23
|
+
"ListFacet",
|
|
24
|
+
"MetaWithFacets",
|
|
25
|
+
"ListPage",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OrderCloudEnum(str, Enum):
|
|
30
|
+
"""Base for all OrderCloud string enums.
|
|
31
|
+
|
|
32
|
+
Overrides ``__str__`` and ``__format__`` to return the raw value,
|
|
33
|
+
ensuring consistent behaviour in f-strings across Python 3.10-3.13.
|
|
34
|
+
(Python 3.11 changed ``Enum.__format__`` to include the class name.)
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __str__(self) -> str:
|
|
38
|
+
return str(self.value)
|
|
39
|
+
|
|
40
|
+
def __format__(self, format_spec: str) -> str:
|
|
41
|
+
return str(self.value).__format__(format_spec)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class OrderCloudModel(BaseModel):
|
|
45
|
+
"""Base model for all OrderCloud API resources.
|
|
46
|
+
|
|
47
|
+
Configured with ``populate_by_name=True`` so fields can be set by
|
|
48
|
+
either their Python name or JSON alias, and ``extra="allow"`` so
|
|
49
|
+
that unrecognised fields from the API (e.g. new additions) are
|
|
50
|
+
preserved rather than dropped.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class Meta(BaseModel):
|
|
57
|
+
"""Pagination metadata returned with list responses.
|
|
58
|
+
|
|
59
|
+
Attributes:
|
|
60
|
+
page: Current 1-based page number.
|
|
61
|
+
page_size: Number of items per page.
|
|
62
|
+
total_count: Total number of items matching the query.
|
|
63
|
+
total_pages: Total number of pages.
|
|
64
|
+
item_range: Two-element list ``[first, last]`` item indices on this page.
|
|
65
|
+
next_page_key: Opaque key for cursor-based pagination (if available).
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
69
|
+
|
|
70
|
+
page: int = Field(0, alias="Page")
|
|
71
|
+
page_size: int = Field(0, alias="PageSize")
|
|
72
|
+
total_count: int = Field(0, alias="TotalCount")
|
|
73
|
+
total_pages: int = Field(0, alias="TotalPages")
|
|
74
|
+
item_range: list[int] = Field(default_factory=list, alias="ItemRange")
|
|
75
|
+
next_page_key: Optional[str] = Field(None, alias="NextPageKey")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class ListFacetValue(BaseModel):
|
|
79
|
+
"""A single value within a search facet.
|
|
80
|
+
|
|
81
|
+
Attributes:
|
|
82
|
+
value: The facet value string.
|
|
83
|
+
count: Number of items matching this facet value.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
87
|
+
|
|
88
|
+
value: str = Field("", alias="Value")
|
|
89
|
+
count: int = Field(0, alias="Count")
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class ListFacet(BaseModel):
|
|
93
|
+
"""A search facet returned with product list responses.
|
|
94
|
+
|
|
95
|
+
Attributes:
|
|
96
|
+
name: The facet field name.
|
|
97
|
+
xp_path: The extended property path for this facet.
|
|
98
|
+
values: The individual facet values and their counts.
|
|
99
|
+
xp: Extended properties (arbitrary custom data).
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
103
|
+
|
|
104
|
+
name: str = Field("", alias="Name")
|
|
105
|
+
xp_path: str = Field("", alias="XpPath")
|
|
106
|
+
values: list[ListFacetValue] = Field(default_factory=list, alias="Values")
|
|
107
|
+
xp: Optional[dict[str, Any]] = Field(None, alias="xp")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class MetaWithFacets(Meta):
|
|
111
|
+
"""Pagination metadata with search facets (used by product search).
|
|
112
|
+
|
|
113
|
+
Attributes:
|
|
114
|
+
facets: Search facets with value counts for refinement.
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
facets: list[ListFacet] = Field(default_factory=list, alias="Facets")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class ListPage(BaseModel, Generic[T]):
|
|
121
|
+
"""A paginated list of items returned by the OrderCloud API.
|
|
122
|
+
|
|
123
|
+
Attributes:
|
|
124
|
+
items: The items on this page.
|
|
125
|
+
meta: Pagination metadata.
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
129
|
+
|
|
130
|
+
items: list[T] = Field(default_factory=list, alias="Items")
|
|
131
|
+
meta: Meta = Field(default_factory=Meta, alias="Meta")
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# GENERATED by tools/codegen — DO NOT EDIT
|
|
2
|
+
# Source: ordercloud-openapi-v3.json
|
|
3
|
+
"""OrderCloud ShipMethod and related models."""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
from typing import Generic, Optional
|
|
7
|
+
from pydantic import Field
|
|
8
|
+
|
|
9
|
+
from .shared import OrderCloudModel, XP
|
|
10
|
+
from .address import Address
|
|
11
|
+
from .line_item_types import LineItemProduct, LineItemSpec, LineItemVariant
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"ShipMethod",
|
|
15
|
+
"ShipEstimateItem",
|
|
16
|
+
"ShipEstimate",
|
|
17
|
+
"ShipEstimateResponse",
|
|
18
|
+
"ShipmentItem",
|
|
19
|
+
"Shipment",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ShipMethod(OrderCloudModel, Generic[XP]):
|
|
24
|
+
"""An OrderCloud ShipMethod.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
id:
|
|
28
|
+
name:
|
|
29
|
+
cost:
|
|
30
|
+
estimated_transit_days:
|
|
31
|
+
xp:
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
35
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
36
|
+
cost: Optional[float] = Field(None, alias="Cost")
|
|
37
|
+
estimated_transit_days: Optional[int] = Field(None, alias="EstimatedTransitDays")
|
|
38
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ShipEstimateItem(OrderCloudModel):
|
|
42
|
+
"""An OrderCloud ShipEstimateItem.
|
|
43
|
+
|
|
44
|
+
Attributes:
|
|
45
|
+
line_item_id:
|
|
46
|
+
quantity:
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
line_item_id: Optional[str] = Field(None, alias="LineItemID")
|
|
50
|
+
quantity: Optional[int] = Field(None, alias="Quantity")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ShipEstimate(OrderCloudModel, Generic[XP]):
|
|
54
|
+
"""An OrderCloud ShipEstimate.
|
|
55
|
+
|
|
56
|
+
Attributes:
|
|
57
|
+
id:
|
|
58
|
+
xp:
|
|
59
|
+
selected_ship_method_id:
|
|
60
|
+
ship_estimate_items:
|
|
61
|
+
ship_methods:
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
65
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
66
|
+
selected_ship_method_id: Optional[str] = Field(None, alias="SelectedShipMethodID")
|
|
67
|
+
ship_estimate_items: Optional[list[ShipEstimateItem]] = Field(None, alias="ShipEstimateItems")
|
|
68
|
+
ship_methods: Optional[list[ShipMethod]] = Field(None, alias="ShipMethods")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class ShipEstimateResponse(OrderCloudModel, Generic[XP]):
|
|
72
|
+
"""An OrderCloud ShipEstimateResponse.
|
|
73
|
+
|
|
74
|
+
Attributes:
|
|
75
|
+
ship_estimates:
|
|
76
|
+
http_status_code:
|
|
77
|
+
unhandled_error_body:
|
|
78
|
+
xp:
|
|
79
|
+
succeeded:
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
ship_estimates: Optional[list[ShipEstimate]] = Field(None, alias="ShipEstimates")
|
|
83
|
+
http_status_code: Optional[int] = Field(None, alias="HttpStatusCode")
|
|
84
|
+
unhandled_error_body: Optional[str] = Field(None, alias="UnhandledErrorBody")
|
|
85
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
86
|
+
succeeded: Optional[bool] = Field(None, alias="Succeeded")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ShipmentItem(OrderCloudModel, Generic[XP]):
|
|
90
|
+
"""An OrderCloud ShipmentItem.
|
|
91
|
+
|
|
92
|
+
Attributes:
|
|
93
|
+
order_id:
|
|
94
|
+
line_item_id:
|
|
95
|
+
quantity_shipped:
|
|
96
|
+
unit_price: (read-only)
|
|
97
|
+
cost_center: (read-only)
|
|
98
|
+
date_needed: (read-only)
|
|
99
|
+
product: (read-only)
|
|
100
|
+
variant: (read-only)
|
|
101
|
+
specs: (read-only)
|
|
102
|
+
xp: For reference only, represents line item XP from the given line item ID (read-only)
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
order_id: Optional[str] = Field(None, alias="OrderID")
|
|
106
|
+
line_item_id: Optional[str] = Field(None, alias="LineItemID")
|
|
107
|
+
quantity_shipped: Optional[int] = Field(None, alias="QuantityShipped")
|
|
108
|
+
unit_price: float = Field(0.0, alias="UnitPrice")
|
|
109
|
+
cost_center: Optional[str] = Field(None, alias="CostCenter")
|
|
110
|
+
date_needed: Optional[str] = Field(None, alias="DateNeeded")
|
|
111
|
+
product: Optional[LineItemProduct] = Field(None, alias="Product")
|
|
112
|
+
variant: Optional[LineItemVariant] = Field(None, alias="Variant")
|
|
113
|
+
specs: Optional[list[LineItemSpec]] = Field(None, alias="Specs")
|
|
114
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class Shipment(OrderCloudModel, Generic[XP]):
|
|
118
|
+
"""An OrderCloud Shipment.
|
|
119
|
+
|
|
120
|
+
Attributes:
|
|
121
|
+
id:
|
|
122
|
+
buyer_id:
|
|
123
|
+
shipper: For reference only, does not influence any OrderCloud behavior.
|
|
124
|
+
date_shipped: In order to properly trigger OrderShipped emails, this date must be NULL on initial create. Update with the date only when all of the Shipment items have been created. Once all of an order's items exist on a shipment that has a DateShipped populated the OrderShipped message sender will trigger and Order.Status will be updated to Complete.
|
|
125
|
+
date_delivered:
|
|
126
|
+
tracking_number:
|
|
127
|
+
cost: For reference only, does not influence any OrderCloud behavior.
|
|
128
|
+
owner_id: ID of the organization that owns the shipment. Only the marketplace owner can override the OwnerID on create.
|
|
129
|
+
xp:
|
|
130
|
+
account:
|
|
131
|
+
from_address_id: Marketplace owner or supplier AddressID where the product will be shipped from.
|
|
132
|
+
to_address_id:
|
|
133
|
+
from_address: (read-only)
|
|
134
|
+
to_address: (read-only)
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
id: Optional[str] = Field(None, alias="ID")
|
|
138
|
+
buyer_id: Optional[str] = Field(None, alias="BuyerID")
|
|
139
|
+
shipper: Optional[str] = Field(None, alias="Shipper")
|
|
140
|
+
date_shipped: Optional[str] = Field(None, alias="DateShipped")
|
|
141
|
+
date_delivered: Optional[str] = Field(None, alias="DateDelivered")
|
|
142
|
+
tracking_number: Optional[str] = Field(None, alias="TrackingNumber")
|
|
143
|
+
cost: Optional[float] = Field(None, alias="Cost")
|
|
144
|
+
owner_id: Optional[str] = Field(None, alias="OwnerID")
|
|
145
|
+
xp: Optional[XP] = Field(None, alias="xp")
|
|
146
|
+
account: Optional[str] = Field(None, alias="Account")
|
|
147
|
+
from_address_id: Optional[str] = Field(None, alias="FromAddressID")
|
|
148
|
+
to_address_id: Optional[str] = Field(None, alias="ToAddressID")
|
|
149
|
+
from_address: Optional[Address] = Field(None, alias="FromAddress")
|
|
150
|
+
to_address: Optional[Address] = Field(None, alias="ToAddress")
|