DiscountPlanDto Data Type

The Class DiscountPlanDto.

Implemented Interfaces
Serializable
Properties
name data type constraints description
disabled boolean   Is entity disabled. Value is ignored in Update action - use enable/disable API instead.
id number   The id.
auditableField array of AuditableFieldDto  
code string required The code
description string   The description
startDate number   Effective start date
updatedCode string   The updated code.
endDate number   Effective end date
defaultDuration number   Length of effectivity. If start date is not null and end date is null, we use the defaultDuration from the discount plan. If start date is null, and defaultDuration is not null, defaultDuration is ignored.
durationUnit DurationPeriodUnitEnum   Unit of duration
customFields CustomFieldsDto   The custom fields.
discountPlanItem array of DiscountPlanItemDto  
expressionEl string   expressionEl
discountPlanType DiscountPlanTypeEnum required Type of the discount plan. Defines on which entity the discount plan can be applied.
status DiscountPlanStatusEnum   Status of the discount plan: DRAFT “Draft”: The discount plan is being configured and is waiting for validation ACTIVE “Active”: the discount plan is available and can be set used IN_USE “In use”: the discount plan is currently in use / it has been applied at least once EXPIRED “Expired”: the discount plan has expired. Either because the end of validity date has been reach, or the used quantity has is equal to initial quantity. Initialized with DRAFT
statusDate number   Datetime of last status update Automatically filed at creation and status update
initialQuantity number   The initial available quantity for the discount plan. Default value is 0 = infinite. For types QUOTE, INVOICE, INVOICE_LINE, the value is forced to 0.
usedQuantity number   How many times the discount plan has been used. Initialized to 0. If intialQuantity is not 0, then reaching the initialQuantity expires the discount plan. The value is incremented every time the discountPlan is instantiated on any Billing Account, Subscription, or ProductInstance
applicationLimit number   How many times the discount can be applied on a given entity (BillingAccount, Subscription, Product Instance). Default value is 0 = infinite. Useful for one-time discounts. See DiscountPlanInstance below for more details. This has no real meaning for discounts applied to invoices or invoice lines.
applicationFilterEL string   A boolean EL that must evaluate to true to allow the discount plan to be applied. It will have access to the variables: entity: the entity on which we want to apply the discount discountPlan: the discount plan itself
incompatibleDiscountPlans array of DiscountPlanDto   A list of discounts plans that cannot be active at the same time on an entity instance.
applicableEntities array of ApplicableEntityDto   A list of entities (CustomerCategory, Offer, Product, Article). Only instances (Customer/BillingAccount, Subscription, ProductInstance, InvoiceLine) of these entities can have the discount applied to them.
applicableOnOverriddenPrice boolean  
sequence number   defines the order in which discount plans are applied
applicableOnDiscountedPrice boolean   determines whether the discount plan is applicable on the gross or discounted amount

Example

{
  "disabled" : true,
  "id" : 12345,
  "auditableField" : [ {
    "entityClass" : "...",
    "fieldName" : "...",
    "id" : 12345,
    "changeOrigin" : "...",
    "auditableField" : [ { }, { } ],
    "originName" : "...",
    "code" : "...",
    "previousState" : "...",
    "currentState" : "...",
    "description" : "...",
    "created" : "...",
    "updatedCode" : "...",
    "actor" : "..."
  }, {
    "entityClass" : "...",
    "fieldName" : "...",
    "id" : 12345,
    "changeOrigin" : "...",
    "auditableField" : [ { }, { } ],
    "originName" : "...",
    "code" : "...",
    "previousState" : "...",
    "currentState" : "...",
    "description" : "...",
    "created" : "...",
    "updatedCode" : "...",
    "actor" : "..."
  } ],
  "code" : "...",
  "description" : "...",
  "startDate" : 12345,
  "updatedCode" : "...",
  "endDate" : 12345,
  "defaultDuration" : 12345,
  "durationUnit" : "MONTH",
  "customFields" : {
    "customField" : [ {
      "code" : "...",
      "description" : "...",
      "fieldType" : "DATE",
      "languageDescriptions" : [ { }, { } ],
      "valueDate" : 12345,
      "valuePeriodStartDate" : 12345,
      "valuePeriodEndDate" : 12345,
      "valuePeriodPriority" : 12345,
      "stringValue" : "...",
      "dateValue" : 12345,
      "longValue" : 12345,
      "doubleValue" : 12345.0,
      "booleanValue" : true,
      "value" : [ { }, { } ],
      "mapValue" : {
        "property1" : { },
        "property2" : { }
      },
      "entityReferenceValue" : { },
      "indexType" : "STORE_ONLY",
      "fileValue" : "...",
      "formattedValue" : { },
      "urlReferenceValue" : { },
      "guiPosition" : "...",
      "customTableCode" : "...",
      "dataFilter" : "...",
      "fields" : "..."
    }, {
      "code" : "...",
      "description" : "...",
      "fieldType" : "MULTI_VALUE",
      "languageDescriptions" : [ { }, { } ],
      "valueDate" : 12345,
      "valuePeriodStartDate" : 12345,
      "valuePeriodEndDate" : 12345,
      "valuePeriodPriority" : 12345,
      "stringValue" : "...",
      "dateValue" : 12345,
      "longValue" : 12345,
      "doubleValue" : 12345.0,
      "booleanValue" : true,
      "value" : [ { }, { } ],
      "mapValue" : {
        "property1" : { },
        "property2" : { }
      },
      "entityReferenceValue" : { },
      "indexType" : "INDEX_NOT_ANALYZE",
      "fileValue" : "...",
      "formattedValue" : { },
      "urlReferenceValue" : { },
      "guiPosition" : "...",
      "customTableCode" : "...",
      "dataFilter" : "...",
      "fields" : "..."
    } ],
    "inheritedCustomField" : [ {
      "code" : "...",
      "description" : "...",
      "fieldType" : "LIST",
      "languageDescriptions" : [ { }, { } ],
      "valueDate" : 12345,
      "valuePeriodStartDate" : 12345,
      "valuePeriodEndDate" : 12345,
      "valuePeriodPriority" : 12345,
      "stringValue" : "...",
      "dateValue" : 12345,
      "longValue" : 12345,
      "doubleValue" : 12345.0,
      "booleanValue" : true,
      "value" : [ { }, { } ],
      "mapValue" : {
        "property1" : { },
        "property2" : { }
      },
      "entityReferenceValue" : { },
      "indexType" : "INDEX_NOT_ANALYZE",
      "fileValue" : "...",
      "formattedValue" : { },
      "urlReferenceValue" : { },
      "guiPosition" : "...",
      "customTableCode" : "...",
      "dataFilter" : "...",
      "fields" : "..."
    }, {
      "code" : "...",
      "description" : "...",
      "fieldType" : "BOOLEAN",
      "languageDescriptions" : [ { }, { } ],
      "valueDate" : 12345,
      "valuePeriodStartDate" : 12345,
      "valuePeriodEndDate" : 12345,
      "valuePeriodPriority" : 12345,
      "stringValue" : "...",
      "dateValue" : 12345,
      "longValue" : 12345,
      "doubleValue" : 12345.0,
      "booleanValue" : true,
      "value" : [ { }, { } ],
      "mapValue" : {
        "property1" : { },
        "property2" : { }
      },
      "entityReferenceValue" : { },
      "indexType" : "STORE_ONLY",
      "fileValue" : "...",
      "formattedValue" : { },
      "urlReferenceValue" : { },
      "guiPosition" : "...",
      "customTableCode" : "...",
      "dataFilter" : "...",
      "fields" : "..."
    } ]
  },
  "discountPlanItem" : [ {
    "code" : "...",
    "discountPlanCode" : "...",
    "invoiceCategoryCode" : "...",
    "invoiceSubCategoryCode" : "...",
    "expressionEl" : "...",
    "disabled" : true,
    "discountPlanItemType" : "FIXED",
    "discountValue" : 12345.0,
    "discountValueEL" : "...",
    "targetAccountingArticleCodes" : [ "...", "..." ],
    "pricePlanMatrixCode" : "...",
    "customFields" : {
      "customField" : [ { }, { } ],
      "inheritedCustomField" : [ { }, { } ]
    },
    "allowToNegate" : true,
    "description" : "...",
    "priority" : 12345,
    "accountingArticleCode" : "...",
    "applyByArticle" : true,
    "sequence" : 12345,
    "lastDiscount" : true
  }, {
    "code" : "...",
    "discountPlanCode" : "...",
    "invoiceCategoryCode" : "...",
    "invoiceSubCategoryCode" : "...",
    "expressionEl" : "...",
    "disabled" : true,
    "discountPlanItemType" : "PERCENTAGE",
    "discountValue" : 12345.0,
    "discountValueEL" : "...",
    "targetAccountingArticleCodes" : [ "...", "..." ],
    "pricePlanMatrixCode" : "...",
    "customFields" : {
      "customField" : [ { }, { } ],
      "inheritedCustomField" : [ { }, { } ]
    },
    "allowToNegate" : true,
    "description" : "...",
    "priority" : 12345,
    "accountingArticleCode" : "...",
    "applyByArticle" : true,
    "sequence" : 12345,
    "lastDiscount" : true
  } ],
  "expressionEl" : "...",
  "discountPlanType" : "INVOICE",
  "status" : "DRAFT",
  "statusDate" : 12345,
  "initialQuantity" : 12345,
  "usedQuantity" : 12345,
  "applicationLimit" : 12345,
  "applicationFilterEL" : "...",
  "incompatibleDiscountPlans" : [ {
    "disabled" : true,
    "id" : 12345,
    "auditableField" : [ {
      "entityClass" : "...",
      "fieldName" : "...",
      "id" : 12345,
      "changeOrigin" : "...",
      "auditableField" : [ { }, { } ],
      "originName" : "...",
      "code" : "...",
      "previousState" : "...",
      "currentState" : "...",
      "description" : "...",
      "created" : "...",
      "updatedCode" : "...",
      "actor" : "..."
    }, {
      "entityClass" : "...",
      "fieldName" : "...",
      "id" : 12345,
      "changeOrigin" : "...",
      "auditableField" : [ { }, { } ],
      "originName" : "...",
      "code" : "...",
      "previousState" : "...",
      "currentState" : "...",
      "description" : "...",
      "created" : "...",
      "updatedCode" : "...",
      "actor" : "..."
    } ],
    "code" : "...",
    "description" : "...",
    "startDate" : 12345,
    "updatedCode" : "...",
    "endDate" : 12345,
    "defaultDuration" : 12345,
    "durationUnit" : "DAY",
    "customFields" : {
      "customField" : [ { }, { } ],
      "inheritedCustomField" : [ { }, { } ]
    },
    "discountPlanItem" : [ {
      "code" : "...",
      "discountPlanCode" : "...",
      "invoiceCategoryCode" : "...",
      "invoiceSubCategoryCode" : "...",
      "expressionEl" : "...",
      "disabled" : true,
      "discountPlanItemType" : "FIXED",
      "discountValue" : 12345.0,
      "discountValueEL" : "...",
      "targetAccountingArticleCodes" : [ "...", "..." ],
      "pricePlanMatrixCode" : "...",
      "customFields" : { },
      "allowToNegate" : true,
      "description" : "...",
      "priority" : 12345,
      "accountingArticleCode" : "...",
      "applyByArticle" : true,
      "sequence" : 12345,
      "lastDiscount" : true
    }, {
      "code" : "...",
      "discountPlanCode" : "...",
      "invoiceCategoryCode" : "...",
      "invoiceSubCategoryCode" : "...",
      "expressionEl" : "...",
      "disabled" : true,
      "discountPlanItemType" : "PERCENTAGE",
      "discountValue" : 12345.0,
      "discountValueEL" : "...",
      "targetAccountingArticleCodes" : [ "...", "..." ],
      "pricePlanMatrixCode" : "...",
      "customFields" : { },
      "allowToNegate" : true,
      "description" : "...",
      "priority" : 12345,
      "accountingArticleCode" : "...",
      "applyByArticle" : true,
      "sequence" : 12345,
      "lastDiscount" : true
    } ],
    "expressionEl" : "...",
    "discountPlanType" : "QUOTE",
    "status" : "ACTIVE",
    "statusDate" : 12345,
    "initialQuantity" : 12345,
    "usedQuantity" : 12345,
    "applicationLimit" : 12345,
    "applicationFilterEL" : "...",
    "incompatibleDiscountPlans" : [ { }, { } ],
    "applicableEntities" : [ {
      "code" : "...",
      "entityClass" : "..."
    }, {
      "code" : "...",
      "entityClass" : "..."
    } ],
    "applicableOnOverriddenPrice" : true,
    "sequence" : 12345,
    "applicableOnDiscountedPrice" : true
  }, {
    "disabled" : true,
    "id" : 12345,
    "auditableField" : [ {
      "entityClass" : "...",
      "fieldName" : "...",
      "id" : 12345,
      "changeOrigin" : "...",
      "auditableField" : [ { }, { } ],
      "originName" : "...",
      "code" : "...",
      "previousState" : "...",
      "currentState" : "...",
      "description" : "...",
      "created" : "...",
      "updatedCode" : "...",
      "actor" : "..."
    }, {
      "entityClass" : "...",
      "fieldName" : "...",
      "id" : 12345,
      "changeOrigin" : "...",
      "auditableField" : [ { }, { } ],
      "originName" : "...",
      "code" : "...",
      "previousState" : "...",
      "currentState" : "...",
      "description" : "...",
      "created" : "...",
      "updatedCode" : "...",
      "actor" : "..."
    } ],
    "code" : "...",
    "description" : "...",
    "startDate" : 12345,
    "updatedCode" : "...",
    "endDate" : 12345,
    "defaultDuration" : 12345,
    "durationUnit" : "MONTH",
    "customFields" : {
      "customField" : [ { }, { } ],
      "inheritedCustomField" : [ { }, { } ]
    },
    "discountPlanItem" : [ {
      "code" : "...",
      "discountPlanCode" : "...",
      "invoiceCategoryCode" : "...",
      "invoiceSubCategoryCode" : "...",
      "expressionEl" : "...",
      "disabled" : true,
      "discountPlanItemType" : "FIXED",
      "discountValue" : 12345.0,
      "discountValueEL" : "...",
      "targetAccountingArticleCodes" : [ "...", "..." ],
      "pricePlanMatrixCode" : "...",
      "customFields" : { },
      "allowToNegate" : true,
      "description" : "...",
      "priority" : 12345,
      "accountingArticleCode" : "...",
      "applyByArticle" : true,
      "sequence" : 12345,
      "lastDiscount" : true
    }, {
      "code" : "...",
      "discountPlanCode" : "...",
      "invoiceCategoryCode" : "...",
      "invoiceSubCategoryCode" : "...",
      "expressionEl" : "...",
      "disabled" : true,
      "discountPlanItemType" : "FIXED",
      "discountValue" : 12345.0,
      "discountValueEL" : "...",
      "targetAccountingArticleCodes" : [ "...", "..." ],
      "pricePlanMatrixCode" : "...",
      "customFields" : { },
      "allowToNegate" : true,
      "description" : "...",
      "priority" : 12345,
      "accountingArticleCode" : "...",
      "applyByArticle" : true,
      "sequence" : 12345,
      "lastDiscount" : true
    } ],
    "expressionEl" : "...",
    "discountPlanType" : "QUOTE",
    "status" : "EXPIRED",
    "statusDate" : 12345,
    "initialQuantity" : 12345,
    "usedQuantity" : 12345,
    "applicationLimit" : 12345,
    "applicationFilterEL" : "...",
    "incompatibleDiscountPlans" : [ { }, { } ],
    "applicableEntities" : [ {
      "code" : "...",
      "entityClass" : "..."
    }, {
      "code" : "...",
      "entityClass" : "..."
    } ],
    "applicableOnOverriddenPrice" : true,
    "sequence" : 12345,
    "applicableOnDiscountedPrice" : true
  } ],
  "applicableEntities" : [ {
    "code" : "...",
    "entityClass" : "..."
  }, {
    "code" : "...",
    "entityClass" : "..."
  } ],
  "applicableOnOverriddenPrice" : true,
  "sequence" : 12345,
  "applicableOnDiscountedPrice" : true
}