com.dft.api.shopify.model.InventoryPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shopify-admin-rest Show documentation
Show all versions of shopify-admin-rest Show documentation
Shopify Admin REST API using JDK 11 and Reactive Programming
The newest version!
package com.dft.api.shopify.model;
public enum InventoryPolicy {
DENY("deny"), CONTINUE("continue");
static final String NO_MATCHING_ENUMS_ERROR_MESSAGE = "No matching enum found for %s";
private final String value;
private InventoryPolicy(final String value) {
this.value = value;
}
public static InventoryPolicy toEnum(String value) {
if (DENY.toString().equals(value)) {
return InventoryPolicy.DENY;
} else if (CONTINUE.toString().equals(value)) {
return InventoryPolicy.CONTINUE;
}
throw new IllegalArgumentException(String.format(NO_MATCHING_ENUMS_ERROR_MESSAGE, value));
}
@Override
public String toString() {
return value;
}
}