Last active
January 11, 2025 13:52
-
-
Save diegolirio/1119ef73690db21677f2d6e4a6d33cc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @JsonTypeInfo( | |
| use = JsonTypeInfo.Id.NAME, | |
| include = JsonTypeInfo.As.PROPERTY, | |
| property = "type", | |
| visible = true | |
| ) | |
| @JsonSubTypes( | |
| JsonSubTypes.Type(BuyOperationRequest::class, name = "BUY"), | |
| JsonSubTypes.Type(SellOperationRequest::class, name = "SELL"), | |
| JsonSubTypes.Type(BlockOperationRequest::class, name = "BLOCK") | |
| ) | |
| interface MovementOperationRequest: MovementOperation | |
| // | |
| data class BuyOperationRequest( | |
| override var code: String?, | |
| override val type: MovementTypeEnum, | |
| override val value: BigDecimal, | |
| override val pu: BigDecimal, | |
| override val customerId: String, | |
| override val typeLiquidity: LiquidityEnum, | |
| override val product: ProductInfo, | |
| override val ticket: TicketInfo | |
| ) : MovementOperationRequest, BuyMovementOperation | |
| // | |
| data class SellOperationRequest( | |
| override var code: String?, | |
| override val type: MovementTypeEnum, | |
| override val customerId: String, | |
| override val value: BigDecimal, | |
| override val rescueType: RescueTypeEnum, | |
| override val custody: CustodyInfo, | |
| override val autoUnblock: String? | |
| ): MovementOperationRequest, SellMovementOperation | |
| // | |
| enum class MovementTypeEnum { | |
| BUY, | |
| SELL, | |
| SELL_DUE_DATE, | |
| BLOCK, | |
| UNBLOCK, | |
| TRANSFER_IN, | |
| TRANSFER_OUT, | |
| CANCEL | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment