All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dft.api.shopify.model.ShopifyTopic Maven / Gradle / Ivy

There is a newer version: 2024.10.01
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy