Interface Price

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule, Subjugateable

public interface Price extends OsidRule, Subjugateable

A Price .

  • Method Details

    • getPriceScheduleId

      Id getPriceScheduleId()
      Gets the price schedule Id to which this price belongs.
      Returns:
      the price schedule Id
      Compliance:
      mandatory - This method must be implemented.
    • getPriceSchedule

      PriceSchedule getPriceSchedule() throws OperationFailedException
      Gets the price schedule to which this price belongs.
      Returns:
      the price schedule
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasQuantityRange

      boolean hasQuantityRange()
      Tests if this price is restricted by quantity.
      Returns:
      true if this price has a quantity range, false if this price is the same for any quantity
      Compliance:
      mandatory - This method must be implemented.
    • getMinimumQuantity

      long getMinimumQuantity()
      Gets the minium quantity for this price.
      Returns:
      the quantity
      Throws:
      IllegalStateException - hasQuantityRange() is false
      Compliance:
      mandatory - This method must be implemented.
    • getMaximumQuantity

      long getMaximumQuantity()
      Gets the maximum quantity for this price.
      Returns:
      the quantity
      Throws:
      IllegalStateException - hasQuantityRange() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasDemographic

      boolean hasDemographic()
      Tests if this price is restricted by demographic.
      Returns:
      true if this price has a demographic, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDemographicId

      Id getDemographicId()
      Gets the resource Id representing the demographic.
      Returns:
      the resource Id
      Throws:
      IllegalStateException - hasDemographic() is false
      Compliance:
      mandatory - This method must be implemented.
    • getDemographic

      Resource getDemographic() throws OperationFailedException
      Gets the resource representing the demographic.
      Returns:
      the resource
      Throws:
      IllegalStateException - hasDemographic() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAmount

      Currency getAmount()
      Gets the amount.
      Returns:
      the amount
      Compliance:
      mandatory - This method must be implemented.
    • isRecurring

      boolean isRecurring()
      Tests if this price has a recurring charge.
      Returns:
      true if this price is recurring, false if one-time
      Compliance:
      mandatory - This method must be implemented.
    • getRecurringInterval

      Duration getRecurringInterval()
      Gets the recurring interval.
      Returns:
      the interval
      Throws:
      IllegalStateException - isRecurring() is false
      Compliance:
      mandatory - This method must be implemented.
    • getPriceRecord

      PriceRecord getPriceRecord(Type priceRecordType) throws OperationFailedException
      Gets the price record corresponding to the given Product record Type .This method is used to retrieve an object implementing the requested record. The priceRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(priceRecordType) is true .
      Parameters:
      priceRecordType - the type of price record to retrieve
      Returns:
      the price record
      Throws:
      NullArgumentException - priceRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(priceRecordType) is false
      Compliance:
      mandatory - This method must be implemented.