---
displayed_sidebar: entitiesSidebar
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# Discount

## Properties

<ParameterTypes parameters={[
  {
    "name": "code",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "created_at",
    "type": "`Date`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "deleted_at",
    "type": "``null`` \\| `Date`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "ends_at",
    "type": "``null`` \\| `Date`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "id",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "is_disabled",
    "type": "`boolean`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "is_dynamic",
    "type": "`boolean`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "metadata",
    "type": "Record<`string`, `unknown`\\>",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "parent_discount",
    "type": "[`Discount`](Discount.mdx)",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": [
      {
        "name": "constructor",
        "type": "() => [`Discount`](Discount.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "code",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "created_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "deleted_at",
        "type": "``null`` \\| `Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "ends_at",
        "type": "``null`` \\| `Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "is_disabled",
        "type": "`boolean`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "is_dynamic",
        "type": "`boolean`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "metadata",
        "type": "Record<`string`, `unknown`\\>",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "parent_discount",
        "type": "[`Discount`](Discount.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`Discount`](Discount.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "code",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "``null`` \\| `Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "ends_at",
            "type": "``null`` \\| `Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "is_disabled",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "is_dynamic",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "metadata",
            "type": "Record<`string`, `unknown`\\>",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "parent_discount",
            "type": "[`Discount`](Discount.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "parent_discount_id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "regions",
            "type": "[`Region`](Region.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "rule",
            "type": "[`DiscountRule`](DiscountRule.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "rule_id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "starts_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "usage_count",
            "type": "`number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "usage_limit",
            "type": "``null`` \\| `number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "valid_duration",
            "type": "``null`` \\| `string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "upperCaseCodeAndTrim",
            "type": "() => `void`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "parent_discount_id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "regions",
        "type": "[`Region`](Region.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`Region`](Region.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "automatic_taxes",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "countries",
            "type": "[`Country`](Country.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "currency",
            "type": "[`Currency`](Currency.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "currency_code",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "``null`` \\| `Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "fulfillment_providers",
            "type": "[`FulfillmentProvider`](FulfillmentProvider.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "gift_cards_taxable",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "includes_tax",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "metadata",
            "type": "Record<`string`, `unknown`\\>",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "name",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "payment_providers",
            "type": "[`PaymentProvider`](PaymentProvider.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "tax_code",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "tax_provider",
            "type": "[`TaxProvider`](TaxProvider.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "tax_provider_id",
            "type": "``null`` \\| `string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "tax_rate",
            "type": "`number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "tax_rates",
            "type": "``null`` \\| [`TaxRate`](TaxRate.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "beforeInsert",
            "type": "() => `void`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "rule",
        "type": "[`DiscountRule`](DiscountRule.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`DiscountRule`](DiscountRule.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "allocation",
            "type": "[`AllocationType`](../enums/AllocationType.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "conditions",
            "type": "[`DiscountCondition`](DiscountCondition.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "``null`` \\| `Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "description",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "metadata",
            "type": "Record<`string`, `unknown`\\>",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "type",
            "type": "[`DiscountRuleType`](../enums/DiscountRuleType.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "value",
            "type": "`number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "beforeInsert",
            "type": "() => `void`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "rule_id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "starts_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "updated_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "usage_count",
        "type": "`number`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "usage_limit",
        "type": "``null`` \\| `number`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "valid_duration",
        "type": "``null`` \\| `string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "upperCaseCodeAndTrim",
        "type": "() => `void`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      }
    ]
  },
  {
    "name": "parent_discount_id",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "regions",
    "type": "[`Region`](Region.mdx)[]",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": [
      {
        "name": "constructor",
        "type": "() => [`Region`](Region.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "automatic_taxes",
        "type": "`boolean`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "countries",
        "type": "[`Country`](Country.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`Country`](Country.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "display_name",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "iso_2",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "iso_3",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "name",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "num_code",
            "type": "`number`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "region",
            "type": "[`Region`](Region.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "region_id",
            "type": "``null`` \\| `string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "created_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "currency",
        "type": "[`Currency`](Currency.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`Currency`](Currency.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "code",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "includes_tax",
            "type": "`boolean`",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "name",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "symbol",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "symbol_native",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "currency_code",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "deleted_at",
        "type": "``null`` \\| `Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "fulfillment_providers",
        "type": "[`FulfillmentProvider`](FulfillmentProvider.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`FulfillmentProvider`](FulfillmentProvider.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "is_installed",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "gift_cards_taxable",
        "type": "`boolean`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "includes_tax",
        "type": "`boolean`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "metadata",
        "type": "Record<`string`, `unknown`\\>",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "name",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "payment_providers",
        "type": "[`PaymentProvider`](PaymentProvider.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`PaymentProvider`](PaymentProvider.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "is_installed",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "tax_code",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "tax_provider",
        "type": "[`TaxProvider`](TaxProvider.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`TaxProvider`](TaxProvider.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "is_installed",
            "type": "`boolean`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "tax_provider_id",
        "type": "``null`` \\| `string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "tax_rate",
        "type": "`number`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "tax_rates",
        "type": "``null`` \\| [`TaxRate`](TaxRate.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "updated_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "beforeInsert",
        "type": "() => `void`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      }
    ]
  },
  {
    "name": "rule",
    "type": "[`DiscountRule`](DiscountRule.mdx)",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": [
      {
        "name": "constructor",
        "type": "() => [`DiscountRule`](DiscountRule.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "allocation",
        "type": "[`AllocationType`](../enums/AllocationType.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "ITEM",
            "type": "``\"item\"``",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "TOTAL",
            "type": "``\"total\"``",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "conditions",
        "type": "[`DiscountCondition`](DiscountCondition.mdx)[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "constructor",
            "type": "() => [`DiscountCondition`](DiscountCondition.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "customer_groups",
            "type": "[`CustomerGroup`](CustomerGroup.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "``null`` \\| `Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "discount_rule",
            "type": "[`DiscountRule`](DiscountRule.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "discount_rule_id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "metadata",
            "type": "Record<`string`, `unknown`\\>",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "operator",
            "type": "[`DiscountConditionOperator`](../enums/DiscountConditionOperator.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "product_collections",
            "type": "[`ProductCollection`](ProductCollection.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "product_tags",
            "type": "[`ProductTag`](ProductTag.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "product_types",
            "type": "[`ProductType`](ProductType.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "products",
            "type": "[`Product`](Product.mdx)[]",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "type",
            "type": "[`DiscountConditionType`](../enums/DiscountConditionType.mdx)",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "beforeInsert",
            "type": "() => `void`",
            "description": "",
            "optional": false,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "created_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "deleted_at",
        "type": "``null`` \\| `Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "description",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "metadata",
        "type": "Record<`string`, `unknown`\\>",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "type",
        "type": "[`DiscountRuleType`](../enums/DiscountRuleType.mdx)",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": [
          {
            "name": "FIXED",
            "type": "``\"fixed\"``",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "FREE_SHIPPING",
            "type": "``\"free_shipping\"``",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          },
          {
            "name": "PERCENTAGE",
            "type": "``\"percentage\"``",
            "description": "",
            "optional": true,
            "defaultValue": "",
            "children": []
          }
        ]
      },
      {
        "name": "updated_at",
        "type": "`Date`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "value",
        "type": "`number`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      },
      {
        "name": "beforeInsert",
        "type": "() => `void`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "children": []
      }
    ]
  },
  {
    "name": "rule_id",
    "type": "`string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "starts_at",
    "type": "`Date`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "updated_at",
    "type": "`Date`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "usage_count",
    "type": "`number`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "usage_limit",
    "type": "``null`` \\| `number`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  },
  {
    "name": "valid_duration",
    "type": "``null`` \\| `string`",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "children": []
  }
]} />
