Record Class CreateUpdatePositionOrderDTO
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.position.CreateUpdatePositionOrderDTO
- Record Components:
positionOrderType- position order typeorderDate- order datesettlementDate- optional broker settlement datequantity- order quantityprice- order pricetradeCurrency- currency of the quoted trade pricereportedNetAmount- optional broker-reported net amount magnitude in account currencymanualValue- optional manual value overridecloseReason- optional reason the order closed the positionexternalOrderId- optional stable external order identitysourceReference- optional raw upstream referencecomment- 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 Summary
ConstructorsConstructorDescriptionCreateUpdatePositionOrderDTO(@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) Creates an instance of aCreateUpdatePositionOrderDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@Size(max=255) StringReturns the value of thecloseReasonrecord component.comment()Returns the value of thecommentrecord component.final booleanIndicates whether some other object is "equal to" this one.@Size(max=255) StringReturns the value of theexternalOrderIdrecord component.final inthashCode()Returns a hash code value for this object.@DecimalMin("-999999999") @DecimalMax("999999999") DoubleReturns the value of themanualValuerecord component.@NotBlank @Size(max=255) StringReturns the value of theorderDaterecord component.@NotBlank @Size(max=255) StringReturns the value of thepositionOrderTyperecord component.@NotNull @PositiveOrZero @DecimalMax("999999999") Doubleprice()Returns the value of thepricerecord component.@NotNull @Positive @DecimalMax("999999999") Doublequantity()Returns the value of thequantityrecord component.@PositiveOrZero @DecimalMax("999999999") DoubleReturns the value of thereportedNetAmountrecord component.@Size(max=255) StringReturns the value of thesettlementDaterecord component.@Size(max=255) StringReturns the value of thesourceReferencerecord component.final StringtoString()Returns a string representation of this record class.@Size(min=3,max=3) StringReturns the value of thetradeCurrencyrecord component.
-
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 aCreateUpdatePositionOrderDTOrecord class.- Parameters:
positionOrderType- the value for thepositionOrderTyperecord componentorderDate- the value for theorderDaterecord componentsettlementDate- the value for thesettlementDaterecord componentquantity- the value for thequantityrecord componentprice- the value for thepricerecord componenttradeCurrency- the value for thetradeCurrencyrecord componentreportedNetAmount- the value for thereportedNetAmountrecord componentmanualValue- the value for themanualValuerecord componentcloseReason- the value for thecloseReasonrecord componentexternalOrderId- the value for theexternalOrderIdrecord componentsourceReference- the value for thesourceReferencerecord componentcomment- the value for thecommentrecord 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). -
positionOrderType
Returns the value of thepositionOrderTyperecord component.- Returns:
- the value of the
positionOrderTyperecord component
-
orderDate
-
settlementDate
Returns the value of thesettlementDaterecord component.- Returns:
- the value of the
settlementDaterecord component
-
quantity
-
price
-
tradeCurrency
Returns the value of thetradeCurrencyrecord component.- Returns:
- the value of the
tradeCurrencyrecord component
-
reportedNetAmount
@PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") Double reportedNetAmount()Returns the value of thereportedNetAmountrecord component.- Returns:
- the value of the
reportedNetAmountrecord component
-
manualValue
@DecimalMin("-999999999") @DecimalMax("999999999") public @DecimalMin("-999999999") @DecimalMax("999999999") Double manualValue()Returns the value of themanualValuerecord component.- Returns:
- the value of the
manualValuerecord component
-
closeReason
Returns the value of thecloseReasonrecord component.- Returns:
- the value of the
closeReasonrecord component
-
externalOrderId
Returns the value of theexternalOrderIdrecord component.- Returns:
- the value of the
externalOrderIdrecord component
-
sourceReference
Returns the value of thesourceReferencerecord component.- Returns:
- the value of the
sourceReferencerecord component
-
comment
-