Record Class MT4AccountPositionDataDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.mt4.MT4AccountPositionDataDTO
Record Components:
user - user id
account - account number
broker - broker code
strategyReferenceCode - optional default strategy reference code
activePositions - active imported positions
closedPositions - closed imported positions
transactions - account-level imported transactions

public record MT4AccountPositionDataDTO(@NotBlank @Size(max=75) String user, @NotBlank @Size(max=75) String account, @NotBlank @Size(max=75) String broker, @Size(max=255) String strategyReferenceCode, @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> activePositions, @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> closedPositions, @Valid List<@NotNull MT4AccountOrderDTO> transactions) extends Record
Request object from MT4 containing account position and transaction information.
Version:
3.0.3
Author:
Stephen Prizio
  • Constructor Details

    • MT4AccountPositionDataDTO

      public MT4AccountPositionDataDTO(@NotBlank @Size(max=75) @NotBlank @Size(max=75) String user, @NotBlank @Size(max=75) @NotBlank @Size(max=75) String account, @NotBlank @Size(max=75) @NotBlank @Size(max=75) String broker, @Size(max=255) @Size(max=255) String strategyReferenceCode, @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> activePositions, @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> closedPositions, @Valid @Valid List<@NotNull MT4AccountOrderDTO> transactions)
      Creates an instance of a MT4AccountPositionDataDTO record class.
      Parameters:
      user - the value for the user record component
      account - the value for the account record component
      broker - the value for the broker record component
      strategyReferenceCode - the value for the strategyReferenceCode record component
      activePositions - the value for the activePositions record component
      closedPositions - the value for the closedPositions record component
      transactions - the value for the transactions record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • user

      @NotBlank @Size(max=75) public @NotBlank @Size(max=75) String user()
      Returns the value of the user record component.
      Returns:
      the value of the user record component
    • account

      @NotBlank @Size(max=75) public @NotBlank @Size(max=75) String account()
      Returns the value of the account record component.
      Returns:
      the value of the account record component
    • broker

      @NotBlank @Size(max=75) public @NotBlank @Size(max=75) String broker()
      Returns the value of the broker record component.
      Returns:
      the value of the broker record component
    • strategyReferenceCode

      @Size(max=255) public @Size(max=255) String strategyReferenceCode()
      Returns the value of the strategyReferenceCode record component.
      Returns:
      the value of the strategyReferenceCode record component
    • activePositions

      @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class, to=MT4PositionOrderValidation.class) public @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> activePositions()
      Returns the value of the activePositions record component.
      Returns:
      the value of the activePositions record component
    • closedPositions

      @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class, to=MT4PositionOrderValidation.class) public @Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> closedPositions()
      Returns the value of the closedPositions record component.
      Returns:
      the value of the closedPositions record component
    • transactions

      @Valid public @Valid List<@NotNull MT4AccountOrderDTO> transactions()
      Returns the value of the transactions record component.
      Returns:
      the value of the transactions record component