com.dft.api.shopify.model.ShopifyTopic 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
package com.dft.api.shopify.model;
import java.util.Optional;
/**
* Shopify Webhook topics
*/
public enum ShopifyTopic {
APP_UNINSTALLED("app/uninstalled");
private final String topicName;
ShopifyTopic(String topicName) {
this.topicName = topicName;
}
public String getTopicName() {
return topicName;
}
public static Optional getByName(String topicName) {
for (ShopifyTopic topic : ShopifyTopic.values()) {
if (topicName.equals(topic.topicName)) {
return Optional.of(topic);
}
}
return Optional.empty();
}
}