Discount MembersKentico 8.1 API Reference
The Discount type exposes the following members.
Constructors

  NameDescription
Public methodDiscount
Initializes a new instance of the facade class.
Back to Top
Methods

  NameDescription
Public methodAcceptsCoupon
Indicates if given coupon code is suitable for this discount. Returns false if this discount has no codes assigned.
Public methodCreateCoupon
Creates and saves new coupon for this discount. NOTE: The uniqueness is not checked.
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Back to Top
Operators

  NameDescription
Public operatorStatic member (Discount to DiscountInfo)
Implicit conversion
Public operatorStatic member (Discount to MultiBuyDiscountInfo)
Implicit conversion
Public operatorStatic member (DiscountInfo to Discount)
Implicit conversion
Public operatorStatic member (MultiBuyDiscountInfo to Discount)
Implicit conversion
Back to Top
Extension Methods

  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Back to Top
Properties

  NameDescription
Public propertyCouponCodes
Returns coupon codes associated with this discount.
Public propertyDiscountApplyFurtherDiscounts
Indicates that further discounts (in order of DiscountOrder) are to be processed.
Public propertyDiscountCustomerRestriction
Type of discount customer restriction.
Public propertyDiscountDescription
Discount description.
Public propertyDiscountDisplayName
Discount display name.
Public propertyDiscountEnabled
Discount enabled.
Public propertyDiscountGUID
Discount GUID.
Public propertyDiscountID
Discount ID.
Public propertyDiscountIsFlat
True - discount value is flat, False - discount value is relative. Used for discount calculation in the shopping cart.
Public propertyDiscountLastModified
Discount last modified date and time.
Public propertyDiscountName
Discount name.
Public propertyDiscountOrder
Order of this discount among other discounts.
Public propertyDiscountRoles
Discount roles to apply discount for. Is dependable on DiscountCustomerRestriction configuration.
Public propertyDiscountSiteID
Discount site ID.
Public propertyDiscountStatus
Discount status.
Public propertyDiscountType
Gets the type of the discount.
Public propertyDiscountUsesCoupons
Indicates if this discount is applicable only with discount coupon.
Public propertyDiscountValidFrom
Discount valid from.
Public propertyDiscountValidTo
Discount valid to.
Public propertyDiscountValue
Discount value.
Public propertyHasOrUsesCoupon
Indicates if discount uses coupon or has some coupons defined.
Public propertyIsRunning
Determines whether discount is currently running. ValidFrom and ValidTo properties are compared to current date/time.
Public propertyIsValid
Determines whether discount is valid. Discount must be currently running and have usable coupon codes if discount uses coupons.
Back to Top
See Also