Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7473 vikram.rag 1
 
2
package com.amazonservices.mws.orders.model;
3
 
4
import javax.xml.bind.annotation.XmlEnum;
5
import javax.xml.bind.annotation.XmlEnumValue;
6
import javax.xml.bind.annotation.XmlType;
7
 
8
 
9
/**
10
 * <p>Java class for PaymentMethodEnum.
11
 * 
12
 * <p>The following schema fragment specifies the expected content contained within this class.
13
 * <p>
14
 * <pre>
15
 * &lt;simpleType name="PaymentMethodEnum">
16
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
17
 *     &lt;enumeration value="COD"/>
18
 *     &lt;enumeration value="CVS"/>
19
 *     &lt;enumeration value="Other"/>
20
 *   &lt;/restriction>
21
 * &lt;/simpleType>
22
 * </pre>
23
 * 
24
 */
25
@XmlType(name = "PaymentMethodEnum")
26
@XmlEnum
27
public enum PaymentMethodEnum {
28
 
29
    COD("COD"),
30
    CVS("CVS"),
31
    @XmlEnumValue("Other")
32
    OTHER("Other");
33
    private final String value;
34
 
35
    PaymentMethodEnum(String v) {
36
        value = v;
37
    }
38
 
39
    public String value() {
40
        return value;
41
    }
42
 
43
    public static PaymentMethodEnum fromValue(String v) {
44
        for (PaymentMethodEnum c: PaymentMethodEnum.values()) {
45
            if (c.value.equals(v)) {
46
                return c;
47
            }
48
        }
49
        throw new IllegalArgumentException(v);
50
    }
51
 
52
}