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
8
9 public enum ApiPurchasePaymentStatus {
10
11 UNPAID("Unpaid"),
12
13 PARTIALLY_PAID("PartiallyPaid"),
14
15 PAID("Paid"),
16
17 FAILED("Failed"),
18
19 REFUND_NEEDED("RefundNeeded"),
20
21 REFUNDED("Refunded"),
22
23 PARTIALLY_REFUNDED("PartiallyRefunded");
24
25 private String value;
26
27 ApiPurchasePaymentStatus(String value) {
28 this.value = value;
29 }
30
31 @JsonValue
32 public String getValue() {
33 return value;
34 }
35
36 @Override
37 public String toString() {
38 return String.valueOf(value);
39 }
40
41 @JsonCreator
42 public static ApiPurchasePaymentStatus fromValue(String value) {
43 for (ApiPurchasePaymentStatus b : ApiPurchasePaymentStatus.values()) {
44 if (b.value.equals(value)) {
45 return b;
46 }
47 }
48 throw new IllegalArgumentException("Unexpected value '" + value + "'");
49 }
50 }