Files
medusa-store/www/apps/docs/content/references/entities/classes/entities.DiscountConditionCustomerGroup.mdx
Shahed Nasser 892d737c1f docs: enhance how references are generated (#5805)
* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
2023-12-05 15:29:41 +02:00

279 lines
8.5 KiB
Plaintext

---
displayed_sidebar: entitiesSidebar
slug: /references/entities/classes/DiscountConditionCustomerGroup
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DiscountConditionCustomerGroup
Associates a discount condition with a customer group
## Properties
<ParameterTypes parameters={[
{
"name": "condition_id",
"type": "`string`",
"description": "The ID of the Discount Condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_group",
"type": "[CustomerGroup](entities.CustomerGroup.mdx)",
"description": "Available if the relation `customer\\_group` is expanded.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customers",
"type": "[Customer](entities.Customer.mdx)[]",
"description": "The details of the customers that belong to the customer group.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The customer group's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "The name of the customer group",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "price_lists",
"type": "[PriceList](entities.PriceList.mdx)[]",
"description": "The price lists that are associated with the customer group.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "customer_group_id",
"type": "`string`",
"description": "The ID of the Product Tag",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_condition",
"type": "[DiscountCondition](entities.DiscountCondition.mdx)",
"description": "Available if the relation `discount\\_condition` is expanded.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "customer_groups",
"type": "[CustomerGroup](entities.CustomerGroup.mdx)[]",
"description": "Customer groups associated with this condition if `type` is `customer\\_groups`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "deleted_at",
"type": "`null` \\| `Date`",
"description": "The date with timezone at which the resource was deleted.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_rule",
"type": "[DiscountRule](entities.DiscountRule.mdx)",
"description": "The details of the discount rule associated with the condition.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "discount_rule_id",
"type": "`string`",
"description": "The ID of the discount rule associated with the condition",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The discount condition's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "operator",
"type": "[DiscountConditionOperator](../enums/entities.DiscountConditionOperator.mdx)",
"description": "The operator of the condition. `in` indicates that discountable resources are within the specified resources. `not\\_in` indicates that discountable resources are everything but the specified resources.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "product_collections",
"type": "[ProductCollection](entities.ProductCollection.mdx)[]",
"description": "Product collections associated with this condition if `type` is `product\\_collections`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_tags",
"type": "[ProductTag](entities.ProductTag.mdx)[]",
"description": "Product tags associated with this condition if `type` is `product\\_tags`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "product_types",
"type": "[ProductType](entities.ProductType.mdx)[]",
"description": "Product types associated with this condition if `type` is `product\\_types`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "products",
"type": "[Product](entities.Product.mdx)[]",
"description": "products associated with this condition if `type` is `products`.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "type",
"type": "[DiscountConditionType](../enums/entities.DiscountConditionType.mdx)",
"description": "The type of the condition. The type affects the available resources associated with the condition. For example, if the type is `products`, that means the `products` relation will hold the products associated with this condition and other relations will be empty.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records"/>