io.electrum.moneytransfer.model.OrderStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of money-transfer-retailer-interface Show documentation
Show all versions of money-transfer-retailer-interface Show documentation
Money Transfer Retailer Interface
package io.electrum.moneytransfer.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* The status of a money transfer order.
*/
public enum OrderStatus {
UNREDEEMED("UNREDEEMED"),
REDEEMED("REDEEMED"),
CANCELLED("CANCELLED"),
EXPIRED("EXPIRED"),
ON_HOLD("ON_HOLD"),
UNCONFIRMED("UNCONFIRMED");
private final String value;
OrderStatus(String value) {
this.value = value;
}
@JsonCreator
public static OrderStatus fromValue(String text) throws IllegalArgumentException {
for (OrderStatus idType : OrderStatus.values()) {
if (idType.value.equals(text)) {
return idType;
}
}
throw new IllegalArgumentException(String.format("No OrderStatus exists with value='[%s]'", text));
}
@JsonValue
@Override
public String toString() {
return String.valueOf(value);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy