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.
Files changed (114) hide show
  1. ordercloud/__init__.py +37 -0
  2. ordercloud/auth.py +136 -0
  3. ordercloud/client.py +211 -0
  4. ordercloud/config.py +42 -0
  5. ordercloud/errors.py +47 -0
  6. ordercloud/http.py +218 -0
  7. ordercloud/middleware.py +66 -0
  8. ordercloud/models/__init__.py +271 -0
  9. ordercloud/models/address.py +47 -0
  10. ordercloud/models/api_client.py +116 -0
  11. ordercloud/models/approval.py +73 -0
  12. ordercloud/models/assignments.py +402 -0
  13. ordercloud/models/auth_models.py +114 -0
  14. ordercloud/models/bundle.py +31 -0
  15. ordercloud/models/buyer.py +271 -0
  16. ordercloud/models/catalog.py +33 -0
  17. ordercloud/models/category.py +35 -0
  18. ordercloud/models/cost_center.py +27 -0
  19. ordercloud/models/credit_card.py +35 -0
  20. ordercloud/models/delivery.py +277 -0
  21. ordercloud/models/discount.py +63 -0
  22. ordercloud/models/integration.py +76 -0
  23. ordercloud/models/inventory_record.py +53 -0
  24. ordercloud/models/line_item.py +95 -0
  25. ordercloud/models/line_item_types.py +89 -0
  26. ordercloud/models/message_sender.py +80 -0
  27. ordercloud/models/misc.py +280 -0
  28. ordercloud/models/open_id_connect.py +47 -0
  29. ordercloud/models/order.py +477 -0
  30. ordercloud/models/order_return.py +92 -0
  31. ordercloud/models/payment.py +77 -0
  32. ordercloud/models/price_schedule.py +76 -0
  33. ordercloud/models/product.py +227 -0
  34. ordercloud/models/product_collection.py +186 -0
  35. ordercloud/models/promotion.py +297 -0
  36. ordercloud/models/security.py +89 -0
  37. ordercloud/models/shared.py +131 -0
  38. ordercloud/models/shipment.py +150 -0
  39. ordercloud/models/spec.py +67 -0
  40. ordercloud/models/spending_account.py +33 -0
  41. ordercloud/models/subscription.py +125 -0
  42. ordercloud/models/supplier.py +43 -0
  43. ordercloud/models/sync.py +172 -0
  44. ordercloud/models/user.py +207 -0
  45. ordercloud/models/user_group.py +27 -0
  46. ordercloud/models/webhook.py +58 -0
  47. ordercloud/py.typed +0 -0
  48. ordercloud/resources/__init__.py +65 -0
  49. ordercloud/resources/addresses.py +228 -0
  50. ordercloud/resources/admin_addresses.py +128 -0
  51. ordercloud/resources/admin_user_groups.py +185 -0
  52. ordercloud/resources/admin_users.py +150 -0
  53. ordercloud/resources/api_clients.py +308 -0
  54. ordercloud/resources/approval_rules.py +144 -0
  55. ordercloud/resources/base.py +145 -0
  56. ordercloud/resources/bundle_line_items.py +59 -0
  57. ordercloud/resources/bundle_subscription_items.py +54 -0
  58. ordercloud/resources/bundles.py +278 -0
  59. ordercloud/resources/buyer_groups.py +128 -0
  60. ordercloud/resources/buyers.py +164 -0
  61. ordercloud/resources/cart.py +613 -0
  62. ordercloud/resources/catalogs.py +311 -0
  63. ordercloud/resources/categories.py +392 -0
  64. ordercloud/resources/cost_centers.py +222 -0
  65. ordercloud/resources/credit_cards.py +227 -0
  66. ordercloud/resources/delivery_configurations.py +132 -0
  67. ordercloud/resources/discounts.py +201 -0
  68. ordercloud/resources/entity_syncs.py +534 -0
  69. ordercloud/resources/error_configs.py +71 -0
  70. ordercloud/resources/forgotten_credentials.py +74 -0
  71. ordercloud/resources/group_orders.py +28 -0
  72. ordercloud/resources/impersonation_configs.py +132 -0
  73. ordercloud/resources/incrementors.py +128 -0
  74. ordercloud/resources/integration_events.py +203 -0
  75. ordercloud/resources/inventory_integrations.py +65 -0
  76. ordercloud/resources/inventory_records.py +484 -0
  77. ordercloud/resources/line_items.py +262 -0
  78. ordercloud/resources/locales.py +203 -0
  79. ordercloud/resources/me.py +1882 -0
  80. ordercloud/resources/message_senders.py +261 -0
  81. ordercloud/resources/open_id_connects.py +128 -0
  82. ordercloud/resources/order_returns.py +306 -0
  83. ordercloud/resources/order_syncs.py +65 -0
  84. ordercloud/resources/orders.py +689 -0
  85. ordercloud/resources/payments.py +176 -0
  86. ordercloud/resources/price_schedules.py +164 -0
  87. ordercloud/resources/product_collections.py +116 -0
  88. ordercloud/resources/product_facets.py +128 -0
  89. ordercloud/resources/product_syncs.py +76 -0
  90. ordercloud/resources/products.py +454 -0
  91. ordercloud/resources/promotion_integrations.py +65 -0
  92. ordercloud/resources/promotions.py +203 -0
  93. ordercloud/resources/security_profiles.py +222 -0
  94. ordercloud/resources/seller_approval_rules.py +128 -0
  95. ordercloud/resources/shipments.py +256 -0
  96. ordercloud/resources/specs.py +313 -0
  97. ordercloud/resources/spending_accounts.py +227 -0
  98. ordercloud/resources/subscription_integrations.py +65 -0
  99. ordercloud/resources/subscription_items.py +146 -0
  100. ordercloud/resources/subscriptions.py +128 -0
  101. ordercloud/resources/supplier_addresses.py +144 -0
  102. ordercloud/resources/supplier_user_groups.py +210 -0
  103. ordercloud/resources/supplier_users.py +170 -0
  104. ordercloud/resources/suppliers.py +190 -0
  105. ordercloud/resources/tracking_events.py +130 -0
  106. ordercloud/resources/user_groups.py +210 -0
  107. ordercloud/resources/users.py +254 -0
  108. ordercloud/resources/webhooks.py +128 -0
  109. ordercloud/resources/xp_indices.py +77 -0
  110. ordercloud/sync_client.py +170 -0
  111. ordercloud_python-2026.4.1.dist-info/METADATA +552 -0
  112. ordercloud_python-2026.4.1.dist-info/RECORD +114 -0
  113. ordercloud_python-2026.4.1.dist-info/WHEEL +4 -0
  114. ordercloud_python-2026.4.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,67 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud SpecOption, Spec 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 .price_schedule import PriceMarkupType
11
+
12
+ __all__ = ["SpecOption", "Spec"]
13
+ _PriceMarkupType = PriceMarkupType
14
+
15
+
16
+ class SpecOption(OrderCloudModel, Generic[XP]):
17
+ """An OrderCloud SpecOption.
18
+
19
+ Attributes:
20
+ id:
21
+ value:
22
+ list_order:
23
+ is_open_text:
24
+ price_markup_type: Used to change the price of a product when a specific spec option is selected.
25
+ price_markup:
26
+ xp:
27
+ """
28
+
29
+ id: Optional[str] = Field(None, alias="ID")
30
+ value: Optional[str] = Field(None, alias="Value")
31
+ list_order: Optional[int] = Field(None, alias="ListOrder")
32
+ is_open_text: Optional[bool] = Field(None, alias="IsOpenText")
33
+ price_markup_type: Optional[_PriceMarkupType] = Field(None, alias="PriceMarkupType")
34
+ price_markup: Optional[float] = Field(None, alias="PriceMarkup")
35
+ xp: Optional[XP] = Field(None, alias="xp")
36
+
37
+
38
+ class Spec(OrderCloudModel, Generic[XP]):
39
+ """An OrderCloud Spec.
40
+
41
+ Attributes:
42
+ owner_id: ID of the organization that owns the spec. Only the marketplace owner can override the OwnerID on create.
43
+ id:
44
+ list_order:
45
+ name:
46
+ default_value: If no value is passed in the line item spec, this value will be used.
47
+ required:
48
+ allow_open_text: For spec options that are not pre-defined, such as FirstName for a business card.
49
+ default_option_id: This property can only be written to after both the spec and options have been created. If no Spec.OptionID is passed in the line item spec, this option will be used.
50
+ defines_variant: If true, each unique combinations of this spec's options should map to a unique product variant.
51
+ xp:
52
+ option_count: (read-only)
53
+ options: (read-only)
54
+ """
55
+
56
+ owner_id: Optional[str] = Field(None, alias="OwnerID")
57
+ id: Optional[str] = Field(None, alias="ID")
58
+ list_order: Optional[int] = Field(None, alias="ListOrder")
59
+ name: Optional[str] = Field(None, alias="Name")
60
+ default_value: Optional[str] = Field(None, alias="DefaultValue")
61
+ required: Optional[bool] = Field(None, alias="Required")
62
+ allow_open_text: Optional[bool] = Field(None, alias="AllowOpenText")
63
+ default_option_id: Optional[str] = Field(None, alias="DefaultOptionID")
64
+ defines_variant: Optional[bool] = Field(None, alias="DefinesVariant")
65
+ xp: Optional[XP] = Field(None, alias="xp")
66
+ option_count: int = Field(0, alias="OptionCount")
67
+ options: Optional[list[SpecOption]] = Field(None, alias="Options")
@@ -0,0 +1,33 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud SpendingAccount 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__ = ["SpendingAccount"]
12
+
13
+
14
+ class SpendingAccount(OrderCloudModel, Generic[XP]):
15
+ """An OrderCloud SpendingAccount.
16
+
17
+ Attributes:
18
+ id:
19
+ name:
20
+ balance:
21
+ allow_as_payment_method: If true, a payment can be created referencing the SpendingAccountID.
22
+ start_date:
23
+ end_date:
24
+ xp:
25
+ """
26
+
27
+ id: Optional[str] = Field(None, alias="ID")
28
+ name: Optional[str] = Field(None, alias="Name")
29
+ balance: Optional[float] = Field(None, alias="Balance")
30
+ allow_as_payment_method: Optional[bool] = Field(None, alias="AllowAsPaymentMethod")
31
+ start_date: Optional[str] = Field(None, alias="StartDate")
32
+ end_date: Optional[str] = Field(None, alias="EndDate")
33
+ xp: Optional[XP] = Field(None, alias="xp")
@@ -0,0 +1,125 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud SubscriptionInterval 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 OrderCloudEnum, OrderCloudModel, XP
10
+ from .misc import ApiRole
11
+ from .payment import PaymentType
12
+
13
+ __all__ = [
14
+ "SubscriptionInterval",
15
+ "SubscriptionPayment",
16
+ "SubscriptionIntegration",
17
+ "SubscriptionIntegrationResponse",
18
+ "Subscription",
19
+ ]
20
+
21
+
22
+ class SubscriptionInterval(OrderCloudEnum):
23
+ """"""
24
+
25
+ Days = "Days"
26
+ Weeks = "Weeks"
27
+ Months = "Months"
28
+
29
+
30
+ class SubscriptionPayment(OrderCloudModel):
31
+ """An OrderCloud SubscriptionPayment.
32
+
33
+ Attributes:
34
+ type:
35
+ credit_card_id:
36
+ spending_account_id:
37
+ """
38
+
39
+ type: Optional[PaymentType] = Field(None, alias="Type")
40
+ credit_card_id: Optional[str] = Field(None, alias="CreditCardID")
41
+ spending_account_id: Optional[str] = Field(None, alias="SpendingAccountID")
42
+
43
+
44
+ class SubscriptionIntegration(OrderCloudModel, Generic[XP]):
45
+ """An OrderCloud SubscriptionIntegration.
46
+
47
+ Attributes:
48
+ api_client_id: ID of the API client that will be used to generate the token passed to your hosted application via subscription integration.
49
+ hash_key: Security feature that allows your middleware to verify the digital signature in the request header to ensure you only accept trusted data.
50
+ elevated_roles:
51
+ active:
52
+ notification_days:
53
+ url:
54
+ xp:
55
+ custom_auth_header_name: The header name that can be passed to your middleware.
56
+ custom_auth_header_value: The header value that can be passed to your middleware.
57
+ """
58
+
59
+ api_client_id: Optional[str] = Field(None, alias="ApiClientID")
60
+ hash_key: Optional[str] = Field(None, alias="HashKey")
61
+ elevated_roles: Optional[list[ApiRole]] = Field(None, alias="ElevatedRoles")
62
+ active: Optional[bool] = Field(None, alias="Active")
63
+ notification_days: Optional[int] = Field(None, alias="NotificationDays")
64
+ url: Optional[str] = Field(None, alias="Url")
65
+ xp: Optional[XP] = Field(None, alias="xp")
66
+ custom_auth_header_name: Optional[str] = Field(None, alias="CustomAuthHeaderName")
67
+ custom_auth_header_value: Optional[str] = Field(None, alias="CustomAuthHeaderValue")
68
+
69
+
70
+ class SubscriptionIntegrationResponse(OrderCloudModel, Generic[XP]):
71
+ """An OrderCloud SubscriptionIntegrationResponse.
72
+
73
+ Attributes:
74
+ http_status_code:
75
+ unhandled_error_body:
76
+ xp:
77
+ succeeded:
78
+ """
79
+
80
+ http_status_code: Optional[int] = Field(None, alias="HttpStatusCode")
81
+ unhandled_error_body: Optional[str] = Field(None, alias="UnhandledErrorBody")
82
+ xp: Optional[XP] = Field(None, alias="xp")
83
+ succeeded: Optional[bool] = Field(None, alias="Succeeded")
84
+
85
+
86
+ class Subscription(OrderCloudModel, Generic[XP]):
87
+ """An OrderCloud Subscription.
88
+
89
+ Attributes:
90
+ id:
91
+ frequency: Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.
92
+ interval: Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.
93
+ next_order_date: Next order date of the subscription. The hourly process that creates subscription orders will query for subscriptions with a NextOrderDate between now and five hours ago.
94
+ last_order_date: (read-only)
95
+ notification_date: Date that subscription order reminder message sender will be triggered if used. Value is the result of NextOrderDate less NotificationDays on the subscription integration. (read-only)
96
+ date_created: (read-only)
97
+ end_date:
98
+ active:
99
+ from_company_id: Only use when creating a subscription on behalf of another user. ID of the buyer or marketplace owner placing the order.
100
+ from_user_id: Only use when creating a subscription on behalf of a another user.
101
+ to_company_id: ID of the marketplace owner or supplier receiving the order created by this subscription, only writable on create.
102
+ payment:
103
+ billing_address_id:
104
+ shipping_address_id:
105
+ projected_subtotal: Tentative subtotal of next subscription order. Based on current known pricing; avoid if product or pricing is provided by an external integration. (read-only)
106
+ xp:
107
+ """
108
+
109
+ id: Optional[str] = Field(None, alias="ID")
110
+ frequency: Optional[int] = Field(None, alias="Frequency")
111
+ interval: Optional[SubscriptionInterval] = Field(None, alias="Interval")
112
+ next_order_date: Optional[str] = Field(None, alias="NextOrderDate")
113
+ last_order_date: Optional[str] = Field(None, alias="LastOrderDate")
114
+ notification_date: Optional[str] = Field(None, alias="NotificationDate")
115
+ date_created: Optional[str] = Field(None, alias="DateCreated")
116
+ end_date: Optional[str] = Field(None, alias="EndDate")
117
+ active: bool = Field(True, alias="Active")
118
+ from_company_id: Optional[str] = Field(None, alias="FromCompanyID")
119
+ from_user_id: Optional[str] = Field(None, alias="FromUserID")
120
+ to_company_id: Optional[str] = Field(None, alias="ToCompanyID")
121
+ payment: Optional[SubscriptionPayment] = Field(None, alias="Payment")
122
+ billing_address_id: Optional[str] = Field(None, alias="BillingAddressID")
123
+ shipping_address_id: Optional[str] = Field(None, alias="ShippingAddressID")
124
+ projected_subtotal: float = Field(0.0, alias="ProjectedSubtotal")
125
+ xp: Optional[XP] = Field(None, alias="xp")
@@ -0,0 +1,43 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud SupplierBuyer, Supplier 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__ = ["SupplierBuyer", "Supplier"]
12
+
13
+
14
+ class SupplierBuyer(OrderCloudModel):
15
+ """An OrderCloud SupplierBuyer.
16
+
17
+ Attributes:
18
+ id:
19
+ name:
20
+ """
21
+
22
+ id: Optional[str] = Field(None, alias="ID")
23
+ name: Optional[str] = Field(None, alias="Name")
24
+
25
+
26
+ class Supplier(OrderCloudModel, Generic[XP]):
27
+ """An OrderCloud Supplier.
28
+
29
+ Attributes:
30
+ id:
31
+ name:
32
+ active: If false, all user authentication is blocked.
33
+ date_created: (read-only)
34
+ all_buyers_can_order: If false, buyers will only be able to set ToCompanyID on an order to the marketplace owner, or suppliers they have an explicit relationship to.
35
+ xp:
36
+ """
37
+
38
+ id: Optional[str] = Field(None, alias="ID")
39
+ name: Optional[str] = Field(None, alias="Name")
40
+ active: Optional[bool] = Field(None, alias="Active")
41
+ date_created: Optional[str] = Field(None, alias="DateCreated")
42
+ all_buyers_can_order: Optional[bool] = Field(None, alias="AllBuyersCanOrder")
43
+ xp: Optional[XP] = Field(None, alias="xp")
@@ -0,0 +1,172 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud EntitySyncConfig and related models."""
4
+
5
+ from __future__ import annotations
6
+ from typing import Any, Optional
7
+ from pydantic import Field
8
+
9
+ from .shared import OrderCloudModel
10
+
11
+ __all__ = [
12
+ "EntitySyncConfig",
13
+ "OrderSyncConfig",
14
+ "ProductSyncConfig",
15
+ "SyncAdminUser",
16
+ "SyncBuyer",
17
+ "SyncBuyerUser",
18
+ "SyncBuyerUserGroup",
19
+ "SyncCategory",
20
+ "SyncInventoryRecord",
21
+ "SyncProduct",
22
+ "SyncSupplier",
23
+ "SyncSupplierUser",
24
+ ]
25
+
26
+
27
+ class EntitySyncConfig(OrderCloudModel):
28
+ """An OrderCloud EntitySyncConfig.
29
+
30
+ Attributes:
31
+ delivery_config_id:
32
+ sync_entity_changed:
33
+ sync_entity_deleted:
34
+ paused:
35
+ """
36
+
37
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
38
+ sync_entity_changed: Optional[bool] = Field(None, alias="SyncEntityChanged")
39
+ sync_entity_deleted: Optional[bool] = Field(None, alias="SyncEntityDeleted")
40
+ paused: Optional[bool] = Field(None, alias="Paused")
41
+
42
+
43
+ class OrderSyncConfig(OrderCloudModel):
44
+ """An OrderCloud OrderSyncConfig.
45
+
46
+ Attributes:
47
+ delivery_config_id:
48
+ config_data:
49
+ """
50
+
51
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
52
+ config_data: Optional[dict[str, Any]] = Field(None, alias="ConfigData")
53
+
54
+
55
+ class ProductSyncConfig(OrderCloudModel):
56
+ """An OrderCloud ProductSyncConfig.
57
+
58
+ Attributes:
59
+ sync_product_changed:
60
+ sync_product_deleted:
61
+ delivery_config_id:
62
+ config_data:
63
+ paused:
64
+ exclude_price_schedules:
65
+ """
66
+
67
+ sync_product_changed: Optional[bool] = Field(None, alias="SyncProductChanged")
68
+ sync_product_deleted: Optional[bool] = Field(None, alias="SyncProductDeleted")
69
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
70
+ config_data: Optional[dict[str, Any]] = Field(None, alias="ConfigData")
71
+ paused: Optional[bool] = Field(None, alias="Paused")
72
+ exclude_price_schedules: Optional[bool] = Field(None, alias="ExcludePriceSchedules")
73
+
74
+
75
+ class SyncAdminUser(OrderCloudModel):
76
+ """An OrderCloud SyncAdminUser.
77
+
78
+ Attributes:
79
+ user_id:
80
+ """
81
+
82
+ user_id: Optional[str] = Field(None, alias="UserID")
83
+
84
+
85
+ class SyncBuyer(OrderCloudModel):
86
+ """An OrderCloud SyncBuyer.
87
+
88
+ Attributes:
89
+ buyer_id:
90
+ """
91
+
92
+ buyer_id: Optional[str] = Field(None, alias="BuyerID")
93
+
94
+
95
+ class SyncBuyerUser(OrderCloudModel):
96
+ """An OrderCloud SyncBuyerUser.
97
+
98
+ Attributes:
99
+ buyer_id:
100
+ user_id:
101
+ """
102
+
103
+ buyer_id: Optional[str] = Field(None, alias="BuyerID")
104
+ user_id: Optional[str] = Field(None, alias="UserID")
105
+
106
+
107
+ class SyncBuyerUserGroup(OrderCloudModel):
108
+ """An OrderCloud SyncBuyerUserGroup.
109
+
110
+ Attributes:
111
+ buyer_id:
112
+ user_group_id:
113
+ """
114
+
115
+ buyer_id: Optional[str] = Field(None, alias="BuyerID")
116
+ user_group_id: Optional[str] = Field(None, alias="UserGroupID")
117
+
118
+
119
+ class SyncCategory(OrderCloudModel):
120
+ """An OrderCloud SyncCategory.
121
+
122
+ Attributes:
123
+ catalog_id:
124
+ category_id:
125
+ """
126
+
127
+ catalog_id: Optional[str] = Field(None, alias="CatalogID")
128
+ category_id: Optional[str] = Field(None, alias="CategoryID")
129
+
130
+
131
+ class SyncInventoryRecord(OrderCloudModel):
132
+ """An OrderCloud SyncInventoryRecord.
133
+
134
+ Attributes:
135
+ product_id:
136
+ inventory_record_id:
137
+ """
138
+
139
+ product_id: Optional[str] = Field(None, alias="ProductID")
140
+ inventory_record_id: Optional[str] = Field(None, alias="InventoryRecordID")
141
+
142
+
143
+ class SyncProduct(OrderCloudModel):
144
+ """An OrderCloud SyncProduct.
145
+
146
+ Attributes:
147
+ product_id:
148
+ """
149
+
150
+ product_id: Optional[str] = Field(None, alias="ProductID")
151
+
152
+
153
+ class SyncSupplier(OrderCloudModel):
154
+ """An OrderCloud SyncSupplier.
155
+
156
+ Attributes:
157
+ supplier_id:
158
+ """
159
+
160
+ supplier_id: Optional[str] = Field(None, alias="SupplierID")
161
+
162
+
163
+ class SyncSupplierUser(OrderCloudModel):
164
+ """An OrderCloud SyncSupplierUser.
165
+
166
+ Attributes:
167
+ supplier_id:
168
+ user_id:
169
+ """
170
+
171
+ supplier_id: Optional[str] = Field(None, alias="SupplierID")
172
+ user_id: Optional[str] = Field(None, alias="UserID")
@@ -0,0 +1,207 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud Locale 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 OrderCloudEnum, OrderCloudModel, XP
10
+
11
+ __all__ = [
12
+ "UserOrderMoveOption",
13
+ "Locale",
14
+ "MeBuyer",
15
+ "MeSeller",
16
+ "MeSupplier",
17
+ "OrderUser",
18
+ "MeUser",
19
+ "User",
20
+ ]
21
+
22
+
23
+ class UserOrderMoveOption(OrderCloudEnum):
24
+ """"""
25
+
26
+ _None = "None"
27
+ Unsubmitted = "Unsubmitted"
28
+ All = "All"
29
+
30
+
31
+ class Locale(OrderCloudModel):
32
+ """An OrderCloud Locale.
33
+
34
+ Attributes:
35
+ id:
36
+ owner_id: ID of the organization that owns the Locale. Only the marketplace owner can override the OwnerID on create.
37
+ currency: We recommend using ISO-4217 currency codes for compatibility with tax and payment processors.
38
+ language: We recommend using ISO-639 language code - ISO-3166 Country code (e.g. en-US).
39
+ """
40
+
41
+ id: Optional[str] = Field(None, alias="ID")
42
+ owner_id: Optional[str] = Field(None, alias="OwnerID")
43
+ currency: Optional[str] = Field(None, alias="Currency")
44
+ language: Optional[str] = Field(None, alias="Language")
45
+
46
+
47
+ class MeBuyer(OrderCloudModel):
48
+ """An OrderCloud MeBuyer.
49
+
50
+ Attributes:
51
+ id: (read-only)
52
+ default_catalog_id: (read-only)
53
+ """
54
+
55
+ id: Optional[str] = Field(None, alias="ID")
56
+ default_catalog_id: Optional[str] = Field(None, alias="DefaultCatalogID")
57
+
58
+
59
+ class MeSeller(OrderCloudModel):
60
+ """An OrderCloud MeSeller.
61
+
62
+ Attributes:
63
+ id: (read-only)
64
+ """
65
+
66
+ id: Optional[str] = Field(None, alias="ID")
67
+
68
+
69
+ class MeSupplier(OrderCloudModel):
70
+ """An OrderCloud MeSupplier.
71
+
72
+ Attributes:
73
+ id: (read-only)
74
+ """
75
+
76
+ id: Optional[str] = Field(None, alias="ID")
77
+
78
+
79
+ class OrderUser(OrderCloudModel, Generic[XP]):
80
+ """An OrderCloud OrderUser.
81
+
82
+ Attributes:
83
+ id:
84
+ company_id: (read-only)
85
+ username: Must be unique across all organizations.
86
+ password:
87
+ first_name:
88
+ last_name:
89
+ email:
90
+ phone:
91
+ terms_accepted:
92
+ active: If false, authentication is prohibited.
93
+ xp:
94
+ available_roles: List of roles currently available to the user via all security profile assignments. (read-only)
95
+ locale: Most specific locale assigned to the user, if any. (read-only)
96
+ date_created: (read-only)
97
+ last_active: Accurate within a few minutes. Includes impersonation activity. (read-only)
98
+ password_last_set_date: Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules. (read-only)
99
+ """
100
+
101
+ id: Optional[str] = Field(None, alias="ID")
102
+ company_id: Optional[str] = Field(None, alias="CompanyID")
103
+ username: Optional[str] = Field(None, alias="Username")
104
+ password: Optional[str] = Field(None, alias="Password")
105
+ first_name: Optional[str] = Field(None, alias="FirstName")
106
+ last_name: Optional[str] = Field(None, alias="LastName")
107
+ email: Optional[str] = Field(None, alias="Email")
108
+ phone: Optional[str] = Field(None, alias="Phone")
109
+ terms_accepted: Optional[str] = Field(None, alias="TermsAccepted")
110
+ active: Optional[bool] = Field(None, alias="Active")
111
+ xp: Optional[XP] = Field(None, alias="xp")
112
+ available_roles: Optional[list[str]] = Field(None, alias="AvailableRoles")
113
+ locale: Optional[_Locale] = Field(None, alias="Locale")
114
+ date_created: Optional[str] = Field(None, alias="DateCreated")
115
+ last_active: Optional[str] = Field(None, alias="LastActive")
116
+ password_last_set_date: Optional[str] = Field(None, alias="PasswordLastSetDate")
117
+
118
+
119
+ class MeUser(OrderCloudModel, Generic[XP]):
120
+ """An OrderCloud MeUser.
121
+
122
+ Attributes:
123
+ buyer: (read-only)
124
+ supplier: (read-only)
125
+ seller: (read-only)
126
+ id:
127
+ company_id: (read-only)
128
+ username: Must be unique across all organizations.
129
+ password:
130
+ first_name:
131
+ last_name:
132
+ email:
133
+ phone:
134
+ terms_accepted:
135
+ active: If false, authentication is prohibited.
136
+ xp:
137
+ available_roles: List of roles currently available to the user via all security profile assignments. (read-only)
138
+ locale: Most specific locale assigned to the user, if any. (read-only)
139
+ date_created: (read-only)
140
+ last_active: Accurate within a few minutes. Includes impersonation activity. (read-only)
141
+ password_last_set_date: Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules. (read-only)
142
+ """
143
+
144
+ buyer: Optional[MeBuyer] = Field(None, alias="Buyer")
145
+ supplier: Optional[MeSupplier] = Field(None, alias="Supplier")
146
+ seller: Optional[MeSeller] = Field(None, alias="Seller")
147
+ id: Optional[str] = Field(None, alias="ID")
148
+ company_id: Optional[str] = Field(None, alias="CompanyID")
149
+ username: Optional[str] = Field(None, alias="Username")
150
+ password: Optional[str] = Field(None, alias="Password")
151
+ first_name: Optional[str] = Field(None, alias="FirstName")
152
+ last_name: Optional[str] = Field(None, alias="LastName")
153
+ email: Optional[str] = Field(None, alias="Email")
154
+ phone: Optional[str] = Field(None, alias="Phone")
155
+ terms_accepted: Optional[str] = Field(None, alias="TermsAccepted")
156
+ active: Optional[bool] = Field(None, alias="Active")
157
+ xp: Optional[XP] = Field(None, alias="xp")
158
+ available_roles: Optional[list[str]] = Field(None, alias="AvailableRoles")
159
+ locale: Optional[_Locale] = Field(None, alias="Locale")
160
+ date_created: Optional[str] = Field(None, alias="DateCreated")
161
+ last_active: Optional[str] = Field(None, alias="LastActive")
162
+ password_last_set_date: Optional[str] = Field(None, alias="PasswordLastSetDate")
163
+
164
+
165
+ class User(OrderCloudModel, Generic[XP]):
166
+ """An OrderCloud User.
167
+
168
+ Attributes:
169
+ failed_login_attempts: Number of times the user failed authentication due to incorrect password since last successful attempt, or since being unlocked. (read-only)
170
+ id:
171
+ company_id: (read-only)
172
+ username: Must be unique across all organizations.
173
+ password:
174
+ first_name:
175
+ last_name:
176
+ email:
177
+ phone:
178
+ terms_accepted:
179
+ active: If false, authentication is prohibited.
180
+ xp:
181
+ available_roles: List of roles currently available to the user via all security profile assignments. (read-only)
182
+ locale: Most specific locale assigned to the user, if any. (read-only)
183
+ date_created: (read-only)
184
+ last_active: Accurate within a few minutes. Includes impersonation activity. (read-only)
185
+ password_last_set_date: Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules. (read-only)
186
+ """
187
+
188
+ failed_login_attempts: int = Field(0, alias="FailedLoginAttempts")
189
+ id: Optional[str] = Field(None, alias="ID")
190
+ company_id: Optional[str] = Field(None, alias="CompanyID")
191
+ username: Optional[str] = Field(None, alias="Username")
192
+ password: Optional[str] = Field(None, alias="Password")
193
+ first_name: Optional[str] = Field(None, alias="FirstName")
194
+ last_name: Optional[str] = Field(None, alias="LastName")
195
+ email: Optional[str] = Field(None, alias="Email")
196
+ phone: Optional[str] = Field(None, alias="Phone")
197
+ terms_accepted: Optional[str] = Field(None, alias="TermsAccepted")
198
+ active: Optional[bool] = Field(None, alias="Active")
199
+ xp: Optional[XP] = Field(None, alias="xp")
200
+ available_roles: Optional[list[str]] = Field(None, alias="AvailableRoles")
201
+ locale: Optional[_Locale] = Field(None, alias="Locale")
202
+ date_created: Optional[str] = Field(None, alias="DateCreated")
203
+ last_active: Optional[str] = Field(None, alias="LastActive")
204
+ password_last_set_date: Optional[str] = Field(None, alias="PasswordLastSetDate")
205
+
206
+
207
+ _Locale = Locale
@@ -0,0 +1,27 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud UserGroup 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__ = ["UserGroup"]
12
+
13
+
14
+ class UserGroup(OrderCloudModel, Generic[XP]):
15
+ """An OrderCloud UserGroup.
16
+
17
+ Attributes:
18
+ id:
19
+ name:
20
+ description:
21
+ xp:
22
+ """
23
+
24
+ id: Optional[str] = Field(None, alias="ID")
25
+ name: Optional[str] = Field(None, alias="Name")
26
+ description: Optional[str] = Field(None, alias="Description")
27
+ xp: Optional[XP] = Field(None, alias="xp")