diff options
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java index 2611357..c0e9214 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java @@ -14,7 +14,7 @@ public class Need { @JsonProperty("filterAttributes") private String[] filterAttributes; @JsonProperty("type") final private GoalType type; @JsonProperty("maxGoal") private double maxGoal; - @JsonProperty("Current") private double current; + @JsonProperty("current") private double current; /** * Create a new need @@ -32,6 +32,19 @@ public class Need { } /** + * Create a new need + * + * @param name The name of the need + * @param maxGoal The maximum goal for this need + * @param type The type of need (monetary, physical) + */ + public Need(String name, GoalType type, double maxGoal) { + this.name = name; + this.type = type; + this.maxGoal = maxGoal; + } + + /** * Create a deep copy of another need * * @param other The need to copy from |