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,63 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud DiscountBreak, DiscountedPrices, Discount 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__ = ["DiscountBreak", "DiscountedPrices", "Discount"]
12
+
13
+
14
+ class DiscountBreak(OrderCloudModel):
15
+ """An OrderCloud DiscountBreak.
16
+
17
+ Attributes:
18
+ quantity: Minimum quantity required for this discount tier.
19
+ amount: Percentage discount (e.g., 10.5 for 10.5% off). Must be between 0 and 100.
20
+ """
21
+
22
+ quantity: Optional[int] = Field(None, alias="Quantity")
23
+ amount: Optional[float] = Field(None, alias="Amount")
24
+
25
+
26
+ class DiscountedPrices(OrderCloudModel):
27
+ """An OrderCloud DiscountedPrices.
28
+
29
+ Attributes:
30
+ price: Discounted price per unit.
31
+ sale_price: Discounted sale price per unit.
32
+ subscription_price: Discounted subscription price per unit.
33
+ bundle_price: Discounted bundle price per unit.
34
+ """
35
+
36
+ price: Optional[float] = Field(None, alias="Price")
37
+ sale_price: Optional[float] = Field(None, alias="SalePrice")
38
+ subscription_price: Optional[float] = Field(None, alias="SubscriptionPrice")
39
+ bundle_price: Optional[float] = Field(None, alias="BundlePrice")
40
+
41
+
42
+ class Discount(OrderCloudModel, Generic[XP]):
43
+ """An OrderCloud Discount.
44
+
45
+ Attributes:
46
+ id:
47
+ description:
48
+ discount_breaks: Quantity-based percentage discount tiers. Each tier specifies a minimum quantity and percentage discount amount.
49
+ product_filter:
50
+ catalog_id:
51
+ category_id:
52
+ product_id:
53
+ xp:
54
+ """
55
+
56
+ id: Optional[str] = Field(None, alias="ID")
57
+ description: Optional[str] = Field(None, alias="Description")
58
+ discount_breaks: Optional[list[DiscountBreak]] = Field(None, alias="DiscountBreaks")
59
+ product_filter: Optional[str] = Field(None, alias="ProductFilter")
60
+ catalog_id: Optional[str] = Field(None, alias="CatalogID")
61
+ category_id: Optional[str] = Field(None, alias="CategoryID")
62
+ product_id: Optional[str] = Field(None, alias="ProductID")
63
+ xp: Optional[XP] = Field(None, alias="xp")
@@ -0,0 +1,76 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud IntegrationEventType 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 OrderCloudEnum, OrderCloudModel
10
+ from .misc import ApiRole
11
+
12
+ __all__ = ["IntegrationEventType", "TrackingEventType", "IntegrationEvent", "TrackingEvent"]
13
+
14
+
15
+ class IntegrationEventType(OrderCloudEnum):
16
+ """"""
17
+
18
+ OrderCheckout = "OrderCheckout"
19
+ OpenIDConnect = "OpenIDConnect"
20
+ OrderReturn = "OrderReturn"
21
+ AddToCart = "AddToCart"
22
+
23
+
24
+ class TrackingEventType(OrderCloudEnum):
25
+ """"""
26
+
27
+ UserLoggedIn = "UserLoggedIn"
28
+ LineItemAdded = "LineItemAdded"
29
+ LineItemUpdated = "LineItemUpdated"
30
+ OrderSubmitted = "OrderSubmitted"
31
+
32
+
33
+ class IntegrationEvent(OrderCloudModel):
34
+ """An OrderCloud IntegrationEvent.
35
+
36
+ Attributes:
37
+ elevated_roles:
38
+ id:
39
+ config_data: Any additional data needed for your integration event should be included here.
40
+ event_type:
41
+ custom_implementation_url: URL the integration event will POST data to, likely a route within your middleware.
42
+ custom_auth_header_name: The header name that can be passed to your middleware.
43
+ custom_auth_header_value: The header value that can be passed to your middleware.
44
+ name:
45
+ hash_key: Security feature that allows your middleware to verify the digital signature in the request header to ensure you only accept trusted data.
46
+ """
47
+
48
+ elevated_roles: Optional[list[ApiRole]] = Field(None, alias="ElevatedRoles")
49
+ id: Optional[str] = Field(None, alias="ID")
50
+ config_data: Optional[dict[str, Any]] = Field(None, alias="ConfigData")
51
+ event_type: Optional[IntegrationEventType] = Field(None, alias="EventType")
52
+ custom_implementation_url: Optional[str] = Field(None, alias="CustomImplementationUrl")
53
+ custom_auth_header_name: Optional[str] = Field(None, alias="CustomAuthHeaderName")
54
+ custom_auth_header_value: Optional[str] = Field(None, alias="CustomAuthHeaderValue")
55
+ name: Optional[str] = Field(None, alias="Name")
56
+ hash_key: Optional[str] = Field(None, alias="HashKey")
57
+
58
+
59
+ class TrackingEvent(OrderCloudModel):
60
+ """An OrderCloud TrackingEvent.
61
+
62
+ Attributes:
63
+ id:
64
+ event_type:
65
+ client_id:
66
+ name:
67
+ config_data:
68
+ delivery_config_id:
69
+ """
70
+
71
+ id: Optional[str] = Field(None, alias="ID")
72
+ event_type: Optional[TrackingEventType] = Field(None, alias="EventType")
73
+ client_id: Optional[str] = Field(None, alias="ClientID")
74
+ name: Optional[str] = Field(None, alias="Name")
75
+ config_data: Optional[dict[str, Any]] = Field(None, alias="ConfigData")
76
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
@@ -0,0 +1,53 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud InventoryIntegration, InventoryRecord 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
+
12
+ __all__ = ["InventoryIntegration", "InventoryRecord"]
13
+ _Address = Address
14
+
15
+
16
+ class InventoryIntegration(OrderCloudModel):
17
+ """An OrderCloud InventoryIntegration.
18
+
19
+ Attributes:
20
+ delivery_config_id:
21
+ limit_notifications: When true, events will only fire when QuantityAvailable changes in the following ways: is equal to or less than 0, increases from 0 or less than 0 to a positive number, is equal to or less than NotificationPoint, increases from a number equal to or less than the NotificationPoint to a number greater than the NotificationPoint.
22
+ """
23
+
24
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
25
+ limit_notifications: Optional[bool] = Field(None, alias="LimitNotifications")
26
+
27
+
28
+ class InventoryRecord(OrderCloudModel, Generic[XP]):
29
+ """An OrderCloud InventoryRecord.
30
+
31
+ Attributes:
32
+ id:
33
+ owner_id:
34
+ allow_all_buyers: Allow inventory record to be used by all buyers without creating explicit assignments.
35
+ address: (read-only)
36
+ address_id: AddressID is required because an inventory record represents a location where physical inventory for a given product exists.
37
+ order_can_exceed:
38
+ quantity_available:
39
+ notification_point:
40
+ last_updated: (read-only)
41
+ xp:
42
+ """
43
+
44
+ id: Optional[str] = Field(None, alias="ID")
45
+ owner_id: Optional[str] = Field(None, alias="OwnerID")
46
+ allow_all_buyers: bool = Field(True, alias="AllowAllBuyers")
47
+ address: Optional[_Address] = Field(None, alias="Address")
48
+ address_id: Optional[str] = Field(None, alias="AddressID")
49
+ order_can_exceed: Optional[bool] = Field(None, alias="OrderCanExceed")
50
+ quantity_available: Optional[int] = Field(None, alias="QuantityAvailable")
51
+ notification_point: Optional[int] = Field(None, alias="NotificationPoint")
52
+ last_updated: Optional[str] = Field(None, alias="LastUpdated")
53
+ xp: Optional[XP] = Field(None, alias="xp")
@@ -0,0 +1,95 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud BundleItems, LineItem 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__ = ["BundleItems", "LineItem"]
14
+
15
+
16
+ class BundleItems(OrderCloudModel):
17
+ """An OrderCloud BundleItems.
18
+
19
+ Attributes:
20
+ line_items:
21
+ """
22
+
23
+ line_items: Optional[list[LineItem]] = Field(None, alias="LineItems")
24
+
25
+
26
+ class LineItem(OrderCloudModel, Generic[XP]):
27
+ """An OrderCloud LineItem.
28
+
29
+ Attributes:
30
+ id:
31
+ product_id:
32
+ quantity:
33
+ bundle_item_id: The ID of the line item that represents the bundle. Signifies that the product is being purchased as part of a bundle. (read-only)
34
+ is_bundle: When true, this item represents a bundle being purchased. (read-only)
35
+ date_added: (read-only)
36
+ quantity_shipped: Sum of QuantityShipped from all shipment items. (read-only)
37
+ unit_price: Auto calculated price per quantity. Modification requires OverrideUnitPrice role.
38
+ promotion_discount: Sum of all line item level promotion discount amounts applied. (read-only)
39
+ base_discount: Discount amount from discount assignments applied to this line item. (read-only)
40
+ discount_id: ID of the discount applied to this line item. (read-only)
41
+ line_total: LineSubtotal - BaseDiscount - PromotionDiscount (read-only)
42
+ line_subtotal: UnitPrice x Quantity (read-only)
43
+ cost_center: For reference only, does not influence any OrderCloud behavior.
44
+ date_needed:
45
+ shipping_account: For reference only, does not influence any OrderCloud behavior.
46
+ shipping_address_id:
47
+ ship_from_address_id: Marketplace owner or supplier AddressID where the product will be shipped from. Can be used to calculate shipping costs.
48
+ product: (read-only)
49
+ variant: (read-only)
50
+ shipping_address: (read-only)
51
+ ship_from_address: (read-only)
52
+ supplier_id: (read-only)
53
+ inventory_record_id: InventoryRecordID of which product inventory location to use. Cannot be modified once an order is submitted.
54
+ price_schedule_id: PriceScheduleID used to determine unit price. (read-only)
55
+ is_on_sale: True when the price schedule and price break has an active SalePrice. (read-only)
56
+ price_overridden: If true, UnitPrice was overridden. (read-only)
57
+ specs:
58
+ incoming_order_id: ID of the original order. Only returns a value for the marketplace owner. (read-only)
59
+ outgoing_order_id: ID of the split or forwarded order. Only returns a value for the marketplace owner. (read-only)
60
+ invitation_id: (read-only)
61
+ xp:
62
+ """
63
+
64
+ id: Optional[str] = Field(None, alias="ID")
65
+ product_id: Optional[str] = Field(None, alias="ProductID")
66
+ quantity: int = Field(1, alias="Quantity")
67
+ bundle_item_id: Optional[str] = Field(None, alias="BundleItemID")
68
+ is_bundle: Optional[bool] = Field(None, alias="IsBundle")
69
+ date_added: Optional[str] = Field(None, alias="DateAdded")
70
+ quantity_shipped: int = Field(0, alias="QuantityShipped")
71
+ unit_price: Optional[float] = Field(None, alias="UnitPrice")
72
+ promotion_discount: float = Field(0.0, alias="PromotionDiscount")
73
+ base_discount: float = Field(0.0, alias="BaseDiscount")
74
+ discount_id: Optional[str] = Field(None, alias="DiscountID")
75
+ line_total: float = Field(0.0, alias="LineTotal")
76
+ line_subtotal: float = Field(0.0, alias="LineSubtotal")
77
+ cost_center: Optional[str] = Field(None, alias="CostCenter")
78
+ date_needed: Optional[str] = Field(None, alias="DateNeeded")
79
+ shipping_account: Optional[str] = Field(None, alias="ShippingAccount")
80
+ shipping_address_id: Optional[str] = Field(None, alias="ShippingAddressID")
81
+ ship_from_address_id: Optional[str] = Field(None, alias="ShipFromAddressID")
82
+ product: Optional[LineItemProduct] = Field(None, alias="Product")
83
+ variant: Optional[LineItemVariant] = Field(None, alias="Variant")
84
+ shipping_address: Optional[Address] = Field(None, alias="ShippingAddress")
85
+ ship_from_address: Optional[Address] = Field(None, alias="ShipFromAddress")
86
+ supplier_id: Optional[str] = Field(None, alias="SupplierID")
87
+ inventory_record_id: Optional[str] = Field(None, alias="InventoryRecordID")
88
+ price_schedule_id: Optional[str] = Field(None, alias="PriceScheduleID")
89
+ is_on_sale: Optional[bool] = Field(None, alias="IsOnSale")
90
+ price_overridden: Optional[bool] = Field(None, alias="PriceOverridden")
91
+ specs: Optional[list[LineItemSpec]] = Field(None, alias="Specs")
92
+ incoming_order_id: Optional[str] = Field(None, alias="IncomingOrderID")
93
+ outgoing_order_id: Optional[str] = Field(None, alias="OutgoingOrderID")
94
+ invitation_id: Optional[str] = Field(None, alias="InvitationID")
95
+ 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 LineItemProduct, LineItemVariant, LineItemSpec 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__ = ["LineItemProduct", "LineItemVariant", "LineItemSpec"]
13
+ _PriceMarkupType = PriceMarkupType
14
+
15
+
16
+ class LineItemProduct(OrderCloudModel, Generic[XP]):
17
+ """An OrderCloud LineItemProduct.
18
+
19
+ Attributes:
20
+ id:
21
+ name:
22
+ description:
23
+ returnable:
24
+ quantity_multiplier:
25
+ ship_weight:
26
+ ship_height:
27
+ ship_width:
28
+ ship_length:
29
+ default_supplier_id:
30
+ parent_id:
31
+ xp:
32
+ """
33
+
34
+ id: Optional[str] = Field(None, alias="ID")
35
+ name: Optional[str] = Field(None, alias="Name")
36
+ description: Optional[str] = Field(None, alias="Description")
37
+ returnable: Optional[bool] = Field(None, alias="Returnable")
38
+ quantity_multiplier: Optional[int] = Field(None, alias="QuantityMultiplier")
39
+ ship_weight: Optional[float] = Field(None, alias="ShipWeight")
40
+ ship_height: Optional[float] = Field(None, alias="ShipHeight")
41
+ ship_width: Optional[float] = Field(None, alias="ShipWidth")
42
+ ship_length: Optional[float] = Field(None, alias="ShipLength")
43
+ default_supplier_id: Optional[str] = Field(None, alias="DefaultSupplierID")
44
+ parent_id: Optional[str] = Field(None, alias="ParentID")
45
+ xp: Optional[XP] = Field(None, alias="xp")
46
+
47
+
48
+ class LineItemVariant(OrderCloudModel, Generic[XP]):
49
+ """An OrderCloud LineItemVariant.
50
+
51
+ Attributes:
52
+ id:
53
+ name:
54
+ description:
55
+ ship_weight:
56
+ ship_height:
57
+ ship_width:
58
+ ship_length:
59
+ xp:
60
+ """
61
+
62
+ id: Optional[str] = Field(None, alias="ID")
63
+ name: Optional[str] = Field(None, alias="Name")
64
+ description: Optional[str] = Field(None, alias="Description")
65
+ ship_weight: Optional[float] = Field(None, alias="ShipWeight")
66
+ ship_height: Optional[float] = Field(None, alias="ShipHeight")
67
+ ship_width: Optional[float] = Field(None, alias="ShipWidth")
68
+ ship_length: Optional[float] = Field(None, alias="ShipLength")
69
+ xp: Optional[XP] = Field(None, alias="xp")
70
+
71
+
72
+ class LineItemSpec(OrderCloudModel):
73
+ """An OrderCloud LineItemSpec.
74
+
75
+ Attributes:
76
+ spec_id:
77
+ name: (read-only)
78
+ option_id:
79
+ value:
80
+ price_markup_type:
81
+ price_markup:
82
+ """
83
+
84
+ spec_id: Optional[str] = Field(None, alias="SpecID")
85
+ name: Optional[str] = Field(None, alias="Name")
86
+ option_id: Optional[str] = Field(None, alias="OptionID")
87
+ value: Optional[str] = Field(None, alias="Value")
88
+ price_markup_type: Optional[_PriceMarkupType] = Field(None, alias="PriceMarkupType")
89
+ price_markup: Optional[float] = Field(None, alias="PriceMarkup")
@@ -0,0 +1,80 @@
1
+ # GENERATED by tools/codegen — DO NOT EDIT
2
+ # Source: ordercloud-openapi-v3.json
3
+ """OrderCloud MessageType, MessageSenderConfig, MessageSender 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
+
12
+ __all__ = ["MessageType", "MessageSenderConfig", "MessageSender"]
13
+
14
+
15
+ class MessageType(OrderCloudEnum):
16
+ """"""
17
+
18
+ OrderDeclined = "OrderDeclined"
19
+ OrderSubmitted = "OrderSubmitted"
20
+ ShipmentCreated = "ShipmentCreated"
21
+ ForgottenPassword = "ForgottenPassword"
22
+ ForgottenUsername = "ForgottenUsername"
23
+ OrderSubmittedForYourApproval = "OrderSubmittedForYourApproval"
24
+ OrderSubmittedForApproval = "OrderSubmittedForApproval"
25
+ OrderApproved = "OrderApproved"
26
+ OrderSubmittedForYourApprovalHasBeenApproved = "OrderSubmittedForYourApprovalHasBeenApproved"
27
+ OrderSubmittedForYourApprovalHasBeenDeclined = "OrderSubmittedForYourApprovalHasBeenDeclined"
28
+ NewUserInvitation = "NewUserInvitation"
29
+ OrderReturnDeclined = "OrderReturnDeclined"
30
+ OrderReturnSubmitted = "OrderReturnSubmitted"
31
+ OrderReturnSubmittedForYourApproval = "OrderReturnSubmittedForYourApproval"
32
+ OrderReturnSubmittedForApproval = "OrderReturnSubmittedForApproval"
33
+ OrderReturnApproved = "OrderReturnApproved"
34
+ OrderReturnSubmittedForYourApprovalHasBeenApproved = (
35
+ "OrderReturnSubmittedForYourApprovalHasBeenApproved"
36
+ )
37
+ OrderReturnSubmittedForYourApprovalHasBeenDeclined = (
38
+ "OrderReturnSubmittedForYourApprovalHasBeenDeclined"
39
+ )
40
+ OrderReturnCompleted = "OrderReturnCompleted"
41
+ SubscriptionReminder = "SubscriptionReminder"
42
+ ProductCollectionInvitationAccepted = "ProductCollectionInvitationAccepted"
43
+ ProductCollectionInvitationDeclined = "ProductCollectionInvitationDeclined"
44
+ OneTimePassword = "OneTimePassword"
45
+
46
+
47
+ class MessageSenderConfig(OrderCloudModel):
48
+ """An OrderCloud MessageSenderConfig.
49
+
50
+ Attributes:
51
+ secret:
52
+ endpoint:
53
+ """
54
+
55
+ secret: Optional[str] = Field(None, alias="Secret")
56
+ endpoint: Optional[str] = Field(None, alias="Endpoint")
57
+
58
+
59
+ class MessageSender(OrderCloudModel, Generic[XP]):
60
+ """An OrderCloud MessageSender.
61
+
62
+ Attributes:
63
+ id:
64
+ name:
65
+ message_types:
66
+ description:
67
+ elevated_roles: If additional data not provided by the message sender is needed, provide any elevated roles needed to make additional calls.
68
+ xp:
69
+ delivery_config_id:
70
+ allow_all_buyers: Allow message sender to trigger for all buyers without creating explicit assignments.
71
+ """
72
+
73
+ id: Optional[str] = Field(None, alias="ID")
74
+ name: Optional[str] = Field(None, alias="Name")
75
+ message_types: Optional[list[MessageType]] = Field(None, alias="MessageTypes")
76
+ description: Optional[str] = Field(None, alias="Description")
77
+ elevated_roles: Optional[list[ApiRole]] = Field(None, alias="ElevatedRoles")
78
+ xp: Optional[XP] = Field(None, alias="xp")
79
+ delivery_config_id: Optional[str] = Field(None, alias="DeliveryConfigID")
80
+ allow_all_buyers: bool = Field(False, alias="AllowAllBuyers")