Generated the following references: - `analytics` - `analytics_provider` - `api_key` - `api_key_models` - `auth` - `auth_models` - `cart` - `cart_models` - `core_flows` - `currency` - `currency_models` - `customer` - `customer_models` - `event` - `events` - `file_service` - `fulfillment` - `fulfillment_models` - `fulfillment_provider` - `inventory_next` - `inventory_next_models` - `js_sdk` - `medusa` - `module_events` - `modules` - `modules_sdk` - `order` - `order_models` - `payment` - `payment_models` - `pricing` - `pricing_models` - `product` - `product_models` - `promotion` - `promotion_models` - `region` - `region_models` - `sales_channel` - `sales_channel_models` - `stock_location_next` - `stock_location_next_models` - `store` - `store_models` - `tax` - `tax_models` - `tax_provider` - `translation` - `translation_models` - `types` - `user` - `user_models` - `utils` - `workflows` --- > [!NOTE] > No changes to summarize — the provided diff was empty. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fe58b669976b04475e6d0f16eb185976cb527d3b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
12 lines
4.4 KiB
Plaintext
12 lines
4.4 KiB
Plaintext
---
|
|
displayed_sidebar: promotionReference
|
|
---
|
|
|
|
import { TypeList } from "docs-ui"
|
|
|
|
# CampaignBudgetDTO
|
|
|
|
The campaign budget details.
|
|
|
|
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget:\n\n- `spend` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign.\n- `usage` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used.\n- `use_by_attribute` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used by a specific attribute value (for example, per customer)\n- `spend_by_attribute` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign by a specific attribute value (for example, per customer)","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The usage from the campaign budget's limit:\n\n- If the budget's type is `spend`, the value of this attribute is the amount discounted so far by the promotions in the associated campaign.\n- If the budget's type is `usage`, the value of this attribute is the number of times the promotions of the associated campaign have been used so far.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute that the budget limit is applied to. By default,\nthe budget is applied globally. If the type is `use_by_attribute`, this field indicates the \nattribute the budget is tracked by. For example, `customer_id` means the budget is tracked per customer.","optional":true,"defaultValue":"","example":"customer_id","expandable":false,"children":[],"since":"2.11.0"},{"name":"usages","type":"[CampaignBudgetUsageDTO](../promotion.CampaignBudgetUsageDTO/page.mdx)[]","description":"The usages of the campaign budget. This is only set if the\nbudget's type is `use_by_attribute` or `spend_by_attribute`.\nEach usage tracks the budget usage for a specific attribute value.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign budget usage.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute_value","type":"`string`","description":"The value of the attribute that the promotion was used by.\nFor example, if the budget campaign's attribute is `customer_id`,',\nthis value will be the ID of the customer that used the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The amount of times the promotion was used or\nthe amount of money discounted by the promotion,\ndepending on the campaign budget's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"budget_id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_used","type":"`Record<string, any>`","description":"The raw used value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date and time the campaign budget usage was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date and time the campaign budget usage was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string`","description":"The date and time the campaign budget usage was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}],"since":"2.11.0"}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CampaignBudgetDTO"/>
|