Class ExerciseRequest
java.lang.Object
markets.alpaca.client.openapi.broker.model.ExerciseRequest
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class ExerciseRequest
extends Object
implements Serializable
Request to exercise an option contract for an account. This can be omitted or left empty, but it also allows for optionally charging a commission for exercising or specifying a specific quantity of contracts to exercise (rather than the full quantity of contracts held).
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommission(BigDecimal commission) booleanstatic ExerciseRequestCreate an instance of ExerciseRequest given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.The commission you want to collect from the user.getQty()The number of contracts to exercise.inthashCode()putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.qty(BigDecimal qty) voidsetCommission(BigDecimal commission) voidsetQty(BigDecimal qty) toJson()Convert an instance of ExerciseRequest to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_COMMISSION
- See Also:
-
SERIALIZED_NAME_QTY
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ExerciseRequest
public ExerciseRequest()
-
-
Method Details
-
commission
-
getCommission
The commission you want to collect from the user. (notional amount)- Returns:
- commission
-
setCommission
-
qty
-
getQty
The number of contracts to exercise. If not provided, all contracts will be exercised.- Returns:
- qty
-
setQty
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the ExerciseRequest instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to ExerciseRequest
-
fromJson
Create an instance of ExerciseRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ExerciseRequest
- Throws:
IOException- if the JSON string is invalid with respect to ExerciseRequest
-
toJson
Convert an instance of ExerciseRequest to an JSON string- Returns:
- JSON string
-