All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.studerw.tda.model.account.CashAccount Maven / Gradle / Ivy

There is a newer version: 2.4.3
Show newest version
package com.studerw.tda.model.account;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * TDA CashAccount. Most calls return an abstract {@link SecuritiesAccount} instead of the concrete
 * account type so you need to cast to either a {@link CashAccount} or
 * {@link MarginAccount}. For example:
 *
 * 
 *   SecuritiesAccount account = tdaClient.getAccount("2342..");
 *   if (account.getType == SecuritiesAccount.Type.Cash){
 *     CashAccount cashAcct = (CashAccount)account;
 *   }
 *   else if (account.getType == SecuritiesAccount.Type.Margin){
 *       MarginAccount marginAcct = (MarginAccount)account;
 *   }
 *   ...
 * 
* */ public class CashAccount extends SecuritiesAccount implements Serializable { @JsonProperty("currentBalances") CashCurrentBalances currentBalances; @JsonProperty("initialBalances") CashInitialBalances initialBalances; @JsonProperty("projectedBalances") CashProjectedBalances projectedBalances; public CashCurrentBalances getCurrentBalances() { return currentBalances; } public CashInitialBalances getInitialBalances() { return initialBalances; } public CashProjectedBalances getProjectedBalances() { return projectedBalances; } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .appendSuper(super.toString()) .append("currentBalances", currentBalances) .append("initialBalances", initialBalances) .append("projectedBalances", projectedBalances) .toString(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy