Class BatchJournalRequest

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class BatchJournalRequest extends Object implements Serializable
Journals API allows you to move cash or securities from one account to another. This model represents the fields you can specify when creating a request of many Journals out of one account to many others at once.
See Also:
  • Field Details

  • Constructor Details

    • BatchJournalRequest

      public BatchJournalRequest()
  • Method Details

    • description

      public BatchJournalRequest description(@Nullable String description)
    • getDescription

      @Nullable public String getDescription()
      Journal description, gets returned in the response
      Returns:
      description
    • setDescription

      public void setDescription(@Nullable String description)
    • entries

      public BatchJournalRequest entries(@Nonnull List<BatchJournalRequestEntriesInner> entries)
    • addEntriesItem

      public BatchJournalRequest addEntriesItem(BatchJournalRequestEntriesInner entriesItem)
    • getEntries

      @Nonnull public List<BatchJournalRequestEntriesInner> getEntries()
      An array of objects describing which accounts you want to move funds into and how much to move into each account
      Returns:
      entries
    • setEntries

      public void setEntries(@Nonnull List<BatchJournalRequestEntriesInner> entries)
    • entryType

      public BatchJournalRequest entryType(@Nonnull BatchJournalRequest.EntryTypeEnum entryType)
    • getEntryType

      @Nonnull public BatchJournalRequest.EntryTypeEnum getEntryType()
      Only supports `JNLC` for now
      Returns:
      entryType
    • setEntryType

      public void setEntryType(@Nonnull BatchJournalRequest.EntryTypeEnum entryType)
    • fromAccount

      public BatchJournalRequest fromAccount(@Nonnull UUID fromAccount)
    • getFromAccount

      @Nonnull public UUID getFromAccount()
      The account id that is the originator of the funds being moved. Most likely is your Sweep Firm Account
      Returns:
      fromAccount
    • setFromAccount

      public void setFromAccount(@Nonnull UUID fromAccount)
    • putAdditionalProperty

      public BatchJournalRequest 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 BatchJournalRequest 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 BatchJournalRequest
    • fromJson

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

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