View Javadoc
1   package org.oxerr.stubhub.client.model;
2   
3   import com.fasterxml.jackson.annotation.JsonCreator;
4   import com.fasterxml.jackson.annotation.JsonValue;
5   
6   /**
7    * Gets or Sets ApiPurchaseOrderState
8    */
9   public enum ApiPurchaseOrderState {
10  
11  	ACTIVE("Active"),
12  
13  	CANCELLED("Cancelled"),
14  
15  	VOID("Void"),
16  
17  	DRAFTED("Drafted");
18  
19  	private String value;
20  
21  	ApiPurchaseOrderState(String value) {
22  		this.value = value;
23  	}
24  
25  	@JsonValue
26  	public String getValue() {
27  		return value;
28  	}
29  
30  	@Override
31  	public String toString() {
32  		return String.valueOf(value);
33  	}
34  
35  	@JsonCreator
36  	public static ApiPurchaseOrderState fromValue(String value) {
37  		for (ApiPurchaseOrderState b : ApiPurchaseOrderState.values()) {
38  			if (b.value.equals(value)) {
39  				return b;
40  			}
41  		}
42  		throw new IllegalArgumentException("Unexpected value '" + value + "'");
43  	}
44  }