aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java16
1 files changed, 9 insertions, 7 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 9187796..2611357 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
@@ -1,5 +1,7 @@
package com.ufund.api.ufundapi.model;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
public class Need {
public enum GoalType {
@@ -7,12 +9,12 @@ public class Need {
PHYSICAL
}
- private String name;
- private int id;
- private String[] filterAttributes;
- final private GoalType type;
- private double maxGoal;
- private double current;
+ @JsonProperty("name") private String name;
+ @JsonProperty("id") private int id;
+ @JsonProperty("filterAttributes") private String[] filterAttributes;
+ @JsonProperty("type") final private GoalType type;
+ @JsonProperty("maxGoal") private double maxGoal;
+ @JsonProperty("Current") private double current;
/**
* Create a new need
@@ -22,7 +24,7 @@ public class Need {
* @param maxGoal The maximum goal for this need
* @param type The type of need (monetary, physical)
*/
- public Need(String name, int id, double maxGoal, GoalType type) {
+ public Need(@JsonProperty("name") String name, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, GoalType type) {
this.id = id;
this.name = name;
this.maxGoal = maxGoal;