ecash.internet
Class CreditDebitReport

java.lang.Object
  |
  +--ecash.internet.CreditDebitReport

public class CreditDebitReport
extends java.lang.Object

Such a report is returned to a client when he buys or deposits some money at the bank.

Author:
Michel Deriaz
See Also:
ECashBuyer.buy(java.lang.String, java.lang.String, char[], java.lang.String), ECashSeller.deposit(java.lang.String, java.lang.String, char[], java.lang.String)

Constructor Summary
CreditDebitReport()
          Creates a report.
 
Method Summary
 java.lang.String getCurrentAmount()
          Returns the current amount of money available in the bank account.
 int getResult()
          Returns an int that represents how the operation succeeded.
 void setCurrentAmount(java.lang.String currentAmount)
          Sets the current amount available on the bank account.
 void setResult(int result)
          Set the result that describes how the operation succeeded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreditDebitReport

public CreditDebitReport()
Creates a report.

Method Detail

getCurrentAmount

public java.lang.String getCurrentAmount()
Returns the current amount of money available in the bank account.

Returns:
the current amount of money available in the bank account

getResult

public int getResult()
Returns an int that represents how the operation succeeded.

For a buy operation, it can be
ECashGen.OK,
ECashGen.NOTES_EXP_SYNTAX_ERROR,
ECashGen.SERVER_NOT_READY,
ECashGen.CHEAT_WRONG_SIGNATURE or
ECashGen.CONNECTION_CLOSED_BY_SERVER.

For a deposit operation, it can be
ECashGen.OK,
ECashGen.NOTES_EXP_SYNTAX_ERROR,
ECashGen.NOTES_NOT_AVAILABLE,
ECashGen.SERVER_NOT_READY or
ECashGen.CONNECTION_CLOSED_BY_SERVER.

Returns:
an int that represents how the operation succeeded
See Also:
ECashGen

setCurrentAmount

public void setCurrentAmount(java.lang.String currentAmount)
Sets the current amount available on the bank account.

Parameters:
currentAmount - the current amount

setResult

public void setResult(int result)
Set the result that describes how the operation succeeded.

Parameters:
result - an integer describing how the operation succeeded
See Also:
getResult()