java.lang.Object
markets.alpaca.client.openapi.broker.model.Account
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class Account extends Object implements Serializable
Represents high level account info. Used when returning entire account information would not be useful like the getAllAccounts operation
See Also:
  • Field Details

  • Constructor Details

    • Account

      public Account()
  • Method Details

    • accountNumber

      public Account accountNumber(@Nullable String accountNumber)
    • getAccountNumber

      @Nullable public String getAccountNumber()
      A human-readable account number that can be shown to the end user
      Returns:
      accountNumber
    • setAccountNumber

      public void setAccountNumber(@Nullable String accountNumber)
    • accountType

      public Account accountType(@Nullable AccountType accountType)
    • getAccountType

      @Nullable public AccountType getAccountType()
      Get accountType
      Returns:
      accountType
    • setAccountType

      public void setAccountType(@Nullable AccountType accountType)
    • agreements

      public Account agreements(@Nullable List<Agreement> agreements)
    • addAgreementsItem

      public Account addAgreementsItem(Agreement agreementsItem)
    • getAgreements

      @Nullable public List<Agreement> getAgreements()
      Get agreements
      Returns:
      agreements
    • setAgreements

      public void setAgreements(@Nullable List<Agreement> agreements)
    • allowInstantAch

      public Account allowInstantAch(@Nullable Boolean allowInstantAch)
    • getAllowInstantAch

      @Nullable public Boolean getAllowInstantAch()
      Determines whether the account is enabled for Instant ACH by the partner.
      Returns:
      allowInstantAch
    • setAllowInstantAch

      public void setAllowInstantAch(@Nullable Boolean allowInstantAch)
    • cashInterest

      public Account cashInterest(@Nullable AccountCashInterestResponse cashInterest)
    • getCashInterest

      @Nullable public AccountCashInterestResponse getCashInterest()
      Get cashInterest
      Returns:
      cashInterest
    • setCashInterest

      public void setCashInterest(@Nullable AccountCashInterestResponse cashInterest)
    • contact

      public Account contact(@Nullable Contact contact)
    • getContact

      @Nullable public Contact getContact()
      Get contact
      Returns:
      contact
    • setContact

      public void setContact(@Nullable Contact contact)
    • createdAt

      public Account createdAt(@Nonnull OffsetDateTime createdAt)
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      Timestamp (RFC3339) of account creation.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
    • cryptoStatus

      public Account cryptoStatus(@Nullable AccountStatus cryptoStatus)
    • getCryptoStatus

      @Nullable public AccountStatus getCryptoStatus()
      Get cryptoStatus
      Returns:
      cryptoStatus
    • setCryptoStatus

      public void setCryptoStatus(@Nullable AccountStatus cryptoStatus)
    • currency

      public Account currency(@Nonnull String currency)
    • getCurrency

      @Nonnull public String getCurrency()
      \"USD\" // US Dollar \"JPY\" // Japanese Yen \"EUR\" // Euro \"CAD\" // Canadian Dollar \"GBP\" // British Pound Sterling \"CHF\" // Swiss Franc \"TRY\" // Turkish Lira \"AUD\" // Australian Dollar \"CZK\" // Czech Koruna \"SEK\" // Swedish Krona \"DKK\" // Danish Krone \"SGD\" // Singapore Dollar \"HKD\" // Hong Kong Dollar \"HUF\" // Hungarian Forint \"NZD\" // New Zealand Dollar \"NOK\" // Norwegian Krone \"PLN\" // Poland Złoty
      Returns:
      currency
    • setCurrency

      public void setCurrency(@Nonnull String currency)
    • disclosures

      public Account disclosures(@Nullable Disclosures disclosures)
    • getDisclosures

      @Nullable public Disclosures getDisclosures()
      Get disclosures
      Returns:
      disclosures
    • setDisclosures

      public void setDisclosures(@Nullable Disclosures disclosures)
    • documents

      public Account documents(@Nullable List<OwnerDocument> documents)
    • addDocumentsItem

      public Account addDocumentsItem(OwnerDocument documentsItem)
    • getDocuments

      @Nullable public List<OwnerDocument> getDocuments()
      The documents associated with the primary owner of the account
      Returns:
      documents
    • setDocuments

      public void setDocuments(@Nullable List<OwnerDocument> documents)
    • enabledAssets

      public Account enabledAssets(@Nullable List<AssetClass> enabledAssets)
    • addEnabledAssetsItem

      public Account addEnabledAssetsItem(AssetClass enabledAssetsItem)
    • getEnabledAssets

      @Nullable public List<AssetClass> getEnabledAssets()
      Assets the user has enabled and is able to trade once status and/or crypto_status are ACTIVE
      Returns:
      enabledAssets
    • setEnabledAssets

      public void setEnabledAssets(@Nullable List<AssetClass> enabledAssets)
    • fpsl

      public Account fpsl(@Nullable AccountFPSLResponse fpsl)
    • getFpsl

      @Nullable public AccountFPSLResponse getFpsl()
      Get fpsl
      Returns:
      fpsl
    • setFpsl

      public void setFpsl(@Nullable AccountFPSLResponse fpsl)
    • id

      public Account id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      UUID that identifies the account for later reference
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • identity

      public Account identity(@Nullable Identity identity)
    • getIdentity

      @Nullable public Identity getIdentity()
      Get identity
      Returns:
      identity
    • setIdentity

      public void setIdentity(@Nullable Identity identity)
    • instantAchBlocked

      public Account instantAchBlocked(@Nullable Boolean instantAchBlocked)
    • getInstantAchBlocked

      @Nullable public Boolean getInstantAchBlocked()
      Indicates whether the account is blocked for Instant ACH by Alpaca. Defaults to false when the partner creates the account. If the partner has set allow_instant_ach to true but instant_ach_blocked is true, then the account is blocked for Instant ACH irrespective of the fact that the partner has it enabled.
      Returns:
      instantAchBlocked
    • setInstantAchBlocked

      public void setInstantAchBlocked(@Nullable Boolean instantAchBlocked)
    • lastEquity

      public Account lastEquity(@Nonnull BigDecimal lastEquity)
    • getLastEquity

      @Nonnull public BigDecimal getLastEquity()
      EOD equity calculation (cash + long market value + short market value)
      Returns:
      lastEquity
    • setLastEquity

      public void setLastEquity(@Nonnull BigDecimal lastEquity)
    • primaryAccountHolderId

      public Account primaryAccountHolderId(@Nullable UUID primaryAccountHolderId)
    • getPrimaryAccountHolderId

      @Nullable public UUID getPrimaryAccountHolderId()
      UUID that identifies the primary account holder (party) for accounts opened under the Multi-Live Accounts (MLA) flow. Only populated when the account was created by referencing an existing account holder via `primary_account_holder_id` on `POST /v1/accounts`. Otherwise `null`. Currently only supported for `account_type` of `trading` and `ira`.
      Returns:
      primaryAccountHolderId
    • setPrimaryAccountHolderId

      public void setPrimaryAccountHolderId(@Nullable UUID primaryAccountHolderId)
    • status

      public Account status(@Nonnull AccountStatus status)
    • getStatus

      @Nonnull public AccountStatus getStatus()
      Get status
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull AccountStatus status)
    • trustedContact

      public Account trustedContact(@Nullable TrustedContact trustedContact)
    • getTrustedContact

      @Nullable public TrustedContact getTrustedContact()
      Get trustedContact
      Returns:
      trustedContact
    • setTrustedContact

      public void setTrustedContact(@Nullable TrustedContact trustedContact)
    • putAdditionalProperty

      public Account putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - name of the property
      value - value of the property
      Returns:
      the Account instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Account
    • fromJson

      public static Account fromJson(String jsonString) throws IOException
      Create an instance of Account given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Account
      Throws:
      IOException - if the JSON string is invalid with respect to Account
    • toJson

      public String toJson()
      Convert an instance of Account to an JSON string
      Returns:
      JSON string