public interface Item extends OsidObject
An Item
is a product or service.
Modifier and Type | Method and Description |
---|---|
Account |
getAccount()
Gets the item account.
|
Id |
getAccountId()
Gets the account
Id. |
Currency |
getAmount()
Gets the amount of this item.
|
Category |
getCategory()
Gets the item category.
|
Id |
getCategoryId()
Gets the category
Id. |
ItemRecord |
getItemRecord(Type itemRecordType)
Gets the item record corresponding to the given
Item
record Type. |
Product |
getProduct()
Gets the product.
|
Id |
getProductId()
Gets the product
Id. |
Duration |
getRecurringInterval()
Gets the recurring interval.
|
boolean |
hasAccount()
Tests if this item relates to s specific general ledger account.
|
boolean |
hasProduct()
Tests if this item relates to s specific product.
|
boolean |
isDebit()
Tests if the amount is a debit or a credit.
|
boolean |
isRecurring()
Tests if this item is a recurring charge.
|
getDescription, getDisplayName, getGenusType, isOfGenusType
getId, isCurrent
getRecordTypes, hasRecordType
getProperties, getPropertiesByRecordType
Id getCategoryId()
Id.
Id
mandatory
- This method is must be implemented. Category getCategory() throws OperationFailedException
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. boolean hasAccount()
true
if this item has an account, false
otherwisemandatory
- This method must be implemented. Id getAccountId()
Id.
Id
IllegalStateException
- hasAccount()
is
false
mandatory
- This method is must be implemented. Account getAccount() throws OperationFailedException
IllegalStateException
- hasAccount()
is
false
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. boolean hasProduct()
true
if this item has a product, false
otherwisemandatory
- This method must be implemented. Id getProductId()
Id.
Id
IllegalStateException
- hasProduct()
is
false
mandatory
- This method is must be implemented. Product getProduct() throws OperationFailedException
IllegalStateException
- hasProduct()
is
false
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Currency getAmount()
mandatory
- This method must be implemented. boolean isDebit()
true
if this item amount is a debit,
false
if it is a creditmandatory
- This method must be implemented. boolean isRecurring()
true
if this item is recurring, false
if one-timemandatory
- This method must be implemented. Duration getRecurringInterval()
IllegalStateException
- isRecurring()
is
false
mandatory
- This method must be implemented. ItemRecord getItemRecord(Type itemRecordType) throws OperationFailedException
Item
record Type.
This method is used to retrieve an object
implementing the requested record. The itemRecordType
may be the Type
returned in getRecordTypes()
or any of its parents in a Type
hierarchy where
hasRecordType(itemRecordType)
is true
.itemRecordType
- the type of item record to retrieveNullArgumentException
- itemRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(itemRecordType)
is false
mandatory
- This method must be implemented.