Record Class CreateUpdatePositionOrderDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.position.CreateUpdatePositionOrderDTO
Record Components:
positionOrderType - position order type
orderDate - order date
settlementDate - optional broker settlement date
quantity - order quantity
price - order price
tradeCurrency - currency of the quoted trade price
reportedNetAmount - optional broker-reported net amount magnitude in account currency
manualValue - optional manual value override
closeReason - optional reason the order closed the position
externalOrderId - optional stable external order identity
sourceReference - optional raw upstream reference
comment - order comment

public record CreateUpdatePositionOrderDTO(@NotBlank @Size(max=255) String positionOrderType, @NotBlank @Size(max=255) String orderDate, @Size(max=255) String settlementDate, @NotNull @Positive @DecimalMax("999999999") Double quantity, @NotNull @PositiveOrZero @DecimalMax("999999999") Double price, @Size(min=3,max=3) String tradeCurrency, @PositiveOrZero @DecimalMax("999999999") Double reportedNetAmount, @DecimalMin("-999999999") @DecimalMax("999999999") Double manualValue, @Size(max=255) String closeReason, @Size(max=255) String externalOrderId, @Size(max=255) String sourceReference, String comment) extends Record
Request object for creating and updating PositionOrders.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • CreateUpdatePositionOrderDTO

      public CreateUpdatePositionOrderDTO(@NotBlank @Size(max=255) @NotBlank @Size(max=255) String positionOrderType, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String orderDate, @Size(max=255) @Size(max=255) String settlementDate, @NotNull @Positive @DecimalMax("999999999") @NotNull @Positive @DecimalMax("999999999") Double quantity, @NotNull @PositiveOrZero @DecimalMax("999999999") @NotNull @PositiveOrZero @DecimalMax("999999999") Double price, @Size(min=3,max=3) @Size(min=3,max=3) String tradeCurrency, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") Double reportedNetAmount, @DecimalMin("-999999999") @DecimalMax("999999999") @DecimalMin("-999999999") @DecimalMax("999999999") Double manualValue, @Size(max=255) @Size(max=255) String closeReason, @Size(max=255) @Size(max=255) String externalOrderId, @Size(max=255) @Size(max=255) String sourceReference, String comment)
      Creates an instance of a CreateUpdatePositionOrderDTO record class.
      Parameters:
      positionOrderType - the value for the positionOrderType record component
      orderDate - the value for the orderDate record component
      settlementDate - the value for the settlementDate record component
      quantity - the value for the quantity record component
      price - the value for the price record component
      tradeCurrency - the value for the tradeCurrency record component
      reportedNetAmount - the value for the reportedNetAmount record component
      manualValue - the value for the manualValue record component
      closeReason - the value for the closeReason record component
      externalOrderId - the value for the externalOrderId record component
      sourceReference - the value for the sourceReference record component
      comment - the value for the comment 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.
    • positionOrderType

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String positionOrderType()
      Returns the value of the positionOrderType record component.
      Returns:
      the value of the positionOrderType record component
    • orderDate

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String orderDate()
      Returns the value of the orderDate record component.
      Returns:
      the value of the orderDate record component
    • settlementDate

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

      @NotNull @Positive @DecimalMax("999999999") public @NotNull @Positive @DecimalMax("999999999") Double quantity()
      Returns the value of the quantity record component.
      Returns:
      the value of the quantity record component
    • price

      @NotNull @PositiveOrZero @DecimalMax("999999999") public @NotNull @PositiveOrZero @DecimalMax("999999999") Double price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • tradeCurrency

      @Size(min=3, max=3) public @Size(min=3,max=3) String tradeCurrency()
      Returns the value of the tradeCurrency record component.
      Returns:
      the value of the tradeCurrency record component
    • reportedNetAmount

      @PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") Double reportedNetAmount()
      Returns the value of the reportedNetAmount record component.
      Returns:
      the value of the reportedNetAmount record component
    • manualValue

      @DecimalMin("-999999999") @DecimalMax("999999999") public @DecimalMin("-999999999") @DecimalMax("999999999") Double manualValue()
      Returns the value of the manualValue record component.
      Returns:
      the value of the manualValue record component
    • closeReason

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

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

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

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component