Enum DefaultOfferProrationType

    • Enum Constant Detail

      • TARGET_ONLY

        public static final DefaultOfferProrationType TARGET_ONLY
        The discount is only prorated/distributed to the targeted items of the offer.

        For example, let's say we have a buy 1x get 1y free offer, x is the qualifying item (qualifier) and y is the targeted item (target). TARGET_ONLY means that the discount is not distributed and is only on the target item.

      • TARGET_AND_QUALIFIER

        public static final DefaultOfferProrationType TARGET_AND_QUALIFIER
        The discount for an offer is distributed across targeted and qualifying items.

        For example, let's say we have a buy 1x get 1y free offer, x is the qualifying item (qualifier) and y is the targeted item (target). TARGET_AND_QUALIFIER means that the discount is distributed across target and qualifier items.

    • Method Detail

      • values

        public static DefaultOfferProrationType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DefaultOfferProrationType c : DefaultOfferProrationType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DefaultOfferProrationType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isTargetOnlyProration

        public static boolean isTargetOnlyProration​(String prorationType)
      • isTargetAndQualifierProration

        public static boolean isTargetAndQualifierProration​(String prorationType)