Interface Price
- All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule, Subjugateable
A Price .
-
Method Summary
Modifier and TypeMethodDescriptionGets the amount.Gets the resource representing the demographic.Gets the resourceIdrepresenting the demographic.longGets the maximum quantity for this price.longGets the minium quantity for this price.getPriceRecord(Type priceRecordType) Gets the price record corresponding to the givenProductrecordType.This method is used to retrieve an object implementing the requested record.Gets the price schedule to which this price belongs.Gets the price scheduleIdto which this price belongs.Gets the recurring interval.booleanTests if this price is restricted by demographic.booleanTests if this price is restricted by quantity.booleanTests if this price has a recurring charge.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface Operable
isActive, isDisabled, isEnabled, isOperationalModifier and TypeMethodDescriptionbooleanisActive()Tests if this operable is active.booleanTests if this operable is administravely disabled.booleanTests if this operable is administravely enabled.booleanTests if thisOperableis operational.Methods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface OsidRule
getConditionRecordTypes, getRule, getRuleId, hasRule
-
Method Details
-
getPriceScheduleId
Id getPriceScheduleId()Gets the price scheduleIdto which this price belongs.- Returns:
- the price schedule
Id - Compliance:
mandatory- This method must be implemented.
-
getPriceSchedule
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:
trueif this price has a quantity range,falseif 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
getMaximumQuantity
long getMaximumQuantity()Gets the maximum quantity for this price.- Returns:
- the quantity
- Throws:
IllegalStateException-hasQuantityRange()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasDemographic
boolean hasDemographic()Tests if this price is restricted by demographic.- Returns:
trueif this price has a demographic,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getDemographicId
Id getDemographicId()Gets the resourceIdrepresenting the demographic.- Returns:
- the resource
Id - Throws:
IllegalStateException-hasDemographic()isfalse- Compliance:
mandatory- This method must be implemented.
-
getDemographic
Gets the resource representing the demographic.- Returns:
- the resource
- Throws:
IllegalStateException-hasDemographic()isfalseOperationFailedException- 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:
trueif this price is recurring,falseif one-time- Compliance:
mandatory- This method must be implemented.
-
getRecurringInterval
Duration getRecurringInterval()Gets the recurring interval.- Returns:
- the interval
- Throws:
IllegalStateException-isRecurring()isfalse- Compliance:
mandatory- This method must be implemented.
-
getPriceRecord
Gets the price record corresponding to the givenProductrecordType.This method is used to retrieve an object implementing the requested record. ThepriceRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(priceRecordType)istrue.- Parameters:
priceRecordType- the type of price record to retrieve- Returns:
- the price record
- Throws:
NullArgumentException-priceRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(priceRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-