diff --git a/pom.xml b/pom.xml
index 78b86e8..02e1fc7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,14 @@
2.7
+
+
+ org.projectlombok
+ lombok
+ 1.18.2
+ provided
+
+
diff --git a/src/main/java/com/studerw/tda/model/account/Order.java b/src/main/java/com/studerw/tda/model/account/Order.java
index e76fff5..cd108c3 100644
--- a/src/main/java/com/studerw/tda/model/account/Order.java
+++ b/src/main/java/com/studerw/tda/model/account/Order.java
@@ -2,22 +2,18 @@
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.studerw.tda.parse.LocalDateDeserializer;
import com.studerw.tda.parse.ZonedDateTimeDeserializer;
+import lombok.Data;
+
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.ZonedDateTime;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
+import java.util.*;
/**
@@ -26,463 +22,88 @@
*
* @see Place Order Samples
*/
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Order implements Serializable {
- private final static long serialVersionUID = 8347583371582106837L;
-
- @JsonProperty("session")
- private Session session;
+ Session session;
- @JsonProperty("duration")
- private Duration duration;
+ Duration duration;
- @JsonProperty("orderType")
- private OrderType orderType;
+ OrderType orderType;
@JsonDeserialize(using = LocalDateDeserializer.class)
- @JsonProperty("cancelTime")
- private LocalDate cancelTime;
+ LocalDate cancelTime;
- @JsonProperty("complexOrderStrategyType")
- private ComplexOrderStrategyType complexOrderStrategyType;
+ ComplexOrderStrategyType complexOrderStrategyType;
- @JsonProperty("quantity")
- private BigDecimal quantity;
+ BigDecimal quantity;
- @JsonProperty("filledQuantity")
- private BigDecimal filledQuantity;
+ BigDecimal filledQuantity;
- @JsonProperty("remainingQuantity")
- private BigDecimal remainingQuantity;
+ BigDecimal remainingQuantity;
- @JsonProperty("requestedDestination")
- private RequestedDestination requestedDestination;
+ RequestedDestination requestedDestination;
- @JsonProperty("destinationLinkName")
- private String destinationLinkName;
+ String destinationLinkName;
- @JsonProperty("releaseTime")
- private Date releaseTime;
+ Date releaseTime;
- @JsonProperty("stopPrice")
- private BigDecimal stopPrice;
+ BigDecimal stopPrice;
- @JsonProperty("stopPriceLinkBasis")
- private StopPriceLinkBasis stopPriceLinkBasis;
+ StopPriceLinkBasis stopPriceLinkBasis;
- @JsonProperty("stopPriceLinkType")
- private StopPriceLinkType stopPriceLinkType;
+ StopPriceLinkType stopPriceLinkType;
- @JsonProperty("stopPriceOffset")
- private BigDecimal stopPriceOffset;
+ BigDecimal stopPriceOffset;
- @JsonProperty("stopType")
- private StopType stopType;
+ StopType stopType;
- @JsonProperty("priceLinkBasis")
- private PriceLinkBasis priceLinkBasis;
+ PriceLinkBasis priceLinkBasis;
- @JsonProperty("priceLinkType")
- private PriceLinkType priceLinkType;
+ PriceLinkType priceLinkType;
- @JsonProperty("price")
- private BigDecimal price;
+ BigDecimal price;
- @JsonProperty("taxLotMethod")
- private TaxLotMethod taxLotMethod;
+ TaxLotMethod taxLotMethod;
- @JsonProperty("orderLegCollection")
- private List orderLegCollection = new ArrayList<>();
+ List orderLegCollection = new ArrayList<>();
- @JsonProperty("activationPrice")
- private BigDecimal activationPrice;
+ BigDecimal activationPrice;
- @JsonProperty("specialInstruction")
- private SpecialInstruction specialInstruction;
+ SpecialInstruction specialInstruction;
- @JsonProperty("orderStrategyType")
- private OrderStrategyType orderStrategyType;
+ OrderStrategyType orderStrategyType;
- @JsonProperty("orderId")
- private Long orderId;
+ Long orderId;
- @JsonProperty("cancelable")
- private Boolean cancelable;
+ Boolean cancelable;
- @JsonProperty("editable")
- private Boolean editable;
+ Boolean editable;
- @JsonProperty("status")
- private Status status;
+ Status status;
@JsonDeserialize(using = ZonedDateTimeDeserializer.class)
- @JsonProperty("enteredTime")
- private ZonedDateTime enteredTime;
+ ZonedDateTime enteredTime;
@JsonDeserialize(using = ZonedDateTimeDeserializer.class)
- @JsonProperty("closeTime")
- private ZonedDateTime closeTime;
+ ZonedDateTime closeTime;
- @JsonProperty("tag")
- private String tag;
+ String tag;
- @JsonProperty("accountId")
- private Long accountId;
+ Long accountId;
- @JsonProperty("orderActivityCollection")
- private List orderActivityCollection = new ArrayList<>();
+ List orderActivityCollection = new ArrayList<>();
- @JsonProperty("replacingOrderCollection")
- private List