Enum Class DefaultSubscriptionPriceDetailType

java.lang.Object
java.lang.Enum<DefaultSubscriptionPriceDetailType>
com.broadleafcommerce.subscriptionoperation.service.enums.DefaultSubscriptionPriceDetailType
All Implemented Interfaces:
Serializable, Comparable<DefaultSubscriptionPriceDetailType>, Constable

public enum DefaultSubscriptionPriceDetailType extends Enum<DefaultSubscriptionPriceDetailType>
Defines the default supported types of prices on a SubscriptionItemPriceDetail or SubscriptionPriceResponse.
  • Enum Constant Details

    • PRORATED_UNIT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType PRORATED_UNIT_AMOUNT
      The subscription item price per unit, prorated relative to the next invoice date. For a new purchase, this reflects the full date range. For edits, upgrades, & downgrades, this reflects the prorated price between the action & the end of the billing period.
    • CREDITED_UNIT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType CREDITED_UNIT_AMOUNT
      For edits, upgrades, and downgrades on a subscription that’s using an DefaultSubscriptionPaymentStrategy.PREPAID payment strategy, the customer has already paid the full amount for this billing cycle at the previous rate.

      For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user has already partially paid for 10 of the licenses, so they will be due a credit of $5 toward the second-half-of-the-month amount.

      Note: This typically only impacts the first period in the estimatedFuturePayments list.

    • PRIOR_UNBILLED_UNIT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType PRIOR_UNBILLED_UNIT_AMOUNT
      Prior to an edit, upgrade, or downgrade on a subscription that’s using a Postpaid payment strategy, the system will have prior unbilled charges that will be part of the next invoice. In this case, the user will owe this in addition to the prorated charges for the changes being made.

      For example, consider a customer who is upgrading from 10 to 20 licenses at $1 each half-way through a 30-day month. The user prorated amount would be $10 for 20 licenses. This user also owes $5 for access to the 10 licenses in the first half of the month.

      Note: This typically only impacts the first period in the estimatedFuturePayments list.

    • REMAINDER_OF_TERMS_UNIT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType REMAINDER_OF_TERMS_UNIT_AMOUNT
      The unit amount to charge for the remainder of terms if the remainder of terms is being charged.

      Note: This typically only impacts the first period in the estimatedFuturePayments list.

    • PRORATED_UNIT_DISCOUNT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType PRORATED_UNIT_DISCOUNT_AMOUNT
      The subscription item discount per unit, prorated relative to the next invoice date. For a new purchase, this reflects the full date range. For edits, upgrades, & downgrades, this reflects the prorated price between the action & the end of the billing period.
    • CREDITED_UNIT_DISCOUNT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType CREDITED_UNIT_DISCOUNT_AMOUNT
      The subscription item discount per unit to be deducted from the CREDITED_UNIT_AMOUNT.

      Similar to CREDITED_UNIT_AMOUNT, the customer had the full discount applied in their previous payment, so when it needs to be credited due to an edit, upgrade, or downgrade, the discount amount needs to be prorated and deducted from the credited amount.

    • PRIOR_UNBILLED_UNIT_DISCOUNT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType PRIOR_UNBILLED_UNIT_DISCOUNT_AMOUNT
      The subscription item discount per unit to be deducted from the PRIOR_UNBILLED_UNIT_AMOUNT.

      Similar to PRIOR_UNBILLED_UNIT_AMOUNT, the discount amount also needs to be prorated and deducted from the prior unbilled amount, since the discount was applied prior to the edit, upgrade, or downgrade.

    • REMAINDER_OF_TERMS_UNIT_DISCOUNT_AMOUNT

      public static final DefaultSubscriptionPriceDetailType REMAINDER_OF_TERMS_UNIT_DISCOUNT_AMOUNT
      The unit discount amount to be applied to the remainder of terms charge if the remainder of terms is being charged.
    • UNIT_CHARGE_FOR_PREVIOUSLY_DISCOUNTED_PERIODS

      public static final DefaultSubscriptionPriceDetailType UNIT_CHARGE_FOR_PREVIOUSLY_DISCOUNTED_PERIODS
      The subscription item discount per unit to be deducted from the PRIOR_UNBILLED_UNIT_AMOUNT.

      Similar to PRIOR_UNBILLED_UNIT_AMOUNT, the discount amount also needs to be prorated and deducted from the prior unbilled amount, since the discount was applied prior to the edit, upgrade, or downgrade.

  • Method Details

    • values

      public static DefaultSubscriptionPriceDetailType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DefaultSubscriptionPriceDetailType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isProratedUnitAmount

      public static boolean isProratedUnitAmount(String priceDetailType)
    • isCreditedUnitAmount

      public static boolean isCreditedUnitAmount(String priceDetailType)
    • isPriorUnbilledUnitAmount

      public static boolean isPriorUnbilledUnitAmount(String priceDetailType)
    • isRemainderOfTermsUnitAmount

      public static boolean isRemainderOfTermsUnitAmount(String priceDetailType)
    • isProratedUnitDiscountAmount

      public static boolean isProratedUnitDiscountAmount(String priceDetailType)
    • isCreditedUnitDiscountAmount

      public static boolean isCreditedUnitDiscountAmount(String priceDetailType)
    • isPriorUnbilledUnitDiscountAmount

      public static boolean isPriorUnbilledUnitDiscountAmount(String priceDetailType)
    • isRemainderOfTermsUnitDiscountAmount

      public static boolean isRemainderOfTermsUnitDiscountAmount(String priceDetailType)
    • isUnitChargeForPreviouslyDiscountedPeriods

      public static boolean isUnitChargeForPreviouslyDiscountedPeriods(String priceDetailType)