de.h_da.library.accounting.usecase
Interface Accounting


public interface Accounting

[usecase] This use case comprises the functionality of the accounting component.


Method Summary
 void receiveMoney(int invoiceId)
          Notifies the accounting component that the money corresponding to an invoice has been received and, hence, the invoice can be closed
 int sendInvoice(java.lang.String subject, java.lang.String name, java.lang.String address, int amount)
          Generates a new Invoice object.
 

Method Detail

receiveMoney

void receiveMoney(int invoiceId)
Notifies the accounting component that the money corresponding to an invoice has been received and, hence, the invoice can be closed

Parameters:
invoiceId - [in] the id of the invoice to be closed
     [post Invoice i (i.id == invoiceID): i.invoiceStatus == InvoiceStatus.PAID
 

sendInvoice

int sendInvoice(java.lang.String subject,
                java.lang.String name,
                java.lang.String address,
                int amount)
Generates a new Invoice object.

Parameters:
subject - [in] invoice subject
name - [in] name of the invoice's recipient
address - [in] address where the invoice is to be sent to
amount - [in] invoice amount in Euro cents
Returns:
[out] id of the generated Invoice object
       [post exists new Invoice i: i.id == result 
        post i.date is current date
        post i.subject == subject
        post i.name == name
        post i.address == address
        post i.amount == amount
        post i.status == InvoiceStatus.SENT
       ]