com.konfigthis.client.model.AccountOrderRecordStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snaptrade-java-sdk Show documentation
Show all versions of snaptrade-java-sdk Show documentation
Connect brokerage accounts to your app for live positions and trading
This library was generated by https://konfigthis.com
/*
* SnapTrade
* Connect brokerage accounts to your app for live positions and trading
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by Konfig (https://konfigthis.com).
* Do not edit the class manually.
*/
package com.konfigthis.client.model;
import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.
*/
@JsonAdapter(AccountOrderRecordStatus.Adapter.class)public enum AccountOrderRecordStatus {
NONE("NONE"),
PENDING("PENDING"),
ACCEPTED("ACCEPTED"),
FAILED("FAILED"),
REJECTED("REJECTED"),
CANCELED("CANCELED"),
PARTIAL_CANCELED("PARTIAL_CANCELED"),
CANCEL_PENDING("CANCEL_PENDING"),
EXECUTED("EXECUTED"),
PARTIAL("PARTIAL"),
REPLACE_PENDING("REPLACE_PENDING"),
REPLACED("REPLACED"),
STOPPED("STOPPED"),
SUSPENDED("SUSPENDED"),
EXPIRED("EXPIRED"),
QUEUED("QUEUED"),
TRIGGERED("TRIGGERED"),
ACTIVATED("ACTIVATED"),
PENDING_RISK_REVIEW("PENDING_RISK_REVIEW"),
CONTINGENT_ORDER("CONTINGENT_ORDER");
private String value;
AccountOrderRecordStatus(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static AccountOrderRecordStatus fromValue(String value) {
for (AccountOrderRecordStatus b : AccountOrderRecordStatus.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final AccountOrderRecordStatus enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public AccountOrderRecordStatus read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return AccountOrderRecordStatus.fromValue(value);
}
}
}