Interface Entry

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Entry extends OsidRelationship

An Entry is a relationship between a customer and item in a billing period.

  • Method Details

    • getCustomerId

      Id getCustomerId()
      Gets the customer Id associated with this entry.
      Returns:
      the customer Id
      Compliance:
      mandatory - This method must be implemented.
    • getCustomer

      Customer getCustomer() throws OperationFailedException
      Gets the customer associated with this entry.
      Returns:
      the customer
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getItemId

      Id getItemId()
      Gets the item Id associated with this entry.
      Returns:
      the item Id
      Compliance:
      mandatory - This method must be implemented.
    • getItem

      Item getItem() throws OperationFailedException
      Gets the item associated with this entry.
      Returns:
      the item
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getPeriodId

      Id getPeriodId()
      Gets the Id of the Period of this offering.
      Returns:
      the Period Id
      Compliance:
      mandatory - This method must be implemented.
    • getPeriod

      Period getPeriod() throws OperationFailedException
      Gets the Period of this offering.
      Returns:
      the period
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getQuantity

      long getQuantity()
      Gets the quantity of the item.
      Returns:
      the quantity
      Throws:
      IllegalStateException - hasProduct() is false
      Compliance:
      mandatory - This method is must be implemented.
    • getAmount

      Currency getAmount()
      Gets the amount of this entry.
      Returns:
      the amount
      Compliance:
      mandatory - This method must be implemented.
    • isDebit

      boolean isDebit()
      Tests if the amount is a debit or a credit.
      Returns:
      true if this item amount is a debit, false if it is a credit
      Compliance:
      mandatory - This method must be implemented.
    • getEntryRecord

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