Skip to content
Snippets Groups Projects
Commit 10fc4cb8 authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Removed money amount from Transaction, as it will be set by Item.

parent e32f457a
Branches
1 merge request!2Merge new API transaction handling into 'master'.
......@@ -29,11 +29,6 @@ public class Transaction {
*/
private final Integer type;
/**
* Transaction's amount.
*/
private final BigDecimal amount;
/**
* Number of items.
*/
......@@ -46,12 +41,10 @@ public class Transaction {
* @param amount Transaction's amount.
* @param quantity Quantity of items involved.
*/
public Transaction(Integer item, Integer type, BigDecimal amount,
Integer quantity)
public Transaction(Integer item, Integer type, Integer quantity)
{
this.item = item;
this.type = type;
this.amount = amount;
this.quantity = quantity;
}
......@@ -73,15 +66,6 @@ public class Transaction {
return this.type;
}
/**
* Returns the Transaction's amount of money.
* @return the amount.
*/
public BigDecimal getAmount()
{
return this.amount;
}
/**
* Returns the number of items in the Transaction.
* @return the number of items.
......@@ -98,7 +82,7 @@ public class Transaction {
public boolean checkIfValid()
{
return (this.item != null && this.type != null
&& this.amount != null && this.quantity != null);
&& this.quantity != null);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment