Record Class MT4AccountPositionDataDTO
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.mt4.MT4AccountPositionDataDTO
- Record Components:
user- user idaccount- account numberbroker- broker codestrategyReferenceCode- optional default strategy reference codeactivePositions- active imported positionsclosedPositions- closed imported positionstransactions- 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 Summary
ConstructorsConstructorDescriptionMT4AccountPositionDataDTO(@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) Creates an instance of aMT4AccountPositionDataDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank @Size(max=75) Stringaccount()Returns the value of theaccountrecord component.@Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> Returns the value of theactivePositionsrecord component.@NotBlank @Size(max=75) Stringbroker()Returns the value of thebrokerrecord component.@Valid @ConvertGroup(from=jakarta.validation.groups.Default.class,to=MT4PositionOrderValidation.class) List<@NotNull MT4AccountOrderDTO> Returns the value of theclosedPositionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Size(max=255) StringReturns the value of thestrategyReferenceCoderecord component.final StringtoString()Returns a string representation of this record class.@Valid List<@NotNull MT4AccountOrderDTO> Returns the value of thetransactionsrecord component.@NotBlank @Size(max=75) Stringuser()Returns the value of theuserrecord component.
-
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 aMT4AccountPositionDataDTOrecord class.- Parameters:
user- the value for theuserrecord componentaccount- the value for theaccountrecord componentbroker- the value for thebrokerrecord componentstrategyReferenceCode- the value for thestrategyReferenceCoderecord componentactivePositions- the value for theactivePositionsrecord componentclosedPositions- the value for theclosedPositionsrecord componenttransactions- the value for thetransactionsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
user
-
account
-
broker
-
strategyReferenceCode
Returns the value of thestrategyReferenceCoderecord component.- Returns:
- the value of the
strategyReferenceCoderecord 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 theactivePositionsrecord component.- Returns:
- the value of the
activePositionsrecord 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 theclosedPositionsrecord component.- Returns:
- the value of the
closedPositionsrecord component
-
transactions
Returns the value of thetransactionsrecord component.- Returns:
- the value of the
transactionsrecord component
-